COPASI API
4.16.103
|
#include <CNodeIterator.h>
Classes | |
class | CStackElement |
Public Member Functions | |
CNodeContextIterator () | |
CNodeContextIterator (const CNodeContextIterator &src) | |
CNodeContextIterator (Node *pNode, Context *pParentContext=NULL) | |
Context & | context () |
CNodeIteratorMode::State | end () const |
CNodeIteratorMode::Flag | getProcessingModes () const |
size_t | level () |
const CNodeIteratorMode::State & | next () |
Node * | operator* () |
Node * | operator-> () |
Context * | parentContextPtr () |
const CNodeIteratorMode::State & | processingMode () const |
void | setProcessingModes (const CNodeIteratorMode::Flag &processingModes) |
const CNodeIteratorMode::State & | skipChildren () |
~CNodeContextIterator () | |
Private Member Functions | |
void | increment () |
Private Attributes | |
CNodeIteratorMode::State | mCurrentMode |
CNodeIteratorMode::Flag | mProcessingModes |
std::stack< CStackElement > | mStack |
Definition at line 40 of file CNodeIterator.h.
|
inline |
Default constructor
Definition at line 126 of file CNodeIterator.h.
|
inline |
Copy constructor
const | CNodeContextIterator & src |
Definition at line 136 of file CNodeIterator.h.
|
inline |
Constructor
Node | * pNode |
Context | * pParentContext (default: NULL) |
Definition at line 147 of file CNodeIterator.h.
|
inline |
|
inline |
Retrieve the context of the current node.
Definition at line 291 of file CNodeIterator.h.
Referenced by CEvaluationNode::buildBerkeleyMadonnaString(), CEvaluationNode::buildCCodeString(), CEvaluationNode::buildDisplayString(), CEvaluationNode::buildInfix(), CEvaluationNode::buildMMLString(), CEvaluationNode::buildXPPString(), CMathEventN::CTrigger::compile(), CMathContainer::copyBranch(), CEvaluationNode::copyBranch(), CMathEventN::CTrigger::countRoots(), CFunctionAnalyzer::evaluateNode(), CEvaluationNode::findTopMinus(), CEvaluationTree::fromAST(), and CReaction::objects2variables().
|
inline |
Retrieve the end of the iterator, i.e., the
Definition at line 285 of file CNodeIterator.h.
Referenced by CEvaluationNode::buildBerkeleyMadonnaString(), CEvaluationNode::buildCCodeString(), CEvaluationNode::buildDisplayString(), CEvaluationNode::buildInfix(), CEvaluationNode::buildMMLString(), CEvaluationNode::buildXPPString(), CMathEventN::CTrigger::compile(), CMathContainer::copyBranch(), CEvaluationNode::copyBranch(), CMathEventN::CTrigger::countRoots(), CFunctionAnalyzer::evaluateNode(), CEvaluationNode::findTopMinus(), CEvaluationTree::fromAST(), and CReaction::objects2variables().
|
inline |
Retrieve the processing modes to which the method next will advance the iterator.
Definition at line 317 of file CNodeIterator.h.
|
inlineprivate |
This method moves the iterator to the next node in the tree. The tree is traversed depth first. A return value of false indicates that the tree has been completed traversed.
Please note that the iterator points to the same node twice, once before the first child and once after the last child to allow pre and post processing. This behavior is also true for childless nodes. To determine whether the iterator is in the pre or post processing phase one may check the nextChildIndex where zero indicates pre and None indicates post processing.
Definition at line 175 of file CNodeIterator.h.
Referenced by CNodeContextIterator< Node, int >::next().
|
inline |
The nesting level of the tree. Note, the nesting level of the root of the tree is 1. This is to distinguish its level from the end of the iterator which reports 0.
Definition at line 304 of file CNodeIterator.h.
|
inline |
This method moves the iterator to the next node based on the setting of the processing modes and returns the processing mode of the iterator.
Definition at line 233 of file CNodeIterator.h.
Referenced by CEvaluationNode::buildBerkeleyMadonnaString(), CEvaluationNode::buildCCodeString(), CEvaluationNode::buildDisplayString(), CEvaluationNode::buildInfix(), CEvaluationNode::buildMMLString(), CEvaluationNode::buildXPPString(), CMathEventN::CTrigger::compile(), CMathContainer::copyBranch(), CEvaluationNode::copyBranch(), CMathEventN::CTrigger::countRoots(), CFunctionAnalyzer::evaluateNode(), CEvaluationNode::findTopMinus(), CEvaluationTree::fromAST(), and CReaction::objects2variables().
|
inline |
|
inline |
|
inline |
Retrieve the pointer to the parent node context if it exists.
Definition at line 297 of file CNodeIterator.h.
Referenced by CEvaluationNode::buildBerkeleyMadonnaString(), CEvaluationNode::buildCCodeString(), CEvaluationNode::buildDisplayString(), CEvaluationNode::buildInfix(), CEvaluationNode::buildMMLString(), CEvaluationNode::buildXPPString(), CMathEventN::CTrigger::compile(), CMathContainer::copyBranch(), CEvaluationNode::copyBranch(), CMathEventN::CTrigger::countRoots(), CFunctionAnalyzer::evaluateNode(), CEvaluationNode::findTopMinus(), CEvaluationTree::fromAST(), and CReaction::objects2variables().
|
inline |
Retrieve the processing mode
Definition at line 280 of file CNodeIterator.h.
Referenced by CMathEventN::CTrigger::compile(), CMathEventN::CTrigger::countRoots(), and CEvaluationNode::findTopMinus().
|
inline |
Set the processing modes to which the method next will advance the iterator. Note, the iterator will always stop at the end.
const | CNodeIteratorMode::Flag & processingModes |
Definition at line 311 of file CNodeIterator.h.
Referenced by CMathEventN::CTrigger::compile(), CMathEventN::CTrigger::countRoots(), and CEvaluationNode::findTopMinus().
|
inline |
This method moves the iterator beyond the last child.
Definition at line 255 of file CNodeIterator.h.
Referenced by CMathEventN::CTrigger::compile(), CMathEventN::CTrigger::countRoots(), and CEvaluationNode::findTopMinus().
|
private |
The current processing mode.
Definition at line 328 of file CNodeIterator.h.
Referenced by CNodeContextIterator< Node, int >::increment(), CNodeContextIterator< Node, int >::next(), CNodeContextIterator< Node, int >::processingMode(), and CNodeContextIterator< Node, int >::skipChildren().
|
private |
The processing modes to which the method next will advance the iterator
Definition at line 333 of file CNodeIterator.h.
Referenced by CNodeContextIterator< Node, int >::getProcessingModes(), CNodeContextIterator< Node, int >::next(), and CNodeContextIterator< Node, int >::setProcessingModes().
|
private |
A stack representing the nested elements of the tree.
Definition at line 323 of file CNodeIterator.h.
Referenced by CNodeContextIterator< Node, int >::CNodeContextIterator(), CNodeContextIterator< Node, int >::context(), CNodeContextIterator< Node, int >::increment(), CNodeContextIterator< Node, int >::level(), CNodeContextIterator< Node, int >::operator*(), CNodeContextIterator< Node, int >::operator->(), CNodeContextIterator< Node, int >::parentContextPtr(), and CNodeContextIterator< Node, int >::skipChildren().