COPASI API
4.40.278
|
#include <CCopasiNode.h>
Public Types | |
typedef _Data | Data |
Public Member Functions | |
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 Data & | getData () |
virtual const Data & | getData () const |
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 () |
Protected Member Functions | |
bool | setChild (CCopasiNode< Data > *pChild) |
bool | setParent (CCopasiNode< Data > *pParent) |
bool | setSibling (CCopasiNode< Data > *pSibling) |
Protected Attributes | |
Data | mData |
Private Member Functions | |
bool | removeSibling (CCopasiNode< Data > *pSibling) |
Private Attributes | |
CCopasiNode< Data > * | mpChild |
CCopasiNode< Data > * | mpParent |
CCopasiNode< Data > * | mpSibling |
CCopasiNode class. The class CCopasiNode is describes a node of the CCopasiTree.
Created for COPASI by Stefan Hoops 2003 The class CCopasiNode is the interface used by the template class CCopasiTree< class Node> to manage the nodes of a tree. Actual implementation of nodes must be derived from CCopasiNode for the tree to operate properly.
typedef _Data CCopasiNode< _Data >::Data |
|
inline |
Default constructor.
CCopasiNode< | Data > * pParent (default: NULL) |
|
inline |
Copy constructor.
const | CCopasiNode< Data > & src |
|
inline |
Specific constructor.
const | Data & data |
CCopasiNode< | Data > * pParent (default: NULL) |
|
inlinevirtual |
Destructor. Note: Within a tree the parent of this node has to be corrected.
References CCopasiNode< _Data >::deleteChildren(), and CCopasiNode< _Data >::mpParent.
|
inlinevirtual |
Add a child to a node. If pAfter == this the child will be inserted at the front of the list of children.
CCopasiNode< | Data > * pChild |
CCopasiNode< | Data > * pAfter (default: NULL appended to the list of children) |
References CCopasiNode< _Data >::mpChild, and CCopasiNode< _Data >::setSibling().
Referenced by CDerive::add(), CEvaluationNodeVector::addChild(), CEvaluationNodeCall::addChild(), CModelVersionHierarchy::addChild(), CCellDesignerImporter::addDependency(), CODEExporter::assembleSubTreeForMassAction(), CMathExpression::CMathExpression(), CMathEvent::CTrigger::CRootProcessor::compile(), CMathEvent::CTrigger::compileAND(), CMathEvent::CTrigger::compileEQ(), CMathEvent::CTrigger::compileLE(), CMathEvent::CTrigger::compileNE(), CMathEvent::CTrigger::compileNOT(), CEvaluationNode::copyNode(), CSBMLExporter::createMassActionExpression(), CMathExpression::createMassActionPart(), CDerive::deriveBranch(), CDerive::divide(), SBMLImporter::divideByObject(), CODEExporter::exportSingleFunction(), CEvaluationNodeChoice::fromAST(), CEvaluationNodeDelay::fromAST(), CEvaluationNodeFunction::fromAST(), CEvaluationNodeLogical::fromAST(), CEvaluationNodeNumber::fromAST(), CEvaluationNodeOperator::fromAST(), CODEExporter::modifyTreeForMassAction(), CDerive::multiply(), CSBMLExporter::multiplyByObject(), CDerive::power(), CModel::prepareElasticity(), CSBMLExporter::replaceSpeciesReferences(), CEvaluationTree::setTree(), CEvaluationNodeFunction::simplifyNode(), CEvaluationNodeOperator::simplifyNode(), CDerive::subtract(), CEvaluationNodeCall::toAST(), CEvaluationNodeDelay::toAST(), CEvaluationNodeFunction::toAST(), CEvaluationNodeLogical::toAST(), CEvaluationNodeOperator::toAST(), CReaction::variables2objects(), and SBMLImporter::variables2objects().
|
inline |
Add a sibling to a node. If pAfter == this the sibling will be inserted at the front of the list of siblings.
CCopasiNode< | Data > * pSibling |
CCopasiNode< | Data > * pAfter (default: NULL appended to the list of siblings) |
References CCopasiNode< _Data >::addSibling(), CCopasiNode< _Data >::getSibling(), CCopasiNode< _Data >::mpParent, CCopasiNode< _Data >::mpSibling, CCopasiNode< _Data >::setParent(), and CCopasiNode< _Data >::setSibling().
Referenced by CCopasiNode< _Data >::addSibling().
|
inline |
Delete all children of the node
References CCopasiNode< _Data >::mpChild.
Referenced by CCopasiNode< _Data >::~CCopasiNode().
|
inline |
Retrieve the child of a node.
References CCopasiNode< _Data >::mpChild.
Referenced by CModelVersionHierarchy::addChild(), CCellDesignerImporter::addDependency(), SBMLImporter::areEqualSubtrees(), CSBMLExporter::checkForPiecewiseFunctions(), CSBMLExporter::checkForUnsupportedFunctionCalls(), CMathEvent::CTrigger::compileEQ(), CDerive::compileTree(), CMathEvent::CTrigger::countRootsEQ(), SBMLImporter::createCReactionFromReaction(), CMathContainer::createDiscontinuityTriggerInfix(), CEvaluationNodeOperator::createModuloTree(), CModelVersionHierarchy::deleteVersion(), SBMLImporter::divideByObject(), SBMLImporter::doMapping(), CSBMLExporter::findDirectlyUsedFunctions(), CSBMLExporter::findModelEntityDependencies(), CCopasiNode< _Data >::getChild(), CEvaluationNodeFunction::getMMLString(), CCopasiNode< _Data >::getNumChildren(), SBMLImporter::isConstantFlux(), SBMLImporter::isMassAction(), SBMLImporter::isMassActionExpression(), SBMLImporter::isSimpleFunctionCall(), CSBMLExporter::multiplyByObject(), CEvaluationNode::operator<(), SBMLImporter::renameMassActionParameters(), CSBMLExporter::replaceSpeciesReferences(), SBMLImporter::separateProductArguments(), SBMLImporter::setCorrectUsage(), CSBMLExporter::setFunctionSBMLIds(), CEvaluationNodeOperator::setUnit(), CEvaluationNodeFunction::simplifyNode(), CEvaluationNodeOperator::simplifyNode(), CReaction::variables2objects(), and SBMLImporter::variables2objects().
|
inline |
Retrieve the child of a node.
References CCopasiNode< _Data >::mpChild.
|
inline |
Retrieve the child with given index of a node. If index is out of range NULL is returned.
References CCopasiNode< _Data >::getChild(), and CCopasiNode< _Data >::getSibling().
|
inline |
Retrieve the child with given index of a node. If index is out of range NULL is returned.
References CCopasiNode< _Data >::getChild(), and CCopasiNode< _Data >::getSibling().
|
inlinevirtual |
|
inlinevirtual |
Retrieve the data of the Node.
Reimplemented in CEvaluationNodeObject, and CEvaluationNodeCall.
References CCopasiNode< _Data >::mData.
Referenced by CModelVersionHierarchy::addChild(), CCellDesignerImporter::addDependency(), CModelVersionHierarchy::addVersion(), SBMLImporter::areEqualSubtrees(), CSBMLExporter::checkForUnsupportedFunctionCalls(), CModelVersionHierarchy::CModelVersionHierarchy(), CMathEvent::CTrigger::compileVARIABLE(), SBMLImporter::createCReactionFromReaction(), CCellDesignerImporter::createSpeciesStyles(), CModelVersionHierarchy::deleteVersion(), SBMLImporter::findCorrespondingFunction(), CSBMLExporter::findDirectlyUsedFunctions(), CModelVersionHierarchy::getCurrentVersion(), CModelVersionHierarchy::getVersionDirectory(), SBMLImporter::isConstantFlux(), SBMLImporter::isMassAction(), SBMLImporter::isMassActionExpression(), CEvaluationNode::operator<(), CModelVersionHierarchy::readVersionXML(), CSBMLExporter::replaceSpeciesReferences(), CModelVersionHierarchy::restoreVersion(), CEvaluationNodeFunction::simplifyNode(), CEvaluationNodeOperator::simplifyNode(), CModelVersionHierarchy::updateVersionXML(), CReaction::variable2object(), CReaction::variables2objects(), and SBMLImporter::variables2objects().
|
inline |
Retrieve a pointer to the next node, which is either a child, a sibling, or an ancestor. The nodes are evaluated in that order and the first non NULL pointer is returned. If all evaluate to NULL, NULL will be returned.
References CCopasiNode< _Data >::getNextNonChild(), and CCopasiNode< _Data >::mpChild.
Referenced by CCellDesignerImporter::addDependency(), and CCellDesignerImporter::createSpeciesStyles().
|
inline |
Retrieve a pointer to the next node, which is either a child, a sibling, or an ancestor. The nodes are evaluated in that order and the first non NULL pointer is returned. If all evaluate to NULL, NULL will be returned.
References CCopasiNode< _Data >::getNextNonChild(), and CCopasiNode< _Data >::mpChild.
|
inline |
Retrieve a pointer to the next node, which is not a child node This is either a sibling or an ancestor. The nodes are evaluated in that order and the first non NULL pointer is returned. If all evaluate to NULL, NULL will be returned.
References CCopasiNode< _Data >::mpParent, and CCopasiNode< _Data >::mpSibling.
Referenced by CCopasiNode< _Data >::getNext().
|
inline |
Retrieve a pointer to the next node, which is not a child node This is either a sibling or an ancestor. The nodes are evaluated in that order and the first non NULL pointer is returned. If all evaluate to NULL, NULL will be returned.
References CCopasiNode< _Data >::mpParent, and CCopasiNode< _Data >::mpSibling.
|
inline |
Retrieve the number of children
References CCopasiNode< _Data >::getChild(), and CCopasiNode< _Data >::getSibling().
|
inline |
Retrieve the parent of a Node.
References CCopasiNode< _Data >::mpParent.
Referenced by CDerive::deleteBranch(), CModelVersionHierarchy::deleteVersion(), CEvaluationNode::getTree(), and CEvaluationTree::setRoot().
|
inline |
Retrieve the parent of a Node.
References CCopasiNode< _Data >::mpParent.
|
inline |
Retrieve the sibling of a node.
References CCopasiNode< _Data >::mpSibling.
Referenced by CModelVersionHierarchy::addChild(), CCellDesignerImporter::addDependency(), CCopasiNode< _Data >::addSibling(), CMathObject::appendDelays(), SBMLImporter::areEqualSubtrees(), CSBMLExporter::checkForPiecewiseFunctions(), CSBMLExporter::checkForUnsupportedFunctionCalls(), CEvaluationNodeChoice::compile(), CEvaluationNodeDelay::compile(), CEvaluationNodeFunction::compile(), CEvaluationNodeLogical::compile(), CEvaluationNodeOperator::compile(), CDerive::compileTree(), SBMLImporter::createCReactionFromReaction(), CEvaluationNodeOperator::createModuloTree(), SBMLImporter::divideByObject(), SBMLImporter::doMapping(), CSBMLExporter::findDirectlyUsedFunctions(), CSBMLExporter::findModelEntityDependencies(), CCopasiNode< _Data >::getChild(), CCopasiNode< _Data >::getNumChildren(), SBMLImporter::isMassAction(), SBMLImporter::isMassActionExpression(), SBMLImporter::isSimpleFunctionCall(), CEvaluationNode::operator<(), CEvaluationNode::printRecursively(), CCopasiNode< _Data >::removeSibling(), SBMLImporter::renameMassActionParameters(), CSBMLExporter::replaceSpeciesReferences(), SBMLImporter::separateProductArguments(), SBMLImporter::setCorrectUsage(), CSBMLExporter::setFunctionSBMLIds(), CEvaluationTree::setTree(), CEvaluationNode::splitBranch(), CEvaluationNodeCall::toAST(), CEvaluationNodeChoice::toAST(), CEvaluationNodeDelay::toAST(), CEvaluationNodeFunction::toAST(), CEvaluationNodeLogical::toAST(), CEvaluationNodeOperator::toAST(), CReaction::variables2objects(), and SBMLImporter::variables2objects().
|
inline |
Retrieve the sibling of a node.
References CCopasiNode< _Data >::mpSibling.
|
inlinevirtual |
Remove a child from a node.
CCopasiNode< | Data > * pChild |
References CCopasiNode< _Data >::mpChild, CCopasiNode< _Data >::setParent(), and CCopasiNode< _Data >::setSibling().
Referenced by CModelVersionHierarchy::deleteVersion(), CODEExporter::exportSingleFunction(), CODEExporter::modifyTreeForMassAction(), and CEvaluationNodeCall::removeChild().
|
inlineprivate |
Remove a sibling.
CCopasiNode< | Data > * pSibling |
References CCopasiNode< _Data >::getSibling(), CCopasiNode< _Data >::mpParent, CCopasiNode< _Data >::mpSibling, CCopasiNode< _Data >::setParent(), and CCopasiNode< _Data >::setSibling().
|
inlineprotected |
Set the child of a node.
CCopasiNode< | Data > * pChild |
References CCopasiNode< _Data >::mpChild.
|
inlinevirtual |
Set the data of the Node.
const | Data & data |
References CCopasiNode< _Data >::mData.
Referenced by CCellDesignerImporter::addDependency(), and CModelVersionHierarchy::addVersion().
|
inlineprotected |
Set the parent of a Node.
CCopasiNode< | Data > * pParent |
References CCopasiNode< _Data >::mpParent.
Referenced by CCopasiNode< _Data >::addSibling(), CCopasiNode< _Data >::removeChild(), and CCopasiNode< _Data >::removeSibling().
|
inlineprotected |
Set the sibling of a node.
CCopasiNode< | Data > * pSibling |
References CCopasiNode< _Data >::mpSibling.
Referenced by CCopasiNode< _Data >::addChild(), CCopasiNode< _Data >::addSibling(), CCopasiNode< _Data >::removeChild(), and CCopasiNode< _Data >::removeSibling().
|
protected |
The data content of the node;
Referenced by CCopasiNode< _Data >::getData(), and CCopasiNode< _Data >::setData().
|
private |
A pointer to the first child of the node.
Referenced by CCopasiNode< _Data >::addChild(), CCopasiNode< _Data >::deleteChildren(), CCopasiNode< _Data >::getChild(), CCopasiNode< _Data >::getNext(), CCopasiNode< _Data >::removeChild(), and CCopasiNode< _Data >::setChild().
|
private |
A pointer to the parent of the node.
Referenced by CCopasiNode< _Data >::addSibling(), CCopasiNode< _Data >::getNextNonChild(), CCopasiNode< _Data >::getParent(), CCopasiNode< _Data >::removeSibling(), CCopasiNode< _Data >::setParent(), and CCopasiNode< _Data >::~CCopasiNode().
|
private |
A pointer to the first sibling of the node.
Referenced by CCopasiNode< _Data >::addSibling(), CCopasiNode< _Data >::getNextNonChild(), CCopasiNode< _Data >::getSibling(), CCopasiNode< _Data >::removeSibling(), and CCopasiNode< _Data >::setSibling().