COPASI API  4.40.278
CValidatedUnit Class Reference

#include <CValidatedUnit.h>

Inheritance diagram for CValidatedUnit:
[legend]

Public Member Functions

const bool & conflict () const
 
 CValidatedUnit ()
 
 CValidatedUnit (const CUnit &unit, const bool &conflict)
 
 CValidatedUnit (const CValidatedUnit &src)
 
CValidatedUnit exponentiate (const double &exponent) const
 
CValidatedUnit operator* (const CValidatedUnit &rightSide) const
 
bool operator< (const CValidatedUnit &rightSide) const
 
void setConflict (const bool &conflict)
 
 ~CValidatedUnit ()
 
- Public Member Functions inherited from CUnit
void addComponent (const CUnitComponent &component)
 
void buildExpression ()
 
CIssue compile ()
 
 CUnit ()
 
 CUnit (const CBaseUnit::Kind &kind)
 
 CUnit (const CUnit &src)
 
 CUnit (const std::string &expression)
 
CUnit exponentiate (double exp) const
 
void filterUsedSymbols (const CUnitDefinitionDB &unitDefinitiionDB)
 
const std::set< CUnitComponent > & getComponents () const
 
std::string getExpression () const
 
std::vector< SymbolComponentgetSymbolComponents () const
 
const std::set< std::string > & getUsedSymbols () const
 
bool isDimensionless () const
 
bool isEquivalent (const CUnit &rightSide) const
 
bool isUndefined () const
 
bool isUnitType (UnitType type) const
 
bool isValid () const
 
CUnit operator* (const CUnit &rightSide) const
 
bool operator< (const CUnit &rightSide) const
 
CUnitoperator= (const CUnit &rightSide)
 
bool operator== (const CUnit &rightSide) const
 
void replaceSymbol (const std::string &oldSymbol, const std::string &newSymbol)
 
void setDimensionLess (double multiplier, double scale, double exponent)
 
virtual CIssue setExpression (const std::string &expression)
 
virtual ~CUnit ()
 

Static Public Member Functions

static CValidatedUnit merge (const CValidatedUnit &a, const CValidatedUnit &b)
 
- Static Public Member Functions inherited from CUnit
static std::string prettyPrint (const std::string &expression)
 
static std::string replaceSymbol (const std::string &expression, const std::string &oldSymbol, const std::string &newSymbol)
 

Private Attributes

bool mConflict
 

Friends

std::ostream & operator<< (std::ostream &os, const CValidatedUnit &o)
 

Additional Inherited Members

- Public Types inherited from CUnit
enum  UnitType {
  time = 0 , quantity , volume , area ,
  length
}
 
- Static Public Attributes inherited from CUnit
static C_FLOAT64 Avogadro
 

Constructor & Destructor Documentation

◆ CValidatedUnit() [1/3]

CValidatedUnit::CValidatedUnit ( )

Default Constructor

Referenced by exponentiate(), and operator*().

◆ CValidatedUnit() [2/3]

CValidatedUnit::CValidatedUnit ( const CValidatedUnit src)

Copy constructor

Parameters
constCValidatedUnit & src

◆ CValidatedUnit() [3/3]

CValidatedUnit::CValidatedUnit ( const CUnit unit,
const bool &  conflict 
)

Specific constructor

Parameters
constCUnit & unit
constbool & conflict

◆ ~CValidatedUnit()

CValidatedUnit::~CValidatedUnit ( )

Destructor

Member Function Documentation

◆ conflict()

const bool & CValidatedUnit::conflict ( ) const

Check whether the validated unit represents a conflict

Returns
const bool & conflict

References mConflict.

Referenced by CEvaluationNodeDelay::getUnit(), CEvaluationNodeFunction::getUnit(), CEvaluationNodeLogical::getUnit(), merge(), setConflict(), CEvaluationNode::setUnit(), and CEvaluationNodeOperator::setUnit().

◆ exponentiate()

CValidatedUnit CValidatedUnit::exponentiate ( const double &  exponent) const

Return the unit to the power exponent

Parameters
constdouble & exponent
Returns
CValidatedUnit exponentiated

References CValidatedUnit(), CUnit::exponentiate(), and mConflict.

Referenced by CEvaluationNodeFunction::getUnit(), CEvaluationNodeFunction::setUnit(), and CEvaluationNodeOperator::setUnit().

◆ merge()

◆ operator*()

CValidatedUnit CValidatedUnit::operator* ( const CValidatedUnit rightSide) const

Multiply two units and return the result

Parameters
constCValidatedUnit & rightSide
Returns
CValidatedUnit product

References CValidatedUnit(), and mConflict.

◆ operator<()

bool CValidatedUnit::operator< ( const CValidatedUnit rightSide) const

Comparison operator

Parameters
constCUnit & rightSide
Returns
lessThan

References mConflict, and CUnit::operator<().

◆ setConflict()

void CValidatedUnit::setConflict ( const bool &  conflict)

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const CValidatedUnit o 
)
friend

Member Data Documentation

◆ mConflict

bool CValidatedUnit::mConflict
private

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