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

Class for opacities [no dimensions]. More...

#include <ATMOpacity.h>

Public Member Functions

 Opacity ()
 Default constructor: Opacity value set to 0 np. More...
 
 Opacity (double opacity)
 A full constructor: value in default units (np) More...
 
 Opacity (double opacity, const std::string &units)
 A full constructor: value + units. More...
 
 Opacity (const Opacity &opacity)
 Copy constructor. More...
 
virtual ~Opacity ()
 Destructor. More...
 
double get () const
 Accessor to get the numerical value of opacity (in np) More...
 
double get (const std::string &units) const
 Accessor to the opacity value in specified units. More...
 
Opacityoperator= (const Opacity &rhs)
 Operator "equal to a Opacity". More...
 
Opacityoperator= (const double &rhs)
 Operator "equal to a double converted to Opacity in m". More...
 
Opacity operator+ (const Opacity &rhs)
 Operator "addition of opacities". More...
 
Opacity operator- (const Opacity &rhs)
 Operator "substraction of opacities". More...
 
Opacity operator* (double scf)
 Operator "multiplication of an opacity by a double". More...
 
Opacity operator* (float scf)
 Operator "multiplication of an opacity by a float". More...
 
Opacity operator* (int scf)
 Operator "multiplication of an opacity by an int". More...
 
Opacity operator* (unsigned int scf)
 Operator "multiplication of an opacity by an unsigned int". More...
 
Opacity operator/ (double scf)
 Operator "division of a opacity by an int". More...
 
Opacity operator/ (float scf)
 Operator "division of a opacity by a float". More...
 
Opacity operator/ (int scf)
 Operator "division of a opacity by an int". More...
 
Opacity operator/ (unsigned int scf)
 Operator "division of a opacity by an unsigned int". More...
 
bool operator< (const Opacity &rhs) const
 Operator "comparator < for two opacities". More...
 
bool operator> (const Opacity &rhs) const
 Operator "comparator > for two opacities". More...
 
bool operator<= (const Opacity &rhs) const
 Operator "comparator <= for two opacities". More...
 
bool operator>= (const Opacity &rhs) const
 Operator "comparator >= for two opacities". More...
 
bool operator== (const Opacity &rhs) const
 Operator "comparator == for two opacities". More...
 
bool operator!= (const Opacity &rhs) const
 Operator "comparator != for two opacities". 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 opacities [no dimensions].

This class is defined for opacities. Default units are np (Transmission=exp(-opacity)).

Definition at line 44 of file ATMOpacity.h.

Constructor & Destructor Documentation

Opacity::Opacity ( )

Default constructor: Opacity value set to 0 np.

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

Opacity::Opacity ( double  opacity)

A full constructor: value in default units (np)

Opacity::Opacity ( double  opacity,
const std::string &  units 
)

A full constructor: value + units.

Valid units are: np [neper] [NP] [NEPER], db [DB].

Opacity::Opacity ( const Opacity opacity)

Copy constructor.

virtual Opacity::~Opacity ( )
virtual

Destructor.

Member Function Documentation

double Opacity::get ( ) const
inline

Accessor to get the numerical value of opacity (in np)

Definition at line 60 of file ATMOpacity.h.

References valueIS_.

Referenced by operator!=(), operator+(), operator-(), operator<(), operator<=(), operator==(), operator>(), and operator>=().

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

Accessor to the opacity value in specified units.

Implemented units are np [neper] [NP] [NEPER], db [DB]. If none of these implemented units is given, the value in neper will be returned.

Definition at line 63 of file ATMOpacity.h.

References sget(), and valueIS_.

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

Operator "comparator != for two opacities".

Definition at line 100 of file ATMOpacity.h.

References get(), and valueIS_.

Opacity Opacity::operator* ( double  scf)
inline

Operator "multiplication of an opacity by a double".

Definition at line 74 of file ATMOpacity.h.

References Opacity(), and valueIS_.

Opacity Opacity::operator* ( float  scf)
inline

Operator "multiplication of an opacity by a float".

Definition at line 76 of file ATMOpacity.h.

References Opacity(), and valueIS_.

Opacity Opacity::operator* ( int  scf)
inline

Operator "multiplication of an opacity by an int".

Definition at line 78 of file ATMOpacity.h.

References Opacity(), and valueIS_.

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

Operator "multiplication of an opacity by an unsigned int".

Definition at line 80 of file ATMOpacity.h.

References Opacity(), and valueIS_.

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

Operator "addition of opacities".

Definition at line 70 of file ATMOpacity.h.

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

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

Operator "substraction of opacities".

Definition at line 72 of file ATMOpacity.h.

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

Opacity Opacity::operator/ ( double  scf)
inline

Operator "division of a opacity by an int".

Definition at line 82 of file ATMOpacity.h.

References Opacity(), and valueIS_.

Opacity Opacity::operator/ ( float  scf)
inline

Operator "division of a opacity by a float".

Definition at line 84 of file ATMOpacity.h.

References Opacity(), and valueIS_.

Opacity Opacity::operator/ ( int  scf)
inline

Operator "division of a opacity by an int".

Definition at line 86 of file ATMOpacity.h.

References Opacity(), and valueIS_.

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

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

Definition at line 88 of file ATMOpacity.h.

References Opacity(), and valueIS_.

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

Operator "comparator < for two opacities".

Definition at line 90 of file ATMOpacity.h.

References get(), and valueIS_.

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

Operator "comparator <= for two opacities".

Definition at line 94 of file ATMOpacity.h.

References get(), and valueIS_.

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

Operator "equal to a Opacity".

Definition at line 66 of file ATMOpacity.h.

References valueIS_.

Opacity& Opacity::operator= ( const double &  rhs)
inline

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

Definition at line 68 of file ATMOpacity.h.

References valueIS_.

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

Operator "comparator == for two opacities".

Definition at line 98 of file ATMOpacity.h.

References get(), and valueIS_.

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

Operator "comparator > for two opacities".

Definition at line 92 of file ATMOpacity.h.

References get(), and valueIS_.

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

Operator "comparator >= for two opacities".

Definition at line 96 of file ATMOpacity.h.

References get(), and valueIS_.

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

Referenced by get().

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

Member Data Documentation

double Opacity::valueIS_
private

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