casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
Frequency Class Reference

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...
 
Frequencyoperator= (const Frequency &rhs)
 Operator "equal to a Frequency". More...
 
Frequencyoperator= (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_
 

Detailed Description

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.

Constructor & Destructor Documentation

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 Frequency::~Frequency ( )
virtual

Destructor.

Member Function Documentation

double Frequency::get ( ) const
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>=().

double Frequency::get ( const std::string &  units) const
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.

References sget(), and valueIS_.

bool Frequency::operator!= ( const Frequency rhs) const
inline

Operator "comparator != for two frequencies".

Definition at line 105 of file ATMFrequency.h.

References get(), and valueIS_.

Frequency Frequency::operator* ( double  scf)
inline

Operator "multiplication of a frequency by a double".

Definition at line 79 of file ATMFrequency.h.

References Frequency(), and valueIS_.

Frequency Frequency::operator* ( float  scf)
inline

Operator "multiplication of a frequency by a float".

Definition at line 81 of file ATMFrequency.h.

References Frequency(), and valueIS_.

Frequency Frequency::operator* ( int  scf)
inline

Operator "multiplication of a frequency by an int".

Definition at line 83 of file ATMFrequency.h.

References Frequency(), and valueIS_.

Frequency Frequency::operator* ( unsigned int  scf)
inline

Operator "multiplication of a frequency by an unsigned int".

Definition at line 85 of file ATMFrequency.h.

References Frequency(), and valueIS_.

Frequency Frequency::operator+ ( const Frequency rhs)
inline

Operator "addition of frequencies".

Definition at line 74 of file ATMFrequency.h.

References Frequency(), get(), and valueIS_.

Frequency Frequency::operator- ( const Frequency rhs)
inline

Operator "subtraction of frequencies".

Definition at line 76 of file ATMFrequency.h.

References Frequency(), get(), and valueIS_.

Frequency Frequency::operator/ ( double  scf)
inline

Operator "division of a frequency by a double".

Definition at line 87 of file ATMFrequency.h.

References Frequency(), and valueIS_.

Frequency Frequency::operator/ ( float  scf)
inline

Operator "division of a frequency by a float".

Definition at line 89 of file ATMFrequency.h.

References Frequency(), and valueIS_.

Frequency Frequency::operator/ ( int  scf)
inline

Operator "division of a frequency by an int".

Definition at line 91 of file ATMFrequency.h.

References Frequency(), and valueIS_.

Frequency Frequency::operator/ ( unsigned int  scf)
inline

Operator "division of a frequency by an unsigned int".

Definition at line 93 of file ATMFrequency.h.

References Frequency(), and valueIS_.

bool Frequency::operator< ( const Frequency rhs) const
inline

Operator "comparator < for two frequencies".

Definition at line 95 of file ATMFrequency.h.

References get(), and valueIS_.

bool Frequency::operator<= ( const Frequency rhs) const
inline

Operator "comparator <= for two frequencies".

Definition at line 99 of file ATMFrequency.h.

References get(), and valueIS_.

Frequency& Frequency::operator= ( const Frequency rhs)
inline

Operator "equal to a Frequency".

Definition at line 70 of file ATMFrequency.h.

References valueIS_.

Frequency& Frequency::operator= ( double  rhs)
inline

Operator "equal to a double converted to Frequency in Hz".

Definition at line 72 of file ATMFrequency.h.

References valueIS_.

bool Frequency::operator== ( const Frequency rhs) const
inline

Operator "comparator == for two frequencies".

Definition at line 103 of file ATMFrequency.h.

References get(), and valueIS_.

bool Frequency::operator> ( const Frequency rhs) const
inline

Operator "comparator > for two frequencies".

Definition at line 97 of file ATMFrequency.h.

References get(), and valueIS_.

bool Frequency::operator>= ( const Frequency rhs) const
inline

Operator "comparator >= for two frequencies".

Definition at line 101 of file ATMFrequency.h.

References get(), and valueIS_.

static double Frequency::sget ( double  value,
const std::string &  units 
)
staticprivate

Referenced by get().

static double Frequency::sput ( double  value,
const std::string &  units 
)
staticprivate

Member Data Documentation

double Frequency::valueIS_
private

The documentation for this class was generated from the following file: