COPASI API  4.40.278
CSBMLunitInformation Class Reference

#include <CSBMLunit.h>

Inheritance diagram for CSBMLunitInformation:
[legend]

Public Types

enum  INFO {
  UNKNOWN = 0 , DEFAULT , GLOBAL , PROVIDED ,
  DERIVED
}
 this enum encodes the status of a units information More...
 

Public Member Functions

 CSBMLunitInformation (const CSBMLunit &u, INFO info, bool conflict=false)
 
 CSBMLunitInformation (const UnitDefinition *ud, INFO info, bool conflict=false)
 
 CSBMLunitInformation (unsigned int sbmlLevel, unsigned int sbmlVersion)
 Default constructor. More...
 
 CSBMLunitInformation (unsigned int sbmlLevel, unsigned int sbmlVersion, INFO info, bool conflict=false)
 
virtual std::string getDisplayString () const
 
INFO getInfo () const
 get the status information More...
 
bool isConflict () const
 retrieve the conflict flag More...
 
void setConflict (bool c)
 set the conflict flag More...
 
void setInfo (INFO info)
 set the status information More...
 
- Public Member Functions inherited from CSBMLunit
void applyExponent (const std::string &id, size_t frame)
 apply symbolic exponent to the unit More...
 
void applyExponent (double exp)
 apply numeric exponent to the unit. More...
 
void applyInverseExponent (const std::string &id, size_t frame)
 apply inverse of symbolic exponent to the unit More...
 
 CSBMLunit (const CSBMLunit &src)
 Copy constructor. More...
 
 CSBMLunit (const UnitDefinition *ud)
 Constructor from libsbml units. More...
 
 CSBMLunit (unsigned int sbmlLevel, unsigned int sbmlVersion)
 Default constructor. More...
 
UnitDefinition & getSBMLUnitDefinition ()
 
const UnitDefinition & getSBMLUnitDefinition () const
 
int getSymbolicExpExp () const
 
const std::string & getSymbolicExponent () const
 
void invert ()
 
bool isDimensionless () const
 
bool multiply (const CSBMLunit &unit)
 
virtual ~CSBMLunit ()
 

Static Public Member Functions

static bool isEqual (const CSBMLunitInformation &unit1, const CSBMLunitInformation &unit2)
 
- Static Public Member Functions inherited from CSBMLunit
static bool isEqual (const CSBMLunit &unit1, const CSBMLunit &unit2)
 

Private Attributes

bool mConflict
 indicated whether a conflict occurred while trying to determine the unit. More...
 
INFO mInfo
 

Detailed Description

This class contains one unit definition plus some meta information, e.g. whether the unit was provided or calculated, if it is unknown or if there is a conflict.

Member Enumeration Documentation

◆ INFO

this enum encodes the status of a units information

Enumerator
UNKNOWN 

the units is unknown

DEFAULT 

the units is determined from the sbml defaults

GLOBAL 

the units is determined from the model-wide definitions

PROVIDED 

the units if provided for a specific object explicitly

DERIVED 

the units was determined by reasoning

Constructor & Destructor Documentation

◆ CSBMLunitInformation() [1/4]

CSBMLunitInformation::CSBMLunitInformation ( unsigned int  sbmlLevel,
unsigned int  sbmlVersion 
)

Default constructor.

◆ CSBMLunitInformation() [2/4]

CSBMLunitInformation::CSBMLunitInformation ( unsigned int  sbmlLevel,
unsigned int  sbmlVersion,
INFO  info,
bool  conflict = false 
)

◆ CSBMLunitInformation() [3/4]

CSBMLunitInformation::CSBMLunitInformation ( const CSBMLunit u,
INFO  info,
bool  conflict = false 
)

◆ CSBMLunitInformation() [4/4]

CSBMLunitInformation::CSBMLunitInformation ( const UnitDefinition *  ud,
INFO  info,
bool  conflict = false 
)

Member Function Documentation

◆ getDisplayString()

std::string CSBMLunitInformation::getDisplayString ( ) const
virtual

◆ getInfo()

◆ isConflict()

bool CSBMLunitInformation::isConflict ( ) const
inline

retrieve the conflict flag

References mConflict.

Referenced by Expression2PresentationMMLUnits::getMathML(), and CSBMLunitInterface::handleTerminalNode().

◆ isEqual()

bool CSBMLunitInformation::isEqual ( const CSBMLunitInformation unit1,
const CSBMLunitInformation unit2 
)
static

◆ setConflict()

void CSBMLunitInformation::setConflict ( bool  c)
inline

set the conflict flag

References mConflict.

Referenced by CSBMLunitInterface::handleTerminalNode().

◆ setInfo()

Member Data Documentation

◆ mConflict

bool CSBMLunitInformation::mConflict
private

indicated whether a conflict occurred while trying to determine the unit.

Referenced by getDisplayString(), isConflict(), isEqual(), and setConflict().

◆ mInfo

INFO CSBMLunitInformation::mInfo
private

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