COPASI API  4.40.278
CEvaluationNodeObject Class Reference

#include <CEvaluationNodeObject.h>

Inheritance diagram for CEvaluationNodeObject:
[legend]

Public Member Functions

 CEvaluationNodeObject (const bool *pValue)
 
 CEvaluationNodeObject (const C_FLOAT64 *pValue)
 
 CEvaluationNodeObject (const CEvaluationNodeObject &src)
 
 CEvaluationNodeObject (const SubType &subType, const Data &data)
 
virtual CIssue compile () override
 
virtual std::string getBerkeleyMadonnaString (const std::vector< std::string > &children) const override
 
virtual std::string getCCodeString (const std::vector< std::string > &children) const override
 
virtual const DatagetData () const override
 
virtual std::string getDisplayString (const std::vector< std::string > &children) const override
 
virtual std::string getInfix (const std::vector< std::string > &children) const override
 
virtual std::string getMMLString (const std::vector< std::string > &children, bool expand, const std::vector< std::vector< std::string > > &variables) const override
 
const CRegisteredCommonNamegetObjectCN () const
 
const CObjectInterfacegetObjectInterfacePtr () const
 
const C_FLOAT64getObjectValuePtr () const
 
virtual CValidatedUnit getUnit (const CMathContainer &container, const std::vector< CValidatedUnit > &units) const override
 
virtual std::string getXPPString (const std::vector< std::string > &children) const override
 
bool mapObject (const std::string srcCN, const CDataContainer *pTarget)
 
virtual bool setData (const Data &data) override
 
void setObjectValuePtr (C_FLOAT64 *pObjectValue)
 
virtual ASTNode * toAST (const CDataModel *pDataModel) const override
 
virtual ~CEvaluationNodeObject ()
 
- Public Member Functions inherited from CEvaluationNode
void addChildren (const std::vector< CEvaluationNode * > &children)
 
std::string buildBerkeleyMadonnaString () const
 
std::string buildCCodeString () const
 
std::string buildDisplayString () const
 
std::string buildInfix () const
 
std::string buildMMLString (bool expand, const std::vector< std::vector< std::string > > &variables) const
 
std::string buildXPPString () const
 
virtual void calculate ()
 
 CEvaluationNode ()
 
 CEvaluationNode (const CEvaluationNode &src)
 
CEvaluationNodecopyBranch () const
 
CEvaluationNodecopyNode (CEvaluationNode *child1, CEvaluationNode *child2) const
 
CEvaluationNodecopyNode (const std::vector< CEvaluationNode * > &children) const
 
const CEvaluationNodefindTopMinus (const std::vector< CFunctionAnalyzer::CValue > &callParameters) const
 
const CEvaluationTreegetTree () const
 
const C_FLOAT64getValuePointer () const
 
const ValueTypegetValueType () const
 
virtual bool isBoolean () const
 
const MainTypemainType () const
 
bool operator!= (const CEvaluationNode &right) const
 
bool operator< (const CEvaluationNode &rhs)
 
bool operator< (const CEvaluationNode &right) const
 
bool operator== (const CEvaluationNode &right) const
 
void printRecursively () const
 
void printRecursively (std::ostream &os, int indent=0) const
 
void setTree (const CEvaluationTree *pTree)
 
virtual CValidatedUnit setUnit (const CMathContainer &container, const std::map< CEvaluationNode *, CValidatedUnit > &currentUnits, std::map< CEvaluationNode *, CValidatedUnit > &targetUnits) const
 
virtual CIssue setValueType (const ValueType &valueType)
 
virtual CEvaluationNodesimplifyNode (const std::vector< CEvaluationNode * > &children) const
 
CEvaluationNodesplitBranch (const CEvaluationNode *splitnode, bool left) const
 
const SubTypesubType () const
 
virtual ~CEvaluationNode ()
 
- Public Member Functions inherited from CCopasiNode< std::string >
virtual bool addChild (CCopasiNode< Data > *pChild, CCopasiNode< Data > *pAfter=NULL)
 
bool addSibling (CCopasiNode< Data > *pSibling, CCopasiNode< Data > *pAfter=NULL)
 
 CCopasiNode (CCopasiNode< Data > *pParent=NULL)
 
 CCopasiNode (const CCopasiNode< Data > &src)
 
 CCopasiNode (const Data &data, CCopasiNode< Data > *pParent=NULL)
 
bool deleteChildren ()
 
CCopasiNode< Data > * getChild ()
 
const CCopasiNode< Data > * getChild () const
 
CCopasiNode< Data > * getChild (const size_t &index)
 
const CCopasiNode< Data > * getChild (const size_t &index) const
 
virtual DatagetData ()
 
CCopasiNode< Data > * getNext ()
 
const CCopasiNode< Data > * getNext () const
 
CCopasiNode< Data > * getNextNonChild ()
 
const CCopasiNode< Data > * getNextNonChild () const
 
size_t getNumChildren () const
 
CCopasiNode< Data > * getParent ()
 
const CCopasiNode< Data > * getParent () const
 
CCopasiNode< Data > * getSibling ()
 
