copasi API  0.1
Public Member Functions | Static Public Member Functions | Protected Attributes
CExpression Class Reference

#include <CExpression.h>

Inheritance diagram for CExpression:
CEvaluationTree CCopasiContainer CAnnotation CCopasiObject

List of all members.

Public Member Functions

 CExpression (const std::string &name="Expression", const CCopasiContainer *pParent=NULL)
 CExpression (const CExpression &src, const CCopasiContainer *pParent=NULL)
virtual ~CExpression ()
void setBooleanRequired (const bool &booleanRequired)
virtual bool setInfix (const std::string &infix)
virtual bool compile (std::vector< CCopasiContainer * > listOfContainer=CCopasiContainer::EmptyList)
virtual const C_FLOAT64 & calcValue ()
void refresh ()
void writeMathML (std::ostream &out, bool fullExpand, unsigned C_INT32 l) const
virtual const CCopasiObjectgetNodeObject (const CCopasiObjectName &CN) const
const std::vector
< CCopasiContainer * > & 
getListOfContainer () const
bool updateInfix ()
const std::string & getDisplayString () const
std::string getDisplay_C_String () const
std::string getDisplay_MMD_String () const
std::string getDisplay_XPP_String () const

Static Public Member Functions

static CExpressioncreateInitialExpression (const CExpression &expression, const CCopasiDataModel *pDataModel)

Protected Attributes

const std::vector
< CCopasiContainer * > * 
mpListOfContainer
std::string mDisplayString

Constructor & Destructor Documentation

CExpression::CExpression ( const std::string &  name = "Expression",
const CCopasiContainer pParent = NULL 
)

Default constructor

Parameters:
conststd::string & name (default: "Expression")
constCCopasiContainer * pParent (default: NULL)
CExpression::CExpression ( const CExpression src,
const CCopasiContainer pParent = NULL 
)

Copy constructor

Parameters:
const CExpression &src
constCCopasiContainer * pParent (default: NULL)
CExpression::~CExpression ( ) [virtual]

Destructor


Member Function Documentation

const C_FLOAT64 & CExpression::calcValue ( ) [virtual]

Calculates the value of the function

Returns:
const C_FLOAT64 & result
bool CExpression::compile ( std::vector< CCopasiContainer * >  listOfContainer = CCopasiContainer::EmptyList) [virtual]

Compile the evaluation tree.

Parameters:
std::vector<CCopasiContainer * > listOfContainer (Default: CCopasiContainer::EmptyList)
Returns:
bool success
CExpression * CExpression::createInitialExpression ( const CExpression expression,
const CCopasiDataModel pDataModel 
) [static]

Creates the corresponding initial expression for the given expression by converting each transient value to the corresponding initial value.

Parameters:
constCExpression & expression
Returns:
CExpression * pInitialExpression
std::string CExpression::getDisplay_C_String ( ) const

Retrieve the display string in C syntax.

std::string CExpression::getDisplay_MMD_String ( ) const

Retrieve the display string in Berkeley Madonna syntax.

std::string CExpression::getDisplay_XPP_String ( ) const

Retrieve the display string in XPPAUT syntax.

const std::string & CExpression::getDisplayString ( ) const

Retrieve the human readable display string. Note, the expression must be compiled for this return a displayable string.

Returns:
const std::string & displayString
const std::vector< CCopasiContainer * > & CExpression::getListOfContainer ( ) const

Retrieve the list of container used for compile

Returns:
const std::vector< CCopasiContainer * > & listOfContainer
const CCopasiObject * CExpression::getNodeObject ( const CCopasiObjectName CN) const [virtual]

Retrieve a pointer to the object defined by CN. This method may only be called during compile() since the list mpListOfContainer is only valid then.

Parameters:
constCCopasiObjectName & CN
Returns:
const CCopasiObject * value
void CExpression::refresh ( )

Refresh the value of the expression

void CExpression::setBooleanRequired ( const bool &  booleanRequired)

Set whether this a boolean expression or not

bool CExpression::setInfix ( const std::string &  infix) [virtual]

Set the infix description of the tree and compile it.

Parameters:
conststd::string & infix
Returns:
bool success

Reimplemented from CEvaluationTree.

bool CExpression::updateInfix ( )

This method performa an infix update if a referenced object has been renamed

Returns:
bool success
void CExpression::writeMathML ( std::ostream &  out,
bool  fullExpand,
unsigned C_INT32  l 
) const

Write display mathml of the expression into the ostream "out" level specifies indentation fullExpand==true means function calls are expanded


Member Data Documentation

std::string CExpression::mDisplayString [protected]

Human readable display string.

const std::vector< CCopasiContainer * >* CExpression::mpListOfContainer [protected]

Pointer to the list of containers used for compilation.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines