COPASI API
4.40.278
|
#include <CKinFunction.h>
Public Member Functions | |
CKinFunction (const CFunction &src, const CDataContainer *pParent, CReadConfig *configBuffer=NULL) | |
CKinFunction (const CKinFunction &src, const CDataContainer *pParent) | |
CKinFunction (const std::string &name="NoName", const CDataContainer *pParent=NO_PARENT) | |
void | cleanup () |
std::vector< CNodeK * > & | getNodes () |
~CKinFunction () | |
Public Member Functions inherited from CFunction | |
bool | addVariable (const std::string &name, CFunctionParameter::Role usage=CFunctionParameter::Role::VARIABLE, const CFunctionParameter::DataType &type=CFunctionParameter::DataType::FLOAT64) |
virtual bool | applyData (const CData &data, CUndoData::CChangeSet &changes) |
virtual const C_FLOAT64 & | calcValue (const CCallParameters< C_FLOAT64 > &callParameters) |
CFunction (const CFunction &src, const CDataContainer *pParent) | |
CFunction (const std::string &name="NoName", const CDataContainer *pParent=NO_PARENT, const Type &type=Function) | |
CFunction * | createCopy () const |
void | createListOfParametersForMathML (std::vector< std::vector< std::string > > &env) |
virtual void | createUndoData (CUndoData &undoData, const CUndoData::Type &type, const CData &oldData=CData(), const CCore::Framework &framework=CCore::Framework::ParticleNumbers) 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 |
virtual bool | isReadOnly () 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 CIssue | setInfix (const std::string &infix) |
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 CData | toData () const |
virtual std::string | writeMathML (const std::vector< std::vector< std::string > > &variables, bool expand=true, bool fullExpand=true) const |
virtual void | writeMathML (std::ostream &out, size_t l=0) const |
virtual | ~CFunction () |
Public Member Functions inherited from CEvaluationTree | |
bool | calls (std::set< std::string > &list) const |
CEvaluationTree (const CEvaluationTree &src, const CDataContainer *pParent) | |
CEvaluationTree (const std::string &name="NoName", const CDataContainer *pParent=NO_PARENT, const Type &type=Function) | |
virtual CIssue | compile () |
bool | containsCN (const DataObjectSet &elements) const |
std::string::size_type | getErrorPosition () const |
const std::string & | getInfix () const |
const std::vector< CEvaluationNode * > & | getNodeList () const |
virtual const CObjectInterface * | getNodeObject (const CCommonName &CN) const |
CEvaluationNode * | getRoot () |
const CEvaluationNode * | getRoot () const |
const CEvaluationTree::Type & | getType () const |
bool | hasCircularDependency () const |
bool | hasDiscontinuity () const |
bool | isBoolean () const |
bool | mapObjectNodes (const CDataContainer *pSrc, const CDataContainer *pTarget) |
bool | operator== (const CEvaluationTree &rhs) const |
virtual bool | setRoot (CEvaluationNode *pRootNode) |
bool | setTree (const ASTNode &pRootNode, bool isFunction) |
size_t | size () const |
virtual ASTNode * | toAST (const CDataModel *pDataModel) const |
CIssue | updateTree () |
virtual | ~CEvaluationTree () |
Public Member Functions inherited from CDataContainer | |
virtual bool | add (CDataObject *pObject, const bool &adopt=true) |
virtual bool | appendDeletedDependentData (CUndoData &undoData) const |
CDataContainer (const CDataContainer &src, const CDataContainer *pParent) | |
CDataContainer (const std::string &name, const CDataContainer *pParent=NO_PARENT, const std::string &type="CN", const CFlags< Flag > &flag=CFlags< Flag >::None) | |
virtual std::string | getChildObjectUnits (const CDataObject *pObject) const |
void | getDescendants (CDataObject::DataObjectSet &descendants, const bool &recursive=false) const |
virtual size_t | getIndex (const CDataObject *pObject) const |
virtual const CObjectInterface * | getObject (const CCommonName &cn) const override |
virtual objectMap & | getObjects () |
virtual const objectMap & | getObjects () const |
virtual const std::string | getUnits () const override |
virtual const CDataObject * | getValueObject () const override |
virtual CUndoObjectInterface * | insert (const CData &data) override |
void | objectRenamed (CDataObject *pObject, const std::string &oldName) |
virtual bool | remove (CDataObject *pObject) |
virtual | ~CDataContainer () |
Public Member Functions inherited from CDataObject | |
void | addIssue (const CIssue &issue) |
void | addReference (const CDataContainer *pReference) |
virtual void | calculateValue () override |
CDataObject (const CDataObject &src, const CDataContainer *pParent=NULL) | |
virtual void | destruct () override |
virtual CCommonName | getCN () const override |
virtual const CDataObject * | getDataObject () const override |
CDataContainer * | getObjectAncestor (const std::string &type) const |
CDataModel * | getObjectDataModel () const |
virtual std::string | getObjectDisplayName () const override |
const CObjectInterface * | getObjectFromCN (const CCommonName &cn) const |
const std::string & | getObjectName () const |
CDataContainer * | getObjectParent () const |
const std::string & | getObjectType () const |
virtual const CObjectInterface::ObjectSet & | getPrerequisites () const override |
virtual const CValidity & | getValidity () const override |
virtual void * | getValuePointer () const override |
bool | hasFlag (const Flag &flag) const |
virtual bool | isPrerequisiteForContext (const CObjectInterface *pObject, const CCore::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects) const override |
bool | prerequisitsContains (const DataObjectSet &objects) const |
virtual void | print (std::ostream *ostream) const override |
void | removeIssue (const CIssue &issue) |
void | removeReference (const CDataContainer *pReference) |
bool | setObjectName (const std::string &name) |
virtual bool | setObjectParent (const CDataContainer *pParent) |
void | validityChanged (const CValidity &changedValidity) override |
void | validityRemoved (const CValidity &changedValidity) |
virtual | ~CDataObject () |
Public Member Functions inherited from CObjectInterface | |
CObjectInterface () | |
CObjectInterface (const CObjectInterface &src) | |
virtual | ~CObjectInterface () |
Public Member Functions inherited from CUndoObjectInterface | |
CUndoObjectInterface () | |
CUndoObjectInterface (const CUndoObjectInterface &src) | |
bool | generateUuid () |
const xg::Guid & | getUuid () const |
bool | setUuid (const std::string &uuid) |
bool | setUuid (const xg::Guid &uuid) |
virtual void | updateIndex (const size_t &index, const CUndoObjectInterface *pUndoObject) |
virtual | ~CUndoObjectInterface () |
Public Member Functions inherited from CAnnotation | |
bool | addUnsupportedAnnotation (const std::string &name, const std::string &xml) |
bool | applyData (const CData &data, CUndoData::CChangeSet &changes) |
CAnnotation () | |
CAnnotation (const CAnnotation &src) | |
void | createUndoData (CUndoData &undoData, const CUndoData::Type &type, const CData &oldData=CData(), const CCore::Framework &framework=CCore::Framework::ParticleNumbers) const |
const std::string & | getMiriamAnnotation () const |
const std::string & | getNotes () const |
UnsupportedAnnotation & | getUnsupportedAnnotations () |
const UnsupportedAnnotation & | getUnsupportedAnnotations () const |
void | initMiriamAnnotation (const std::string &newId) |
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) |
CData | toData () const |
virtual | ~CAnnotation () |
Protected Member Functions | |
CKinFunction (const CFunction &src) | |
Protected Member Functions inherited from CFunction | |
CFunction (const CFunction &src) | |
CIssue | initVariables () |
Protected Member Functions inherited from CEvaluationTree | |
void | buildCalculationSequence () |
void | calculate () |
CEvaluationTree (const CEvaluationTree &src) | |
void | clearNodes () |
CIssue | compileNodes () |
CIssue | parse () |
void | setType (const CEvaluationTree::Type &type) |
Protected Member Functions inherited from CDataContainer | |
template<class CType > | |
CDataMatrixReference< CType > * | addMatrixReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None) |
template<class CType > | |
CDataObjectReference< CType > * | addObjectReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None) |
template<class CType > | |
CDataVectorReference< CType > * | addVectorReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None) |
CDataContainer (const CDataContainer &src) | |
void | initObjects () |
Protected Member Functions inherited from CDataObject | |
CDataObject () | |
CDataObject (const std::string &name, const CDataContainer *pParent=static_cast< CDataContainer * >((void *) 0), const std::string &type="CN", const CFlags< Flag > &flag=CFlags< Flag >::None) | |
Private Member Functions | |
void | cleanupNodes () |
void | createParameters () |
Private Attributes | |
unsigned C_INT32 | mNidx |
std::vector< CNodeK * > | mNodes |
std::vector< CDataObject * > | ObjList |
Additional Inherited Members | |
Public Types inherited from CEvaluationTree | |
enum | Type { Function = 0 , MassAction , PreDefined , UserDefined , Expression , MathExpression } |
Public Types inherited from CDataContainer | |
typedef CDataObjectMap | objectMap |
Public Types inherited from CDataObject | |
typedef std::set< const CDataObject * > | DataObjectSet |
enum | Flag { Container , Vector , Matrix , NameVector , Reference , ValueBool , ValueInt , ValueInt64 , ValueDbl , NonUniqueName , StaticString , ValueString , Separator , DisplayName , ModelEntity , Array , DataModel , Root , Gui , __SIZE } |
Public Types inherited from CObjectInterface | |
typedef std::vector< const CDataContainer * > | ContainerList |
typedef std::set< const CObjectInterface * > | ObjectSet |
Public Types inherited from CAnnotation | |
typedef std::map< std::string, std::string > | UnsupportedAnnotation |
Static Public Member Functions inherited from CFunction | |
static bool | completeFunctionList (std::vector< const CFunction * > &list, const size_t &added=0) |
static CFunction * | fromData (const CData &data, CUndoObjectInterface *pParent) |
Static Public Member Functions inherited from CEvaluationTree | |
static CEvaluationTree * | copy (const CEvaluationTree &src) |
static CEvaluationTree * | create (CEvaluationTree::Type type) |
static CEvaluationNode * | fromAST (const ASTNode *pASTNode, bool isFunction) |
static CEvaluationTree * | fromData (const CData &data, CUndoObjectInterface *pParent) |
Static Public Member Functions inherited from CDataContainer | |
static CDataContainer * | fromData (const CData &data, CUndoObjectInterface *pParent) |
Static Public Member Functions inherited from CDataObject | |
static CDataObject * | fromData (const CData &data, CUndoObjectInterface *pParent) |
static void | sanitizeObjectName (std::string &name) |
Static Public Member Functions inherited from CObjectInterface | |
static const CDataObject * | DataObject (const CObjectInterface *pInterface) |
static CObjectInterface * | GetObjectFromCN (const ContainerList &listOfContainer, const CCommonName &objName) |
Static Public Member Functions inherited from CUndoObjectInterface | |
template<class CType > | |
static CType * | fromData (const CData &, CUndoObjectInterface *) |
Static Public Member Functions inherited from CAnnotation | |
static CMIRIAMInfo * | allocateMiriamInfo (CDataContainer *pParent) |
static CAnnotation * | castObject (CDataObject *pObject) |
static const CAnnotation * | castObject (const CDataObject *pObject) |
static void | freeMiriamInfo (CDataContainer *pParent) |
Static Public Attributes inherited from CEvaluationTree | |
static const std::string | TypeName [] |
static const char * | XMLType [] |
Static Public Attributes inherited from CDataContainer | |
static const CObjectInterface::ContainerList | EmptyList |
Protected Attributes inherited from CEvaluationTree | |
CVector< CEvaluationNode * > | mCalculationSequence |
std::string | mInfix |
std::vector< CEvaluationNode * > * | mpNodeList |
const C_FLOAT64 * | mpRootValue |
CEvaluationTree::Type | mType |
C_FLOAT64 | mValue |
Protected Attributes inherited from CDataContainer | |
objectMap | mObjects |
Protected Attributes inherited from CDataObject | |
ObjectSet | mPrerequisits |
std::set< CDataContainer * > | mReferences |
Protected Attributes inherited from CObjectInterface | |
CValidity | mValidity |
Protected Attributes inherited from CAnnotation | |
std::string | mKey |
|
protected |
CKinFunction::CKinFunction | ( | const std::string & | name = "NoName" , |
const CDataContainer * | pParent = NO_PARENT |
||
) |
Default constructor
const | std::string & name (default: "NoName") |
const | CDataContainer * pParent (default: NULL) |
References CONSTRUCTOR_TRACE.
CKinFunction::CKinFunction | ( | const CFunction & | src, |
const CDataContainer * | pParent, | ||
CReadConfig * | configBuffer = NULL |
||
) |
Copy constructor
const CFunction & | src |
const | CDataContainer * pParent |
CReadConfig * | configBuffer (Default = NULL) |
References C_INT32, cleanupNodes(), CONSTRUCTOR_TRACE, createParameters(), CReadConfig::getVariable(), and mNodes.
CKinFunction::CKinFunction | ( | const CKinFunction & | src, |
const CDataContainer * | pParent | ||
) |
Copy constructor
const CKinFunction & | src |
const | CDataContainer * pParent (default: NULL) |
References CONSTRUCTOR_TRACE.
CKinFunction::~CKinFunction | ( | ) |
Destructor
References cleanup(), DESTRUCTOR_TRACE, and ObjList.
void CKinFunction::cleanup | ( | ) |
|
private |
|
private |
This function creates the parameter description for older file versions
References CFunctionParameters::add(), CDataVectorN< CType >::add(), C_INVALID_INDEX, CDataVector< CType >::cleanup(), CFunctionParameters::cleanup(), CEvaluationNode::CONSTANT, fatalError, CFunctionParameter::FLOAT64, CDataVectorN< CType >::getIndex(), CDataObject::getObjectName(), CEvaluationTree::getRoot(), CEvaluationTree::getType(), CFunction::getVariables(), mNodes, CFunctionParameter::MODIFIER, CEvaluationTree::mpNodeList, 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(), CDataVector< CType >::size(), CFunctionParameter::SUBSTRATE, and CFunctionParameter::VOLUME.
Referenced by CKinFunction().
std::vector< CNodeK * > & CKinFunction::getNodes | ( | ) |
Retrieves the nodes of the function
References mNodes.
|
private |
Internal variable
|
private |
The vector of nodes of the binary tree of the function @supplierCardinality 0..* @associates <{CNodeK}>
Referenced by CKinFunction(), cleanupNodes(), createParameters(), and getNodes().
|
private |
Referenced by ~CKinFunction().