COPASI API
4.40.278
|
#include <CValidatedUnit.h>
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< SymbolComponent > | getSymbolComponents () 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 |
CUnit & | operator= (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 |
CValidatedUnit::CValidatedUnit | ( | ) |
Default Constructor
Referenced by exponentiate(), and operator*().
CValidatedUnit::CValidatedUnit | ( | const CValidatedUnit & | src | ) |
Copy constructor
const | CValidatedUnit & src |
CValidatedUnit::CValidatedUnit | ( | const CUnit & | unit, |
const bool & | conflict | ||
) |
Specific constructor
const | CUnit & unit |
const | bool & conflict |
CValidatedUnit::~CValidatedUnit | ( | ) |
Destructor
const bool & CValidatedUnit::conflict | ( | ) | const |
Check whether the validated unit represents a conflict
References mConflict.
Referenced by CEvaluationNodeDelay::getUnit(), CEvaluationNodeFunction::getUnit(), CEvaluationNodeLogical::getUnit(), merge(), setConflict(), CEvaluationNode::setUnit(), and CEvaluationNodeOperator::setUnit().
CValidatedUnit CValidatedUnit::exponentiate | ( | const double & | exponent | ) | const |
Return the unit to the power exponent
const | double & exponent |
References CValidatedUnit(), CUnit::exponentiate(), and mConflict.
Referenced by CEvaluationNodeFunction::getUnit(), CEvaluationNodeFunction::setUnit(), and CEvaluationNodeOperator::setUnit().
|
static |
References conflict(), CUnit::CUnit(), setConflict(), and CBaseUnit::undefined.
Referenced by CEvaluationNodeVector::getUnit(), CEvaluationNodeChoice::getUnit(), CEvaluationNodeDelay::getUnit(), CEvaluationNodeFunction::getUnit(), CEvaluationNodeLogical::getUnit(), CEvaluationNodeObject::getUnit(), CEvaluationNodeOperator::getUnit(), CEvaluationNode::setUnit(), CEvaluationNodeCall::setUnit(), CEvaluationNodeLogical::setUnit(), and CUnitValidator::setUnits().
CValidatedUnit CValidatedUnit::operator* | ( | const CValidatedUnit & | rightSide | ) | const |
Multiply two units and return the result
const | CValidatedUnit & rightSide |
References CValidatedUnit(), and mConflict.
bool CValidatedUnit::operator< | ( | const CValidatedUnit & | rightSide | ) | const |
Comparison operator
const | CUnit & rightSide |
References mConflict, and CUnit::operator<().
void CValidatedUnit::setConflict | ( | const bool & | conflict | ) |
Set whether the validated unit represents a conflict;
const | bool & conflict |
References conflict(), and mConflict.
Referenced by CEvaluationNodeVector::getUnit(), CEvaluationNodeDelay::getUnit(), CEvaluationNodeFunction::getUnit(), CEvaluationNodeLogical::getUnit(), CEvaluationNodeOperator::getUnit(), merge(), CEvaluationNode::setUnit(), CEvaluationNodeFunction::setUnit(), and CEvaluationNodeOperator::setUnit().
|
friend |
|
private |
Referenced by conflict(), exponentiate(), operator*(), operator<(), and setConflict().