#include <PScalar.h>

Public Member Functions

 CPScalar ()
 
 CPScalar (double val, const std::string &unitSpec)
 
 CPScalar (double val)
 
 CPScalar (const std::string &unitSpec)
 
 CPScalar (const CPScalar &src)
 
CPScalaroperator= (const CPScalar &rhs)
 
CPScalaroperator*= (const CPScalar &rhs)
 
CPScalaroperator/= (const CPScalar &rhs)
 
CPScalar operator* (const CPScalar &rhs) const
 
CPScalar operator/ (const CPScalar &rhs) const
 
CPScalaroperator+= (const CPScalar &rhs)
 
CPScalaroperator-= (const CPScalar &rhs)
 
bool operator== (const CPScalar &rhs) const
 
bool operator!= (const CPScalar &rhs) const
 
bool operator< (const CPScalar &rhs) const
 
bool operator> (const CPScalar &rhs) const
 
bool operator<= (const CPScalar &rhs) const
 
bool operator>= (const CPScalar &rhs) const
 
CPScalar operator+ (const CPScalar &rhs) const
 
CPScalar operator- (const CPScalar &rhs) const
 
CPScalar operator+ () const
 
CPScalarNegate (void)
 
CPScalar operator- () const
 
 operator bool () const
 
 operator int () const
 
 operator float () const
 
 operator double () const
 
double GetValue () const
 
CPScalar operator() (const std::string &unitSpec) const
 
CPScalarRaise (double pwr)
 
CPScalarSQRoot ()
 
CPScalarAbs ()
 
CPScalarConvertTo (const std::string &unitSpec)
 
CPScalarConvertTo (const CCompoundUnit &newUnit)
 
CPScalarConvertTo (const CPScalar &target)
 
std::ostream & PrintSelf (std::ostream &output) const
 
bool IsSameType (const CPScalar &target) const
 
bool IsDimensionless () const
 
bool IsDecible () const
 

Private Attributes

double m_dValue
 
CCompoundUnit m_CCU
 

Friends

template<class T >
CPScalaroperator*= (CPScalar &lhs, const T &rhs)
 
template<class T >
CPScalaroperator/= (CPScalar &lhs, const T &rhs)
 

Constructor & Destructor Documentation

◆ CPScalar() [1/5]

CPScalar::CPScalar ( )
inline

◆ CPScalar() [2/5]

CPScalar::CPScalar ( double  val,
const std::string &  unitSpec 
)
inline

◆ CPScalar() [3/5]

CPScalar::CPScalar ( double  val)
inlineexplicit

◆ CPScalar() [4/5]

CPScalar::CPScalar ( const std::string &  unitSpec)
inline

◆ CPScalar() [5/5]

CPScalar::CPScalar ( const CPScalar src)
inline

Member Function Documentation

◆ Abs()

CPScalar & CPScalar::Abs ( )
inline

◆ ConvertTo() [1/3]

CPScalar & CPScalar::ConvertTo ( const CCompoundUnit newUnit)
inline

◆ ConvertTo() [2/3]

CPScalar & CPScalar::ConvertTo ( const CPScalar target)
inline

◆ ConvertTo() [3/3]

CPScalar & CPScalar::ConvertTo ( const std::string &  unitSpec)
inline

◆ GetValue()

double CPScalar::GetValue ( ) const
inline

◆ IsDecible()

bool CPScalar::IsDecible ( ) const
inline

◆ IsDimensionless()

bool CPScalar::IsDimensionless ( ) const
inline

◆ IsSameType()

bool CPScalar::IsSameType ( const CPScalar target) const
inline

◆ Negate()

CPScalar & CPScalar::Negate ( void  )
inline

◆ operator bool()

CPScalar::operator bool ( ) const
inline

◆ operator double()

CPScalar::operator double ( ) const
inline

◆ operator float()

CPScalar::operator float ( ) const
inline

◆ operator int()

CPScalar::operator int ( ) const
inline

◆ operator!=()

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

◆ operator()()

CPScalar CPScalar::operator() ( const std::string &  unitSpec) const
inline

◆ operator*()

CPScalar CPScalar::operator* ( const CPScalar rhs) const
inline

◆ operator*=()

CPScalar & CPScalar::operator*= ( const CPScalar rhs)
inline

◆ operator+() [1/2]

CPScalar CPScalar::operator+ ( ) const
inline

◆ operator+() [2/2]

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

◆ operator+=()

CPScalar & CPScalar::operator+= ( const CPScalar rhs)
inline

◆ operator-() [1/2]

CPScalar CPScalar::operator- ( ) const
inline

◆ operator-() [2/2]

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

◆ operator-=()

CPScalar & CPScalar::operator-= ( const CPScalar rhs)
inline

◆ operator/()

CPScalar CPScalar::operator/ ( const CPScalar rhs) const
inline

◆ operator/=()

CPScalar & CPScalar::operator/= ( const CPScalar rhs)
inline

◆ operator<()

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

◆ operator<=()

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

◆ operator=()

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

◆ operator==()

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

◆ operator>()

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

◆ operator>=()

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

◆ PrintSelf()

std::ostream & CPScalar::PrintSelf ( std::ostream &  output) const
inline

◆ Raise()

CPScalar & CPScalar::Raise ( double  pwr)
inline

◆ SQRoot()

CPScalar & CPScalar::SQRoot ( )
inline

Friends And Related Function Documentation

◆ operator*=

template<class T >
CPScalar & operator*= ( CPScalar lhs,
const T &  rhs 
)
friend

◆ operator/=

template<class T >
CPScalar & operator/= ( CPScalar lhs,
const T &  rhs 
)
friend

Member Data Documentation

◆ m_CCU

CCompoundUnit CPScalar::m_CCU
private

◆ m_dValue

double CPScalar::m_dValue
private

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.