#include <CUnit.h>
|
| static std::string | prettyPrint (const std::string &expression) |
| |
| static std::string | replaceSymbol (const std::string &expression, const std::string &oldSymbol, const std::string &newSymbol) |
| |
◆ UnitType
| Enumerator |
|---|
| time | |
| quantity | |
| volume | |
| area | |
| length | |
◆ CUnit() [1/4]
◆ CUnit() [2/4]
◆ CUnit() [3/4]
| CUnit::CUnit |
( |
const std::string & |
expression | ) |
|
Expression constructor
- Parameters
-
| const | std::string & expression |
References setExpression().
◆ CUnit() [4/4]
| CUnit::CUnit |
( |
const CUnit & |
src | ) |
|
◆ ~CUnit()
◆ addComponent()
References C_FLOAT64, CBaseUnit::dimensionless, CUnitComponent::getExponent(), CUnitComponent::getKind(), CUnitComponent::getMultiplier(), CUnitComponent::getScale(), mComponents, mpDimensionless, CUnitComponent::setExponent(), CUnitComponent::setMultiplier(), and CUnitComponent::setScale().
Referenced by SBMLUnitSupport::createUnitExpressionFor(), CUnit(), CUnitDefinitionDB::getAllValidUnits(), and operator*().
◆ buildExpression()
| void CUnit::buildExpression |
( |
| ) |
|
◆ compile()
References CCopasiMessage::ERROR, CIssue::Error, CUnitParserBase::getComponents(), CUnitParserBase::getSymbols(), mComponents, MCUnit, mExpression, mpDimensionless, mUsedSymbols, CIssue::Success, CBaseUnit::undefined, CIssue::UnitInvalid, CIssue::UnitUndefined, CIssue::Warning, and CUnitParserBase::yyparse().
Referenced by SBMLUnitSupport::createUnitExpressionFor(), and setExpression().
◆ exponentiate()
| CUnit CUnit::exponentiate |
( |
double |
exp | ) |
const |
References CUnit(), CBaseUnit::dimensionless, getComponents(), CUnitComponent::getExponent(), CUnitComponent::getMultiplier(), CUnitComponent::getScale(), min, CUnitComponent::setExponent(), CUnitComponent::setMultiplier(), and CUnitComponent::setScale().
Referenced by SBMLUnitSupport::createUnitExpressionFor(), CValidatedUnit::exponentiate(), and CUnitDefinitionDB::getAllValidUnits().
◆ filterUsedSymbols()
◆ getComponents()
◆ getExponentOfSymbol()
| C_INT32 CUnit::getExponentOfSymbol |
( |
const std::pair< std::string, CUnit > & |
SymbolDef, |
|
|
CUnit & |
unit |
|
) |
| |
|
staticprivate |
◆ getExpression()
| std::string CUnit::getExpression |
( |
| ) |
const |
◆ getSymbolComponents()
References C_INT32, C_INVALID_INDEX, CBaseUnit::dimensionless, CUnit::SymbolComponent::exponent, getComponents(), getExponentOfSymbol(), CBaseUnit::getSymbol(), CUnit::SymbolComponent::multiplier, mUsedSymbols, CUnit::SymbolComponent::scale, sortSymbols(), and CUnit::SymbolComponent::symbol.
Referenced by buildExpression(), and CSBMLExporter::createUnitDefinitionFor().
◆ getUsedSymbols()
| const std::set< std::string > & CUnit::getUsedSymbols |
( |
| ) |
const |
◆ isDimensionless()
| bool CUnit::isDimensionless |
( |
| ) |
const |
◆ isEquivalent()
| bool CUnit::isEquivalent |
( |
const CUnit & |
rightSide | ) |
const |
◆ isUndefined()
| bool CUnit::isUndefined |
( |
| ) |
const |
◆ isUnitType()
| bool CUnit::isUnitType |
( |
UnitType |
type | ) |
const |
◆ isValid()
| bool CUnit::isValid |
( |
| ) |
const |
◆ operator*()
| CUnit CUnit::operator* |
( |
const CUnit & |
rightSide | ) |
const |
◆ operator<()
| bool CUnit::operator< |
( |
const CUnit & |
rightSide | ) |
const |
◆ operator=()
| CUnit & CUnit::operator= |
( |
const CUnit & |
rightSide | ) |
|
◆ operator==()
| bool CUnit::operator== |
( |
const CUnit & |
rightSide | ) |
const |
◆ prettyPrint()
| std::string CUnit::prettyPrint |
( |
const std::string & |
expression | ) |
|
|
static |
◆ removeSymbolFromUnit()
◆ replaceExponentInExpression()
| void CUnit::replaceExponentInExpression |
( |
std::string & |
expression, |
|
|
const size_t & |
exponent |
|
) |
| |
|
staticprivate |
◆ replaceSymbol() [1/2]
| std::string CUnit::replaceSymbol |
( |
const std::string & |
expression, |
|
|
const std::string & |
oldSymbol, |
|
|
const std::string & |
newSymbol |
|
) |
| |
|
static |
◆ replaceSymbol() [2/2]
| void CUnit::replaceSymbol |
( |
const std::string & |
oldSymbol, |
|
|
const std::string & |
newSymbol |
|
) |
| |
◆ setDimensionLess()
| void CUnit::setDimensionLess |
( |
double |
multiplier, |
|
|
double |
scale, |
|
|
double |
exponent |
|
) |
| |
◆ setExpression()
| CIssue CUnit::setExpression |
( |
const std::string & |
expression | ) |
|
|
virtual |
◆ operator<<
| std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const CUnit & |
o |
|
) |
| |
|
friend |
◆ Avogadro
◆ mComponents
Referenced by addComponent(), compile(), CUnit(), getComponents(), isDimensionless(), isEquivalent(), isUndefined(), isUnitType(), isValid(), operator*(), operator<(), operator=(), operator==(), and setDimensionLess().
◆ mExpression
| std::string CUnit::mExpression |
|
private |
◆ mpDimensionless
◆ mUsedSymbols
| std::set< std::string > CUnit::mUsedSymbols |
|
private |
The documentation for this class was generated from the following files: