My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
Pressure.h
Go to the documentation of this file.
1 // $Id: Pressure.h,v 1.4 2010/03/04 21:17:27 sjcm Exp $
2 
3 #ifndef GCP_UTIL_PRESSURE_H
4 #define GCP_UTIL_PRESSURE_H
5 
15 #include <sstream>
16 
17 #include "gcp/util/common/ConformableQuantity.h"
18 
19 namespace gcp {
20  namespace util {
21 
22  class Pressure : public ConformableQuantity {
23  public:
24 
25  class InchesHg {};
26  class MilliBar {};
27  class Torr {};
28 
32  Pressure();
33  Pressure(const InchesHg& unit, double inchesHg);
34  Pressure(const MilliBar& unit, double mBar);
35  Pressure(const Torr& unit, double torr);
36 
40  virtual ~Pressure();
41 
42  // Scale factors used by this class
43 
44  static const double mBarPerInHg_;
45 
46  void setMilliBar(double mBar);
47  void setInchesHg(double inchesHg);
48  void setInHg(double inchesHg);
49  void setTorr(double torr);
50 
51  double milliBar();
52  double inchesHg();
53  double inHg();
54  double torr();
55 
56  friend std::ostream& operator<<(std::ostream& os, Pressure& pressure);
57 
58  private:
59 
60  double mBar_;
61 
62  }; // End class Pressure
63 
64  std::ostream& operator<<(std::ostream& os, Pressure& pressure);
65 
66  } // End namespace util
67 } // End namespace gcp
68 
69 
70 
71 #endif // End #ifndef GCP_UTIL_PRESSURE_H
Pressure()
Definition: Pressure.cc:12
Definition: Pressure.h:22
Definition: ConformableQuantity.h:16
Definition: Pressure.h:27
virtual ~Pressure()
Definition: Pressure.cc:35
Definition: Pressure.h:26
Definition: Pressure.h:25