const CCopasiNode< Data > * getSibling () const
 
virtual bool removeChild (CCopasiNode< Data > *pChild)
 
virtual bool setData (const Data &data)
 
virtual ~CCopasiNode ()
 

Static Public Member Functions

static CEvaluationNodefromAST (const ASTNode *pASTNode, const std::vector< CEvaluationNode * > &children)
 
- Static Public Member Functions inherited from CEvaluationNode
static CEvaluationNodecreate (const MainType &mainType, const SubType &subType, const std::string &data)
 
static bool isKeyword (const std::string &str)
 

Private Member Functions

 CEvaluationNodeObject ()
 

Private Attributes

const CObjectInterfacempObject
 
CRegisteredCommonName mRegisteredObjectCN
 

Additional Inherited Members

- Public Types inherited from CEvaluationNode
enum class  MainType {
  INVALID , NUMBER , CONSTANT , OPERATOR ,
  OBJECT , FUNCTION , CALL , STRUCTURE ,
  CHOICE , VARIABLE , WHITESPACE , LOGICAL ,
  MV_FUNCTION , VECTOR , DELAY , UNIT ,
  __SIZE
}
 
enum class  SubType {
  DEFAULT , DELAY , IF , VECTOR ,
  CN , DOUBLE , FUNCTION , LOG ,
  OPEN , PI , POWER , EXPRESSION ,
  POINTER , EXPONENTIALE , INTEGER , LOG10 ,
  MULTIPLY , OR , VECTOROPEN , COMMA ,
  DIVIDE , ENOTATION , EXP , True ,
  XOR , RATIONALE , AND , CLOSE ,
  False , MODULUS , SIN , VECTORCLOSE ,
  COS , EQ , Infinity , PLUS ,
  NaN , MINUS , NE , TAN ,
  REMAINDER , GT , SEC , CSC ,
  GE , COT , LT , LE ,
  SINH , COSH , TANH , SECH ,
  CSCH , COTH , ARCSIN , ARCCOS ,
  ARCTAN , ARCSEC , ARCCSC , ARCCOT ,
  ARCSINH , ARCCOSH , ARCTANH , ARCSECH ,
  ARCCSCH , ARCCOTH , SQRT , ABS ,
  FLOOR , CEIL , FACTORIAL , NOT ,
  RUNIFORM , RNORMAL , MAX , MIN ,
  RGAMMA , RPOISSON , SIGN , AVOGADRO ,
  INVALID , __SIZE
}
 
enum class  ValueType { Unknown , Boolean , Number , __SIZE }
 
- Public Types inherited from CCopasiNode< std::string >
typedef std::string Data
 
- Static Public Attributes inherited from CEvaluationNode
static const CEnumAnnotation< std::string, MainTypeMainTypeName
 
static const CEnumAnnotation< std::string, SubTypeSubTypeName
 
- Protected Member Functions inherited from CEvaluationNode
 CEvaluationNode (const MainType &type, const SubType &subType, const Data &data)
 
- Protected Member Functions inherited from CCopasiNode< std::string >
bool setChild (CCopasiNode< Data > *pChild)
 
bool setParent (CCopasiNode< Data > *pParent)
 
bool setSibling (CCopasiNode< Data > *pSibling)
 
- Protected Attributes inherited from CEvaluationNode
MainType mMainType
 
class CEvaluationNode::CPrecedence mPrecedence
 
const CEvaluationTreempTree
 
const C_FLOAT64mpValue
 
SubType mSubType
 
C_FLOAT64 mValue
 
ValueType mValueType
 
- Protected Attributes inherited from CCopasiNode< std::string >
Data mData
 

Detailed Description

This is class for nodes presenting numbers used in an evaluation trees

Constructor & Destructor Documentation

◆ CEvaluationNodeObject() [1/5]

CEvaluationNodeObject::CEvaluationNodeObject ( )
private

Default constructor

References CEvaluationNode::mPrecedence, and PRECEDENCE_NUMBER.

Referenced by fromAST().

◆ CEvaluationNodeObject() [2/5]

◆ CEvaluationNodeObject() [3/5]

CEvaluationNodeObject::CEvaluationNodeObject ( const C_FLOAT64 pValue)

◆ CEvaluationNodeObject() [4/5]

CEvaluationNodeObject::CEvaluationNodeObject ( const bool *  pValue)

◆ CEvaluationNodeObject() [5/5]

CEvaluationNodeObject::CEvaluationNodeObject ( const CEvaluationNodeObject src)

Copy constructor

Parameters
constCEvaluationNodeObject & src

References CEvaluationNode::mpValue.

◆ ~CEvaluationNodeObject()

CEvaluationNodeObject::~CEvaluationNodeObject ( )
virtual

Destructor

Member Function Documentation

◆ compile()

◆ fromAST()

CEvaluationNode * CEvaluationNodeObject::fromAST ( const ASTNode *  pASTNode,
const std::vector< CEvaluationNode * > &  children 
)
static

Creates a new CEvaluationNodeCall from an ASTNode and the given children

