9 #ifndef CSBMLUNITINTERFACE
10 #define CSBMLUNITINTERFACE
192 void push(std::map<std::string, ASTNode*> & frame)
333 static bool isObject(
const ASTNode* node);
338 static bool isNumber(
const ASTNode* node);
static std::string getIdentifier(const ASTNode *node)
EvaluationResult evaluate(const ASTNode *node)
std::vector< unsigned int > local
void setAssumeDimensionlessOne(bool f)
const Statistics & getStatistics() const
const std::vector< CExpressionInformation > & getExpressions() const
void handleOneExpression(CExpressionInformation &ei)
try to find out as much as possible about the units from one expression
CSBMLunitInformation * mpSBMLAreaUnit
CSBMLunitInformation * mpSBMLConflictUnit
CSBMLunitInformation recursionPiecewise(const ASTNode *node, const CSBMLunitInformation &ui, const CEnvironmentInformation &ei)
std::vector< CExpressionInformation > mSBMLExpressions
CSBMLunitInformation recursionTimes(const ASTNode *node, const CSBMLunitInformation &ui, const CEnvironmentInformation &ei)
Model * mpModel
the sbml model from which this interface was initialized
std::vector< unsigned int > global
bool mAssumeDimensionlessOne
FunctionDefinition * resolveFunctionName(const std::string &node)
static bool isNumber(const ASTNode *node)
determines if the node represents a number (integer, real, or rational)
unsigned int mSBMLVersion
CSBMLunitInterface(const CSBMLunitInterface &src)
CSBMLunitInformation * mpSBMLLengthUnit
CSBMLunitInformation recursion(const ASTNode *node, const CSBMLunitInformation &ui, const CEnvironmentInformation &ei)
CSBMLunitInformation * getMappedUnitFromIdentifier(const std::string &node, const CEnvironmentInformation &ei)
std::map< std::string, CSBMLunitInformation > mSBMLObjectsMap
void calculateStatistics()
std::vector< std::string > getListOfObjectsWithGivenUnitStatus(int status) const
CSBMLunitInformation handleTerminalNode(const CSBMLunitInformation &ui, CSBMLunitInformation *pNodeUnit, const ASTNode *node)
ASTNode * resolveVariableName(const std::string &node, const CEnvironmentInformation &ei)
CSBMLunitInformation * getMappedUnitFromNumberNode(const ASTNode *node)
CSBMLunitInformation * mpSBMLAmountUnit
void initializeDefaultUnits()
initializes the base units with the defaults (moles, seconds, l, m, m^2)
static bool isOperator(const ASTNode *node)
void initializeFromSBMLModel(bool unitsFromModel)
CSBMLunitInformation * mpSBMLVolumeUnit
CSBMLunitInterface & operator=(const CSBMLunitInterface &src)
std::vector< unsigned int > numbers
std::map< std::string, std::map< std::string, CSBMLunitInformation > > mSBMLLocalParametersMap
static void outputStatistics(const Statistics &stat, bool flag)
static bool isObject(const ASTNode *node)
static bool isFunctionCall(const ASTNode *node)
determines if the node contains a call to a function definition
std::map< const ASTNode *, CSBMLunitInformation > mSBMLNumbersMap
std::vector< unsigned int > all
static double getValueFromNumberNode(const ASTNode *node)
return the value of a number node
static bool isBuiltInFunctionCall(const ASTNode *node)
determines if the node contains a call to a built in function
CSBMLunitInformation recursionDivide(const ASTNode *node, const CSBMLunitInformation &ui, const CEnvironmentInformation &ei)
std::set< const ASTNode * > mConflictingNodes
contains the (terminal) nodes where a conflict appeared
CSBMLunitInformation * mpSBMLTimeUnit
CSBMLunitInformation recursionPower(const ASTNode *node, const CSBMLunitInformation &ui, const CEnvironmentInformation &ei)
const std::set< const ASTNode * > & getListOfConflictingNodes() const
std::string getMessageAboutUnknownUnits() const
std::vector< std::pair< std::string, std::string > > getListOfLocalParametersWithGivenUnitStatus(int status) const
CSBMLunitInformation recursionEqual(const ASTNode *node, const CSBMLunitInformation &ui, const CEnvironmentInformation &ei)
const Model * getModel() const