COPASI API  4.40.278
CCopasiNode< _Data > Class Template Reference

#include <CCopasiNode.h>

Inheritance diagram for CCopasiNode< _Data >:
[legend]

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 DatagetData ()
 
virtual const DatagetData () 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
 

Detailed Description

template<class _Data>
class CCopasiNode< _Data >

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.

Member Typedef Documentation

◆ Data

template<class _Data >
typedef _Data CCopasiNode< _Data >::Data

Constructor & Destructor Documentation

◆ CCopasiNode() [1/3]

template<class _Data >
CCopasiNode< _Data >::CCopasiNode ( CCopasiNode< Data > *  pParent = NULL)
inline

Default constructor.

Parameters
CCopasiNode<Data > * pParent (default: NULL)

◆ CCopasiNode() [2/3]

template<class _Data >
CCopasiNode< _Data >::CCopasiNode ( const CCopasiNode< Data > &  src)
inline

Copy constructor.

Parameters
constCCopasiNode< Data > & src

◆ CCopasiNode() [3/3]

template<class _Data >
CCopasiNode< _Data >::CCopasiNode ( const Data data,
CCopasiNode< Data > *  pParent = NULL 
)
inline

Specific constructor.

Parameters
constData & data
CCopasiNode<Data > * pParent (default: NULL)

◆ ~CCopasiNode()

template<class _Data >
virtual CCopasiNode< _Data >::~CCopasiNode ( )
inlinevirtual

Destructor. Note: Within a tree the parent of this node has to be corrected.

References CCopasiNode< _Data >::deleteChildren(), and CCopasiNode< _Data >::mpParent.

Member Function Documentation

◆ addChild()

template<class _Data >
virtual bool CCopasiNode< _Data >::addChild ( CCopasiNode< Data > *  pChild,
CCopasiNode< Data > *  pAfter = NULL 
)
inlinevirtual

Add a child to a node. If pAfter == this the child will be inserted at the front of the list of children.

Parameters
CCopasiNode<Data > * pChild
CCopasiNode<Data > * pAfter (default: NULL appended to the list of children)
Returns
bool Success

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().

◆ addSibling()

template<class _Data >
bool CCopasiNode< _Data >::addSibling ( CCopasiNode< Data > *  pSibling,
CCopasiNode< Data > *  pAfter = NULL 
)
inline

Add a sibling to a node. If pAfter == this the sibling will be inserted at the front of the list of siblings.

Parameters
CCopasiNode<Data > * pSibling
CCopasiNode<Data > * pAfter (default: NULL appended to the list of siblings)
Returns
bool Success

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().

◆ deleteChildren()

template<class _Data >
bool CCopasiNode< _Data >::deleteChildren ( )
inline

Delete all children of the node

References CCopasiNode< _Data >::mpChild.

Referenced by CCopasiNode< _Data >::~CCopasiNode().

◆ getChild() [1/4]

template<class _Data >
CCopasiNode< Data >* CCopasiNode< _Data >::getChild ( )
inline

◆ getChild() [2/4]

template<class _Data >
const CCopasiNode< Data >* CCopasiNode< _Data >::getChild ( ) const
inline

Retrieve the child of a node.

Returns
const CCopasiNode< Data > * pChild

References CCopasiNode< _Data >::mpChild.

◆ getChild() [3/4]

template<class _Data >
CCopasiNode< Data >* CCopasiNode< _Data >::getChild ( const size_t &  index)
inline

Retrieve the child with given index of a node. If index is out of range NULL is returned.

Returns
const CCopasiNode< Data > * pChild

References CCopasiNode< _Data >::getChild(), and CCopasiNode< _Data >::getSibling().

◆ getChild() [4/4]

template<class _Data >
const CCopasiNode< Data >* CCopasiNode< _Data >::getChild ( const size_t &  index) const
inline

Retrieve the child with given index of a node. If index is out of range NULL is returned.

Returns
const CCopasiNode< Data > * pChild

References CCopasiNode< _Data >::getChild(), and CCopasiNode< _Data >::getSibling().

◆ getData() [1/2]

template<class _Data >
virtual Data& CCopasiNode< _Data >::getData ( )
inlinevirtual

Retrieve the data of the Node.

Returns
Data data

References CCopasiNode< _Data >::mData.

◆ getData() [2/2]

◆ getNext() [1/2]

template<class _Data >
CCopasiNode< Data >* CCopasiNode< _Data >::getNext ( )
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.

Returns
CCopasiNode< Data > * pNext

References CCopasiNode< _Data >::getNextNonChild(), and CCopasiNode< _Data >::mpChild.

Referenced by CCellDesignerImporter::addDependency(), and CCellDesignerImporter::createSpeciesStyles().

◆ getNext() [2/2]