Parameters
constASTNode* pNode
conststd::vector< CEvaluationNode * > & children
Returns
CEvaluationNode * pCretedNode

References CEvaluationNode::AVOGADRO, CEvaluationNodeObject(), and CEvaluationNode::CN.

Referenced by CEvaluationTree::fromAST().

◆ getBerkeleyMadonnaString()

std::string CEvaluationNodeObject::getBerkeleyMadonnaString ( const std::vector< std::string > &  children) const
overridevirtual

Retrieve the display string of the node and its eventual child nodes in Berkeley Madonna format.

Returns
const Data & value

Reimplemented from CEvaluationNode.

References CCopasiNode< std::string >::mData.

◆ getCCodeString()

std::string CEvaluationNodeObject::getCCodeString ( const std::vector< std::string > &  children) const
overridevirtual

Retrieve the display string of the node and its eventual child nodes in C.

Returns
const Data & value

Reimplemented from CEvaluationNode.

References CCopasiNode< std::string >::mData.

◆ getData()

◆ getDisplayString()

std::string CEvaluationNodeObject::getDisplayString ( const std::vector< std::string > &  children) const
overridevirtual

Retrieve the display string of the node and its eventual child nodes.

Returns
const Data & value

Reimplemented from CEvaluationNode.

References CDataObject::getObjectDisplayName(), mpObject, and mRegisteredObjectCN.

◆ getInfix()

std::string CEvaluationNodeObject::getInfix ( const std::vector< std::string > &  children) const
overridevirtual

Retrieve the infix value of the node and its eventual child nodes.

Returns
const Data & value

Reimplemented from CEvaluationNode.

References CEvaluationNode::CN, CCopasiNode< std::string >::mData, mRegisteredObjectCN, CEvaluationNode::mSubType, and CEvaluationNode::POINTER.

◆ getMMLString()

std::string CEvaluationNodeObject::getMMLString ( const std::vector< std::string > &  children,
bool  expand,
const std::vector< std::vector< std::string > > &  variables 
) const
overridevirtual

Build the MathML string

Parameters
conststd::vector< std::string > & children
boolexpand = true
conststd::vector< std::vector< std::string > > & variables
Returns
std::string MMLString

Reimplemented from CEvaluationNode.

References CObjectInterface::DataObject(), CMathMl::getMMLName(), and mpObject.

◆ getObjectCN()

◆ getObjectInterfacePtr()

◆ getObjectValuePtr()

const C_FLOAT64 * CEvaluationNodeObject::getObjectValuePtr ( ) const

Retrieve the pointer to the value of the referred object

Returns
const C_FLOAT64 * pObjectValue

References CEvaluationNode::mpValue.

Referenced by CMathExpression::convertToInitialExpression(), and CMathContainer::copyBranch().

◆ getUnit()

CValidatedUnit CEvaluationNodeObject::getUnit ( const CMathContainer container,
const std::vector< CValidatedUnit > &  units 
) const
overridevirtual

Figure out the appropriate CUnit to use, based on the child nodes. This sets the default, appropriate for many cases, as Dimensionless

Parameters
constCMathContainer & container
conststd::vector< CUnit > & units
Returns
CUnit unit

Reimplemented from CEvaluationNode.

References CObjectInterface::getDataObject(), CMathContainer::getMathObject(), CDataObject::getUnits(), CValidatedUnit::merge(), and CEvaluationNode::mpValue.

◆ getXPPString()

std::string CEvaluationNodeObject::getXPPString ( const std::vector< std::string > &  children) const
overridevirtual

Retrieve the display string of the node and its eventual child nodes in XPPAUT format.

Returns
const Data & value

Reimplemented from CEvaluationNode.

References CCopasiNode< std::string >::mData.

◆ mapObject()

bool CEvaluationNodeObject::mapObject ( const std::string  srcCN,
const CDataContainer pTarget 
)

Map object whose CN starts with srcSN to children of the target container

Parameters
conststd::string srcCN
constCDataContainer * pTarget
Returns
bool success;

References C_FLOAT64, CObjectInterface::DataObject(), CDataContainer::getObject(), CDataObject::getValueObject(), CObjectInterface::getValuePointer(), CDataObject::hasFlag(), mpObject, CEvaluationNode::mpValue, mRegisteredObjectCN, CEvaluationNode::mValue, and CDataObject::ValueDbl.

Referenced by CEvaluationTree::mapObjectNodes().

◆ setData()

◆ setObjectValuePtr()

void CEvaluationNodeObject::setObjectValuePtr ( C_FLOAT64 pObjectValue)

◆ toAST()

Member Data Documentation

◆ mpObject

const CObjectInterface* CEvaluationNodeObject::mpObject
private

Pointer to the object

Referenced by compile(), getDisplayString(), getMMLString(), getObjectInterfacePtr(), and mapObject().

◆ mRegisteredObjectCN

CRegisteredCommonName CEvaluationNodeObject::mRegisteredObjectCN
private

The registered object name to track eventual renaming.

Referenced by CEvaluationNodeObject(), compile(), getData(), getDisplayString(), getInfix(), getObjectCN(), mapObject(), setData(), and toAST().


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