COPASI API  4.16.103
Public Member Functions | Public Attributes | List of all members
CMathDependencyNodeIterator::CStackElement Class Reference
Collaboration diagram for CMathDependencyNodeIterator::CStackElement:
Collaboration graph
[legend]

Public Member Functions

 CStackElement ()
 
 CStackElement (const CStackElement &src)
 
 CStackElement (CMathDependencyNode *pNode, const Type &type, const CMathDependencyNode *pParent)
 
 ~CStackElement ()
 

Public Attributes

std::vector
< CMathDependencyNode * >
::iterator 
mEndChild
 
std::vector
< CMathDependencyNode * >
::iterator 
mItChild
 
CMathDependencyNodempNode
 
const CMathDependencyNodempParent
 
Type mType
 

Detailed Description

An internal class managing the context of the each nesting level of the iterator

Definition at line 64 of file CMathDependencyNodeIterator.h.

Constructor & Destructor Documentation

CMathDependencyNodeIterator::CStackElement::CStackElement ( )

Default constructor

Definition at line 12 of file CMathDependencyNodeIterator.cpp.

CMathDependencyNodeIterator::CStackElement::CStackElement ( const CStackElement src)

Copy constructor

Parameters
constCStackElement & src

Definition at line 20 of file CMathDependencyNodeIterator.cpp.

20  :
21  mpNode(src.mpNode),
22  mType(src.mType),
23  mItChild(src.mItChild),
24  mEndChild(src.mEndChild),
25  mpParent(src.mpParent)
26 {}
std::vector< CMathDependencyNode * >::iterator mEndChild
std::vector< CMathDependencyNode * >::iterator mItChild
CMathDependencyNodeIterator::CStackElement::CStackElement ( CMathDependencyNode pNode,
const Type type,
const CMathDependencyNode pParent 
)

Specific constructor

Parameters
CMathDependencyNode* pNode
constType & type
constCMathDependencyNode * pParent

Definition at line 28 of file CMathDependencyNodeIterator.cpp.

References CMathDependencyNodeIterator::Dependents, CMathDependencyNode::getDependents(), CMathDependencyNode::getPrerequisites(), mEndChild, mItChild, mpNode, mType, and CMathDependencyNodeIterator::Prerequisites.

30  :
31  mpNode(pNode),
32  mType(type),
33  mItChild(),
34  mEndChild(),
35  mpParent(pParent)
36 {
37  if (pNode != NULL)
38  {
39  switch (mType)
40  {
41  case Dependents:
42  mItChild = mpNode->getDependents().begin();
43  mEndChild = mpNode->getDependents().end();
44  break;
45 
46  case Prerequisites:
47  mItChild = mpNode->getPrerequisites().begin();
49  break;
50  }
51  }
52 }
std::vector< CMathDependencyNode * > & getPrerequisites()
std::vector< CMathDependencyNode * >::iterator mEndChild
std::vector< CMathDependencyNode * >::iterator mItChild
std::vector< CMathDependencyNode * > & getDependents()
CMathDependencyNodeIterator::CStackElement::~CStackElement ( )

Destructor

Definition at line 54 of file CMathDependencyNodeIterator.cpp.

55 {}

Member Data Documentation

std::vector< CMathDependencyNode * >::iterator CMathDependencyNodeIterator::CStackElement::mEndChild

An iterator pointing beyond the last child.

Definition at line 109 of file CMathDependencyNodeIterator.h.

Referenced by CStackElement(), CMathDependencyNodeIterator::increment(), and CMathDependencyNodeIterator::skipChildren().

std::vector< CMathDependencyNode * >::iterator CMathDependencyNodeIterator::CStackElement::mItChild

An iterator to the next child to be processed.

Definition at line 104 of file CMathDependencyNodeIterator.h.

Referenced by CStackElement(), CMathDependencyNodeIterator::increment(), and CMathDependencyNodeIterator::skipChildren().

CMathDependencyNode* CMathDependencyNodeIterator::CStackElement::mpNode

The node the iterator points to in the current nesting level

Definition at line 94 of file CMathDependencyNodeIterator.h.

Referenced by CStackElement(), and CMathDependencyNodeIterator::increment().

const CMathDependencyNode* CMathDependencyNodeIterator::CStackElement::mpParent

A pointer to the parent node of the current node if know otherwise NULL

Definition at line 115 of file CMathDependencyNodeIterator.h.

Type CMathDependencyNodeIterator::CStackElement::mType

The iterator type (Dependents or Prerequisites)

Definition at line 99 of file CMathDependencyNodeIterator.h.

Referenced by CStackElement(), and CMathDependencyNodeIterator::increment().


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