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
Length Class Reference

Class for those physical parameters having dimensions of Length [L]. More...

#include <ATMLength.h>

Public Member Functions

 Length ()
 Default constructor: Length value set to 0 m. More...
 
 Length (double length)
 A full constructor: value in default units (m) More...
 
 Length (double length, const std::string &units)
 A full constructor: value + units. More...
 
 Length (const Length &length)
 Copy constructor. More...
 
virtual ~Length ()
 Destructor. More...
 
double get () const
 Accessor to get the numerical value of length (in International System units: m) More...
 
double get (const std::string &units) const
 Accessor to the length value in specified units. More...
 
std::string get (const std::string &form, const std::string &units) const
 Accessor to the length in specified units as a formatted std::string. More...
 
Lengthoperator= (const Length &rhs)
 Operator "equal to a Length". More...
 
Lengthoperator= (double rhs)
 Operator "equal to a double converted to Length in m". More...
 
Length operator+ (const Length &rhs)
 Operator "addition of lengths". More...
 
Length operator- (const Length &rhs)
 Operator "substraction of lengths". More...
 
Length operator* (double scf)
 Operator "multiplication of a length by a double". More...
 
Length operator* (float scf)
 Operator "multiplication of a length by a float". More...
 
Length operator* (int scf)
 Operator "multiplication of a length by an int". More...
 
Length operator* (unsigned int scf)
 Operator "multiplication of a length by an unsigned int". More...
 
Length operator/ (double scf)
 Operator "division of a length by a double". More...
 
Length operator/ (float scf)
 Operator "division of a length by a float". More...
 
Length operator/ (int scf)
 Operator "division of a length by an int". More...
 
Length operator/ (unsigned int scf)
 Operator "division of a length by an unsigned int". More...
 
bool operator< (const Length &rhs) const
 Operator "comparator < for two lengths". More...
 
bool operator> (const Length &rhs) const
 Operator "comparator > for two lengths". More...
 
bool operator<= (const Length &rhs) const
 Operator "comparator <= for two lengths". More...
 
bool operator>= (const Length &rhs) const
 Operator "comparator >= for two lengths". More...
 
bool operator== (const Length &rhs) const
 Operator "comparator == for two lengths". More...
 
bool operator!= (const Length &rhs) const
 Operator "comparator != for two lengths". 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

Class for those physical parameters having dimensions of Length [L].

This class is defined for those physical parameters that have units of Length, for example the water vapor scale height. Default units are m (International System).

Definition at line 44 of file ATMLength.h.

Constructor & Destructor Documentation

Length::Length ( )

Default constructor: Length value set to 0 m.

Referenced by operator*(), operator+(), operator-(), and operator/().

Length::Length ( double  length)

A full constructor: value in default units (m)

Length::Length ( double  length,
const std::string &  units 
)

A full constructor: value + units.

Valid units are: km [KM], m [M], mm [MM], micron [MICRON], nm [NM].

Length::Length ( const Length length)

Copy constructor.

virtual Length::~Length ( )
virtual

Destructor.

Member Function Documentation

double Length::get ( ) const
inline
double Length::get ( const std::string &  units) const
inline

Accessor to the length value in specified units.

Implemented units are km [KM], m [M], mm [MM], micron [MICRON], nm [NM]. If none of these implemented units is given, the SI value will be returned.

Definition at line 63 of file ATMLength.h.

References sget(), and valueIS_.

std::string Length::get ( const std::string &  form,
const std::string &  units 
) const

Accessor to the length in specified units as a formatted std::string.

Implemented units are km [KM], m [M], mm [MM], micron [MICRON], nm [NM]. If none of these implemented units is given, the SI value will be returned.

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

Operator "comparator != for two lengths".

Definition at line 104 of file ATMLength.h.

References get(), and valueIS_.

Length Length::operator* ( double  scf)
inline

Operator "multiplication of a length by a double".

Definition at line 78 of file ATMLength.h.

References Length(), and valueIS_.

Length Length::operator* ( float  scf)
inline

Operator "multiplication of a length by a float".

Definition at line 80 of file ATMLength.h.

References Length(), and valueIS_.

Length Length::operator* ( int  scf)
inline

Operator "multiplication of a length by an int".

Definition at line 82 of file ATMLength.h.

References Length(), and valueIS_.

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

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

Definition at line 84 of file ATMLength.h.

References Length(), and valueIS_.

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

Operator "addition of lengths".

Definition at line 74 of file ATMLength.h.

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

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

Operator "substraction of lengths".

Definition at line 76 of file ATMLength.h.

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

Length Length::operator/ ( double  scf)
inline

Operator "division of a length by a double".

Definition at line 86 of file ATMLength.h.

References Length(), and valueIS_.

Length Length::operator/ ( float  scf)
inline

Operator "division of a length by a float".

Definition at line 88 of file ATMLength.h.

References Length(), and valueIS_.

Length Length::operator/ ( int  scf)
inline

Operator "division of a length by an int".

Definition at line 90 of file ATMLength.h.

References Length(), and valueIS_.

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

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

Definition at line 92 of file ATMLength.h.

References Length(), and valueIS_.

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

Operator "comparator < for two lengths".

Definition at line 94 of file ATMLength.h.

References get(), and valueIS_.

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

Operator "comparator <= for two lengths".

Definition at line 98 of file ATMLength.h.

References get(), and valueIS_.

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

Operator "equal to a Length".

Definition at line 70 of file ATMLength.h.

References valueIS_.

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

Operator "equal to a double converted to Length in m".

Definition at line 72 of file ATMLength.h.

References valueIS_.

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

Operator "comparator == for two lengths".

Definition at line 102 of file ATMLength.h.

References get(), and valueIS_.

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

Operator "comparator > for two lengths".

Definition at line 96 of file ATMLength.h.

References get(), and valueIS_.

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

Operator "comparator >= for two lengths".

Definition at line 100 of file ATMLength.h.

References get(), and valueIS_.

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

Referenced by get().

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

Member Data Documentation

double Length::valueIS_
private

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