COPASI API  4.16.103
Public Member Functions | Protected Attributes | List of all members
CEvaluationNodeDepthFirstIterator Class Reference

#include <CNormalTranslation.h>

Collaboration diagram for CEvaluationNodeDepthFirstIterator:
Collaboration graph
[legend]

Public Member Functions

 CEvaluationNodeDepthFirstIterator (CEvaluationNode *pRoot)
 
bool isValid () const
 
CEvaluationNode *& operator* ()
 
CEvaluationNodeDepthFirstIteratoroperator++ ()
 
CEvaluationNode *& operator-> ()
 
CEvaluationNodeDepthFirstIteratoroperator= (CEvaluationNode *pNode)
 

Protected Attributes

CEvaluationNodempNode
 

Detailed Description

Definition at line 402 of file CNormalTranslation.h.

Constructor & Destructor Documentation

CEvaluationNodeDepthFirstIterator::CEvaluationNodeDepthFirstIterator ( CEvaluationNode pRoot)

Definition at line 6352 of file CNormalTranslation.cpp.

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

6352  :
6353  mpNode(pRoot)
6354 {
6355  while (this->mpNode && this->mpNode->getChild())
6356  {
6357  this->mpNode = static_cast<CEvaluationNode*>(this->mpNode->getChild());
6358  }
6359 }
CCopasiNode< Data > * getChild()
Definition: CCopasiNode.h:210

Member Function Documentation

bool CEvaluationNodeDepthFirstIterator::isValid ( ) const

Definition at line 6385 of file CNormalTranslation.cpp.

References mpNode.

Referenced by CNormalTranslation::has_duplicate_nodes(), CNormalTranslation::newCancel(), and CNormalTranslation::newEvaluateNumbers().

6386 {
6387  return mpNode != NULL;
6388 }
CEvaluationNode *& CEvaluationNodeDepthFirstIterator::operator* ( )

Definition at line 6390 of file CNormalTranslation.cpp.

References mpNode.

6391 {
6392  return this->mpNode;
6393 }
CEvaluationNodeDepthFirstIterator & CEvaluationNodeDepthFirstIterator::operator++ ( )

Definition at line 6361 of file CNormalTranslation.cpp.

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

6362 {
6363  if (this->mpNode)
6364  {
6365  // go to the deepest child of the next sibling
6366  if (this->mpNode->getSibling() != NULL)
6367  {
6368  this->mpNode = static_cast<CEvaluationNode*>(this->mpNode->getSibling());
6369 
6370  while (this->mpNode->getChild() != NULL)
6371  {
6372  this->mpNode = static_cast<CEvaluationNode*>(this->mpNode->getChild());
6373  }
6374  }
6375  // go one up
6376  else
6377  {
6378  this->mpNode = static_cast<CEvaluationNode*>(this->mpNode->getParent());
6379  }
6380  }
6381 
6382  return *(this);
6383 }
CCopasiNode< Data > * getSibling()
Definition: CCopasiNode.h:353
CCopasiNode< Data > * getParent()
Definition: CCopasiNode.h:139
CCopasiNode< Data > * getChild()
Definition: CCopasiNode.h:210
CEvaluationNode *& CEvaluationNodeDepthFirstIterator::operator-> ( )

Definition at line 6395 of file CNormalTranslation.cpp.

References mpNode.

6396 {
6397  return this->mpNode;
6398 }
CEvaluationNodeDepthFirstIterator & CEvaluationNodeDepthFirstIterator::operator= ( CEvaluationNode pNode)

Definition at line 6400 of file CNormalTranslation.cpp.

References mpNode.

6401 {
6402  this->mpNode = pNode;
6403  return *this;
6404 }

Member Data Documentation

CEvaluationNode* CEvaluationNodeDepthFirstIterator::mpNode
protected

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