casa
5.7.0-16
|
Defines a frequency value with units. More...
#include <ATMFrequency.h>
Public Member Functions | |
Frequency () | |
Default constructor: Frequency value set to 0 Hz. More... | |
Frequency (double frequency, const std::string &units) | |
A full constructor: Frequency value + units. More... | |
Frequency (double frequency) | |
A full constructor: Frequency value in default units (International System: Hz) More... | |
Frequency (const Frequency &frequency) | |
Copy constructor. More... | |
virtual | ~Frequency () |
Destructor. More... | |
double | get () const |
Accessor to get the numerical value of frequency (in International System units: Hz) More... | |
double | get (const std::string &units) const |
Accessor to the frequency value in specified units. More... | |
Frequency & | operator= (const Frequency &rhs) |
Operator "equal to a Frequency". More... | |
Frequency & | operator= (double rhs) |
Operator "equal to a double converted to Frequency in Hz". More... | |
Frequency | operator+ (const Frequency &rhs) |
Operator "addition of frequencies". More... | |
Frequency | operator- (const Frequency &rhs) |
Operator "subtraction of frequencies". More... | |
Frequency | operator* (double scf) |
Operator "multiplication of a frequency by a double". More... | |
Frequency | operator* (float scf) |
Operator "multiplication of a frequency by a float". More... | |
Frequency | operator* (int scf) |
Operator "multiplication of a frequency by an int". More... | |
Frequency | operator* (unsigned int scf) |
Operator "multiplication of a frequency by an unsigned int". More... | |
Frequency | operator/ (double scf) |
Operator "division of a frequency by a double". More... | |
Frequency | operator/ (float scf) |
Operator "division of a frequency by a float". More... | |
Frequency | operator/ (int scf) |
Operator "division of a frequency by an int". More... | |
Frequency | operator/ (unsigned int scf) |
Operator "division of a frequency by an unsigned int". More... | |
bool | operator< (const Frequency &rhs) const |
Operator "comparator < for two frequencies". More... | |
bool | operator> (const Frequency &rhs) const |
Operator "comparator > for two frequencies". More... | |
bool | operator<= (const Frequency &rhs) const |
Operator "comparator <= for two frequencies". More... | |
bool | operator>= (const Frequency &rhs) const |
Operator "comparator >= for two frequencies". More... | |
bool | operator== (const Frequency &rhs) const |
Operator "comparator == for two frequencies". More... | |
bool | operator!= (const Frequency &rhs) const |
Operator "comparator != for two frequencies". More... | |
Static Private Member Functions | |
static double | sget (double value, const std::string &units) |
static double | sput (double value, const std::string &units) |
Private Attributes | |
double | valueIS_ |
Defines a frequency value with units.
Objects of type Frequency has a value in Hz (International System Units). The class Frequency allows clients to instantiate or retrieve Frequency objects with values specified in any units within a restricted set of predefined units, namely in THz, GHz, MHz, kHz or Hz. Hence units are handled only at the interface. If the units is not specified at this interface it is assumed to be Hz.
Definition at line 48 of file ATMFrequency.h.
Frequency::Frequency | ( | ) |
Default constructor: Frequency value set to 0 Hz.
Referenced by operator*(), operator+(), operator-(), and operator/().
Frequency::Frequency | ( | double | frequency, |
const std::string & | units | ||
) |
A full constructor: Frequency value + units.
Valid units are THz [THZ] [thz], GHz [GHZ] [ghz], MHz [MHZ] [mhz], Hz [HZ] [hz]
Frequency::Frequency | ( | double | frequency | ) |
A full constructor: Frequency value in default units (International System: Hz)
Frequency::Frequency | ( | const Frequency & | frequency | ) |
Copy constructor.
|
virtual |
Destructor.
|
inline |
Accessor to get the numerical value of frequency (in International System units: Hz)
Definition at line 64 of file ATMFrequency.h.
References valueIS_.
Referenced by RefractiveIndexProfile::getFrequency(), operator!=(), operator+(), operator-(), operator<(), operator<=(), operator==(), operator>(), and operator>=().
|
inline |
Accessor to the frequency value in specified units.
Implemented units are THz [THZ] [thz], GHz [GHZ] [ghz], MHz [MHZ] [mhz], Hz [HZ] [hz]. If none of these implemented units is given, the SI value will be returned.
Definition at line 67 of file ATMFrequency.h.
|
inline |
Operator "comparator != for two frequencies".
Definition at line 105 of file ATMFrequency.h.
|
inline |
Operator "multiplication of a frequency by a double".
Definition at line 79 of file ATMFrequency.h.
References Frequency(), and valueIS_.
|
inline |
Operator "multiplication of a frequency by a float".
Definition at line 81 of file ATMFrequency.h.
References Frequency(), and valueIS_.
|
inline |
Operator "multiplication of a frequency by an int".
Definition at line 83 of file ATMFrequency.h.
References Frequency(), and valueIS_.
|
inline |
Operator "multiplication of a frequency by an unsigned int".
Definition at line 85 of file ATMFrequency.h.
References Frequency(), and valueIS_.
Operator "addition of frequencies".
Definition at line 74 of file ATMFrequency.h.
References Frequency(), get(), and valueIS_.
Operator "subtraction of frequencies".
Definition at line 76 of file ATMFrequency.h.
References Frequency(), get(), and valueIS_.
|
inline |
Operator "division of a frequency by a double".
Definition at line 87 of file ATMFrequency.h.
References Frequency(), and valueIS_.
|
inline |
Operator "division of a frequency by a float".
Definition at line 89 of file ATMFrequency.h.
References Frequency(), and valueIS_.
|
inline |
Operator "division of a frequency by an int".
Definition at line 91 of file ATMFrequency.h.
References Frequency(), and valueIS_.
|
inline |
Operator "division of a frequency by an unsigned int".
Definition at line 93 of file ATMFrequency.h.
References Frequency(), and valueIS_.
|
inline |
Operator "comparator < for two frequencies".
Definition at line 95 of file ATMFrequency.h.
|
inline |
Operator "comparator <= for two frequencies".
Definition at line 99 of file ATMFrequency.h.
|
inline |
Operator "equal to a double converted to Frequency in Hz".
Definition at line 72 of file ATMFrequency.h.
References valueIS_.
|
inline |
Operator "comparator == for two frequencies".
Definition at line 103 of file ATMFrequency.h.
|
inline |
Operator "comparator > for two frequencies".
Definition at line 97 of file ATMFrequency.h.
|
inline |
Operator "comparator >= for two frequencies".
Definition at line 101 of file ATMFrequency.h.
|
staticprivate |
Referenced by get().
|
staticprivate |
|
private |
Definition at line 112 of file ATMFrequency.h.
Referenced by get(), operator!=(), operator*(), operator+(), operator-(), operator/(), operator<(), operator<=(), operator=(), operator==(), operator>(), and operator>=().