template<class _Data >
const CCopasiNode< Data >* CCopasiNode< _Data >::getNext ( ) const
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.

Returns
const CCopasiNode< Data > * pNext

References CCopasiNode< _Data >::getNextNonChild(), and CCopasiNode< _Data >::mpChild.

◆ getNextNonChild() [1/2]

template<class _Data >
CCopasiNode< Data >* CCopasiNode< _Data >::getNextNonChild ( )
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.

Returns
CCopasiNode< Data > * pNextNonChild

References CCopasiNode< _Data >::mpParent, and CCopasiNode< _Data >::mpSibling.

Referenced by CCopasiNode< _Data >::getNext().

◆ getNextNonChild() [2/2]

template<class _Data >
const CCopasiNode< Data >* CCopasiNode< _Data >::getNextNonChild ( ) const
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.

Returns
const CCopasiNode< Data > * pNextNonChild

References CCopasiNode< _Data >::mpParent, and CCopasiNode< _Data >::mpSibling.

◆ getNumChildren()

template<class _Data >
size_t CCopasiNode< _Data >::getNumChildren ( ) const
inline

Retrieve the number of children

Returns
size_t numChildren

References CCopasiNode< _Data >::getChild(), and CCopasiNode< _Data >::getSibling().

◆ getParent() [1/2]

template<class _Data >
CCopasiNode< Data >* CCopasiNode< _Data >::getParent ( )
inline

Retrieve the parent of a Node.

Returns
CCopasiNode< Data > * pParent

References CCopasiNode< _Data >::mpParent.

Referenced by CDerive::deleteBranch(), CModelVersionHierarchy::deleteVersion(), CEvaluationNode::getTree(), and CEvaluationTree::setRoot().

◆ getParent() [2/2]

template<class _Data >
const CCopasiNode< Data >* CCopasiNode< _Data >::getParent ( ) const
inline

Retrieve the parent of a Node.

Returns
const CCopasiNode< Data > * pParent

References CCopasiNode< _Data >::mpParent.

◆ getSibling() [1/2]

template<class _Data >
CCopasiNode< Data >* CCopasiNode< _Data >::getSibling ( )
inline

Retrieve the sibling of a node.

Returns
CCopasiNode< Data > * pSibling

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().

◆ getSibling() [2/2]

template<class _Data >
const CCopasiNode< Data >* CCopasiNode< _Data >::getSibling ( ) const
inline

Retrieve the sibling of a node.

Returns
const CCopasiNode< Data > * pSibling

References CCopasiNode< _Data >::mpSibling.

◆ removeChild()

template<class _Data >
virtual bool CCopasiNode< _Data >::removeChild ( CCopasiNode< Data > *  pChild)
inlinevirtual

◆ removeSibling()

template<class _Data >
bool CCopasiNode< _Data >::removeSibling ( CCopasiNode< Data > *  pSibling)
inlineprivate

◆ setChild()

template<class _Data >
bool CCopasiNode< _Data >::setChild ( CCopasiNode< Data > *  pChild)
inlineprotected

Set the child of a node.

Parameters
CCopasiNode<Data > * pChild
Returns
bool Success

References CCopasiNode< _Data >::mpChild.

◆ setData()

template<class _Data >
virtual bool CCopasiNode< _Data >::setData ( const Data data)
inlinevirtual

Set the data of the Node.

Parameters
constData & data
Returns
bool success

References CCopasiNode< _Data >::mData.

Referenced by CCellDesignerImporter::addDependency(), and CModelVersionHierarchy::addVersion().

◆ setParent()

template<class _Data >
bool CCopasiNode< _Data >::setParent ( CCopasiNode< Data > *  pParent)
inlineprotected

Set the parent of a Node.

Parameters
CCopasiNode<Data > * pParent
Returns
bool Success

References CCopasiNode< _Data >::mpParent.

Referenced by CCopasiNode< _Data >::addSibling(), CCopasiNode< _Data >::removeChild(), and CCopasiNode< _Data >::removeSibling().

◆ setSibling()

template<class _Data >
bool CCopasiNode< _Data >::setSibling ( CCopasiNode< Data > *  pSibling)
inlineprotected

Set the sibling of a node.

Parameters
CCopasiNode<Data > * pSibling
Returns
bool Success

References CCopasiNode< _Data >::mpSibling.

Referenced by CCopasiNode< _Data >::addChild(), CCopasiNode< _Data >::addSibling(), CCopasiNode< _Data >::removeChild(), and CCopasiNode< _Data >::removeSibling().

Member Data Documentation

◆ mData

template<class _Data >
Data CCopasiNode< _Data >::mData
protected

The data content of the node;

Referenced by CCopasiNode< _Data >::getData(), and CCopasiNode< _Data >::setData().

◆ mpChild

◆ mpParent

◆ mpSibling


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