COPASI API
4.16.103
|
#include <CKinFunction.h>
Public Member Functions | |
CKinFunction (const std::string &name="NoName", const CCopasiContainer *pParent=NULL) | |
CKinFunction (const CFunction &src, CReadConfig *configBuffer=NULL, const CCopasiContainer *pParent=NULL) | |
CKinFunction (const CKinFunction &src, const CCopasiContainer *pParent=NULL) | |
void | cleanup () |
std::vector< CNodeK * > & | getNodes () |
~CKinFunction () | |
![]() | |
bool | addVariable (const std::string &name, CFunctionParameter::Role usage=CFunctionParameter::VARIABLE, const CFunctionParameter::DataType &type=CFunctionParameter::FLOAT64) |
virtual const C_FLOAT64 & | calcValue (const CCallParameters< C_FLOAT64 > &callParameters) |
CFunction (const std::string &name="NoName", const CCopasiContainer *pParent=NULL, const Type &type=Function) | |
CFunction (const CFunction &src, const CCopasiContainer *pParent=NULL) | |
CFunction * | createCopy () const |
void | createListOfParametersForMathML (std::vector< std::vector< std::string > > &env) |
virtual bool | dependsOn (const C_FLOAT64 *parameter, const CCallParameters< C_FLOAT64 > &callParameters) const |
const std::string & | getKey () const |
const std::string & | getSBMLId () const |
virtual size_t | getVariableIndex (const std::string &name) const |
CFunctionParameters & | getVariables () |
const CFunctionParameters & | getVariables () const |
virtual const C_FLOAT64 & | getVariableValue (const size_t &index) const |
const TriLogic & | isReversible () const |
bool | isSuitable (const size_t noSubstrates, const size_t noProducts, const TriLogic reversible) |
virtual void | load (CReadConfig &configBuffer, CReadConfig::Mode mode=CReadConfig::SEARCH) |
bool | operator== (const CFunction &rhs) const |
virtual bool | setInfix (const std::string &infix) |
virtual bool | setInfix (const std::string &infix, bool compile) |
void | setReversible (const TriLogic &reversible) |
void | setSBMLId (const std::string &id) |
std::pair< CFunction *, CFunction * > | splitFunction (const CEvaluationNode *node, const std::string &name1, const std::string &name2) const |
virtual void | writeMathML (std::ostream &out, size_t l=0) const |
virtual std::string | writeMathML (const std::vector< std::vector< std::string > > &variables, bool expand=true, bool fullExpand=true) const |
virtual | ~CFunction () |
![]() | |
bool | calls (std::set< std::string > &list) const |
CEvaluationTree (const std::string &name="NoName", const CCopasiContainer *pParent=NULL, const Type &type=Function) | |
CEvaluationTree (const CEvaluationTree &src, const CCopasiContainer *pParent=NULL) | |
virtual bool | compile () |
bool | dependsOnTree (const std::string &name) const |
CCopasiObject::DataObjectSet | getDeletedObjects () const |
std::string::size_type | getErrorPosition () const |
const std::string & | getInfix () const |
const std::vector < CEvaluationNode * > & | getNodeList () const |
CEvaluationNode * | getRoot () |
const CEvaluationNode * | getRoot () const |
const CEvaluationTree::Type & | getType () const |
bool | hasCircularDependency () const |
bool | hasDiscontinuity () const |
bool | isBoolean () const |
bool | isUsable () const |
bool | operator== (const CEvaluationTree &rhs) const |
virtual bool | setRoot (CEvaluationNode *pRootNode) |
bool | setTree (const ASTNode &pRootNode) |
virtual ASTNode * | toAST (const CCopasiDataModel *pDataModel) const |
bool | updateTree () |
virtual | ~CEvaluationTree () |
![]() | |
virtual bool | add (CCopasiObject *pObject, const bool &adopt=true) |
CCopasiContainer (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=CCopasiObject::Container) | |
CCopasiContainer (const CCopasiContainer &src, const CCopasiContainer *pParent=NULL) | |
virtual std::string | getChildObjectUnits (const CCopasiObject *pObject) const |
virtual const CObjectInterface * | getObject (const CCopasiObjectName &cn) const |
virtual const objectMap & | getObjects () const |
virtual std::string | getUnits () const |
virtual const CCopasiObject * | getValueObject () const |
virtual bool | remove (CCopasiObject *pObject) |
virtual | ~CCopasiContainer () |
![]() | |
void | addDirectDependency (const CCopasiObject *pObject) |
CCopasiObject (const CCopasiObject &src, const CCopasiContainer *pParent=NULL) | |
void | clearDirectDependencies () |
void | clearRefresh () |
bool | dependsOn (DataObjectSet candidates, const DataObjectSet &context=DataObjectSet()) const |
void | getAllDependencies (DataObjectSet &dependencies, const DataObjectSet &context) const |
virtual CCopasiObjectName | getCN () const |
virtual const DataObjectSet & | getDirectDependencies (const DataObjectSet &context=DataObjectSet()) const |
CCopasiContainer * | getObjectAncestor (const std::string &type) const |
CCopasiDataModel * | getObjectDataModel () |
const CCopasiDataModel * | getObjectDataModel () const |
virtual std::string | getObjectDisplayName (bool regular=true, bool richtext=false) const |
const std::string & | getObjectName () const |
CCopasiContainer * | getObjectParent () const |
const std::string & | getObjectType () const |
virtual const CObjectInterface::ObjectSet & | getPrerequisites () const |
virtual Refresh * | getRefresh () const |
UpdateMethod * | getUpdateMethod () const |
virtual void * | getValuePointer () const |
bool | hasCircularDependencies (DataObjectSet &candidates, DataObjectSet &verified, const DataObjectSet &context) const |
bool | hasUpdateMethod () const |
bool | isArray () const |
bool | isContainer () const |
bool | isDataModel () const |
bool | isMatrix () const |
bool | isNameVector () const |
bool | isNonUniqueName () const |
virtual bool | isPrerequisiteForContext (const CObjectInterface *pObject, const CMath::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects) const |
bool | isReference () const |
bool | isRoot () const |
bool | isSeparator () const |
bool | isStaticString () const |
bool | isValueBool () const |
bool | isValueDbl () const |
bool | isValueInt () const |
bool | isValueInt64 () const |
bool | isValueString () const |
bool | isVector () const |
virtual bool | mustBeDeleted (const DataObjectSet &deletedObjects) const |
virtual void | print (std::ostream *ostream) const |
void | removeDirectDependency (const CCopasiObject *pObject) |
void | setDirectDependencies (const DataObjectSet &directDependencies) |
bool | setObjectName (const std::string &name) |
virtual bool | setObjectParent (const CCopasiContainer *pParent) |
void | setObjectValue (const C_FLOAT64 &value) |
void | setObjectValue (const C_INT32 &value) |
void | setObjectValue (const bool &value) |
template<class CType > | |
void | setRefresh (CType *pType, void(CType::*method)(void)) |
template<class CType > | |
void | setUpdateMethod (CType *pType, void(CType::*method)(const C_FLOAT64 &)) |
template<class CType > | |
void | setUpdateMethod (CType *pType, void(CType::*method)(const C_INT32 &)) |
template<class CType > | |
void | setUpdateMethod (CType *pType, void(CType::*method)(const bool &)) |
virtual | ~CCopasiObject () |
![]() | |
CObjectInterface () | |
virtual | ~CObjectInterface () |
![]() | |
bool | addUnsupportedAnnotation (const std::string &name, const std::string &xml) |
CAnnotation () | |
CAnnotation (const CAnnotation &src) | |
const std::string & | getMiriamAnnotation () const |
const std::string & | getNotes () const |
UnsupportedAnnotation & | getUnsupportedAnnotations () |
const UnsupportedAnnotation & | getUnsupportedAnnotations () const |
bool | operator== (const CAnnotation &rhs) const |
bool | removeUnsupportedAnnotation (const std::string &name) |
bool | replaceUnsupportedAnnotation (const std::string &name, const std::string &xml) |
void | setMiriamAnnotation (const std::string &miriamAnnotation, const std::string &newId, const std::string &oldId) |
void | setNotes (const std::string ¬es) |
virtual | ~CAnnotation () |
Private Member Functions | |
void | cleanupNodes () |
void | createParameters () |
Private Attributes | |
unsigned C_INT32 | mNidx |
std::vector< CNodeK * > | mNodes |
std::vector< CCopasiObject * > | ObjList |
Additional Inherited Members | |
![]() | |
enum | Type { Function = 0, MassAction, PreDefined, UserDefined, Expression, MathExpression } |
![]() | |
typedef std::multimap < std::string, CCopasiObject * > | objectMap |
![]() | |
typedef std::set< const CCopasiObject * > | DataObjectSet |
typedef std::vector< Refresh * > | DataUpdateSequence |
![]() | |
typedef std::set< const CObjectInterface * > | ObjectSet |
typedef std::vector < CObjectInterface * > | UpdateSequence |
![]() | |
typedef std::map< std::string, std::string > | UnsupportedAnnotation |
![]() | |
static bool | completeFunctionList (std::vector< CFunction * > &list, const size_t &added=0) |
![]() | |
static CEvaluationTree * | copy (const CEvaluationTree &src) |
static CEvaluationTree * | create (CEvaluationTree::Type type) |
static CEvaluationNode * | fromAST (const ASTNode *pASTNode) |
![]() | |
static std::vector< Refresh * > | buildUpdateSequence (const DataObjectSet &objects, const DataObjectSet &uptoDateObjects, const DataObjectSet &context=DataObjectSet()) |
static void | setRenameHandler (CRenameHandler *rh) |
![]() | |
static CAnnotation * | castObject (CCopasiObject *pObject) |
static const CAnnotation * | castObject (const CCopasiObject *pObject) |
![]() | |
static const std::string | TypeName [] |
static const char * | XMLType [] |
![]() | |
static const std::vector < CCopasiContainer * > | EmptyList |
![]() | |
enum | Flag { Container = 0x1, Vector = 0x2, Matrix = 0x4, NameVector = 0x8, Reference = 0x10, ValueBool = 0x20, ValueInt = 0x40, ValueInt64 = 0x80, ValueDbl = 0x100, NonUniqueName = 0x200, StaticString = 0x400, ValueString = 0x800, Separator = 0x1000, ModelEntity = 0x2000, Array = 0x4000, DataModel = 0x8000, Root = 0x10000, Gui = 0x20000 } |
![]() | |
bool | initVariables () |
![]() | |
void | buildCalculationSequence () |
void | calculate () |
bool | compileNodes () |
bool | parse () |
void | setType (const CEvaluationTree::Type &type) |
![]() | |
template<class CType > | |
CCopasiObject * | addMatrixReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0) |
template<class CType > | |
CCopasiObject * | addObjectReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0) |
template<class CType > | |
CCopasiObject * | addVectorReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0) |
void | initObjects () |
![]() | |
CCopasiObject () | |
CCopasiObject (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=0) | |
![]() | |
std::vector< CEvaluationNode * > | mCalculationSequence |
std::string | mInfix |
std::vector< CEvaluationNode * > * | mpNodeList |
CEvaluationNode * | mpRoot |
CEvaluationTree::Type | mType |
bool | mUsable |
C_FLOAT64 | mValue |
![]() | |
objectMap | mObjects |
![]() | |
std::string | mKey |
![]() | |
static CRenameHandler * | smpRenameHandler = NULL |
Definition at line 37 of file CKinFunction.h.
CKinFunction::CKinFunction | ( | const std::string & | name = "NoName" , |
const CCopasiContainer * | pParent = NULL |
||
) |
Default constructor
const | std::string & name (default: "NoName") |
const | CCopasiContainer * pParent (default: NULL) |
Definition at line 38 of file CKinFunction.cpp.
References CONSTRUCTOR_TRACE.
CKinFunction::CKinFunction | ( | const CFunction & | src, |
CReadConfig * | configBuffer = NULL , |
||
const CCopasiContainer * | pParent = NULL |
||
) |
Copy constructor
const CFunction & | src |
CReadConfig * | configBuffer (Default = NULL) |
const | CCopasiContainer * pParent (default: NULL) |
Definition at line 45 of file CKinFunction.cpp.
References C_INT32, cleanupNodes(), CONSTRUCTOR_TRACE, createParameters(), CReadConfig::getVariable(), and mNodes.
CKinFunction::CKinFunction | ( | const CKinFunction & | src, |
const CCopasiContainer * | pParent = NULL |
||
) |
Copy constructor
const CKinFunction & | src |
const | CCopasiContainer * pParent (default: NULL) |
Definition at line 72 of file CKinFunction.cpp.
References CONSTRUCTOR_TRACE.
CKinFunction::~CKinFunction | ( | ) |
Destructor
Definition at line 80 of file CKinFunction.cpp.
References cleanup(), DESTRUCTOR_TRACE, and ObjList.
void CKinFunction::cleanup | ( | ) |
Cleanup
Definition at line 91 of file CKinFunction.cpp.
References cleanupNodes().
Referenced by ~CKinFunction().
|
private |
Cleanup nodes
Definition at line 248 of file CKinFunction.cpp.
References mNodes.
Referenced by CKinFunction(), and cleanup().
|
private |
This function indentify the object from name This connects the nodes to build the binary function tree This function is part of the algorithm that builds the binary tree. The expression to the right of the current node (mNidx) is parsed until an operand with a left priority <= the argument (right priority) is encounterd. The pointer to the top node of the parsed expression is returned.
C_INT16 | priority |
Definition at line 97 of file CKinFunction.cpp.
References CFunctionParameters::add(), CCopasiVectorN< CType >::add(), CEvaluationNode::buildInfix(), C_INVALID_INDEX, CFunctionParameters::cleanup(), CCopasiVector< T >::cleanup(), CEvaluationNode::CONSTANT, fatalError, CFunctionParameter::FLOAT64, CCopasiVectorN< CType >::getIndex(), CCopasiObject::getObjectName(), CEvaluationTree::getType(), CFunction::getVariables(), mNodes, CFunctionParameter::MODIFIER, CEvaluationTree::mpNodeList, CEvaluationTree::mpRoot, N_IDENTIFIER, N_KCONSTANT, N_MODIFIER, N_NOP, N_PRODUCT, N_SUBSTRATE, N_VOLUME, CFunctionParameter::PARAMETER, pdelete, CFunctionParameter::PRODUCT, CFunction::setInfix(), CFunctionParameter::setType(), CFunctionParameter::setUsage(), CCopasiVector< T >::size(), CFunctionParameter::SUBSTRATE, and CFunctionParameter::VOLUME.
Referenced by CKinFunction().
std::vector< CNodeK * > & CKinFunction::getNodes | ( | ) |
Retreives the nodes of the function
Definition at line 246 of file CKinFunction.cpp.
References mNodes.
|
private |
Internal variable
Definition at line 52 of file CKinFunction.h.
|
private |
The vector of nodes of the binary tree of the function 0..* <{CNodeK}>
Definition at line 46 of file CKinFunction.h.
Referenced by CKinFunction(), cleanupNodes(), createParameters(), and getNodes().
|
private |
Definition at line 48 of file CKinFunction.h.
Referenced by ~CKinFunction().