NEST  2.6.0,not_revisioned_source_dir@0
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
nest::LocalNodeListIterator Class Reference

Iterator for post-order traversal of all local nodes in a subnet. More...

#include <nodelist.h>

Public Member Functions

LocalNodeListIterator operator++ ()
 NodeList::iterator::operator++() Operator++ advances the iterator to the right neighbor in a post-order tree traversal, including the non-leaf nodes. More...
 
Nodeoperator* ()
 
Node const * operator* () const
 
bool operator== (const LocalNodeListIterator &i) const
 
bool operator!= (const LocalNodeListIterator &i) const
 

Private Member Functions

 LocalNodeListIterator (std::vector< Node * >::iterator const &node, std::vector< Node * >::iterator const &list_end)
 Create iterator from pointer to Node in subnet. More...
 
bool is_end_ () const
 

Private Attributes

vector< Node * >::iterator current_node_
 iterator to the current node in subnet More...
 
vector< Node * >::iterator list_end_
 

Friends

class LocalNodeListBase< LocalNodeListIterator >
 
class LocalLeafListIterator
 

Detailed Description

Iterator for post-order traversal of all local nodes in a subnet.

Constructor & Destructor Documentation

nest::LocalNodeListIterator::LocalNodeListIterator ( std::vector< Node * >::iterator const &  node,
std::vector< Node * >::iterator const &  list_end 
)
inlineprivate

Create iterator from pointer to Node in subnet.

Member Function Documentation

bool nest::LocalNodeListIterator::is_end_ ( ) const
inlineprivate
bool nest::LocalNodeListIterator::operator!= ( const LocalNodeListIterator i) const
inline
Node* nest::LocalNodeListIterator::operator* ( )
inline

References current_node_.

Node const* nest::LocalNodeListIterator::operator* ( ) const
inline

References current_node_.

LocalNodeListIterator nest::LocalNodeListIterator::operator++ ( )

NodeList::iterator::operator++() Operator++ advances the iterator to the right neighbor in a post-order tree traversal, including the non-leaf nodes.

The formulation is iterative. Maybe a recursive formulation would be faster, however, we will also supply a chached-iterator, which does this work only once.

References assert(), current_node_, nest::Node::get_parent(), nest::Node::get_subnet_index(), list_end_, nest::Subnet::local_begin(), nest::Subnet::local_empty(), nest::Subnet::local_end(), and nest::names::parent.

bool nest::LocalNodeListIterator::operator== ( const LocalNodeListIterator i) const
inline

References current_node_.

Friends And Related Function Documentation

friend class LocalLeafListIterator
friend
friend class LocalNodeListBase< LocalNodeListIterator >
friend

Member Data Documentation

vector<Node *>::iterator nest::LocalNodeListIterator::current_node_
private

iterator to the current node in subnet

Referenced by is_end_(), operator*(), operator++(), and operator==().

vector<Node *>::iterator nest::LocalNodeListIterator::list_end_
private

Referenced by is_end_(), and operator++().


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