CARMA C++
Attenuation.h
Go to the documentation of this file.
1 #ifndef SZA_UTIL_ATTENUATION_H
2 #define SZA_UTIL_ATTENUATION_H
3 
11 #include <iostream>
12 
13 #include "carma/szautil/ConformableQuantity.h"
14 
15 namespace sza {
16  namespace util {
17 
18  class Attenuation : public ConformableQuantity {
19  public:
20 
21  class dBUnit {};
22 
26  Attenuation();
27  Attenuation(const dBUnit& units, double dB);
28 
32  virtual ~Attenuation();
33 
34  // Set the attenuation, in dB
35 
36  void setdB(double dB);
37 
38  // Return the attenuation, in dB
39 
40  inline double dB() {
41  return dB_;
42  }
43 
44  inline unsigned char intModUnits() {
45  return (unsigned char)dB();
46  }
47 
48  void initialize();
49 
50  private:
51 
52  double dB_;
53 
54  }; // End class Attenuation
55 
56  } // End namespace util
57 } // End namespace sza
58 
59 
60 
61 #endif // End #ifndef SZA_UTIL_ATTENUATION_H