Public Member Functions | List of all members
ObjectTrie< T >::ConstDepthIterator Class Reference

A depth first const iterator for the trie. More...

#include <ObjectTrie.hpp>

Collaboration diagram for ObjectTrie< T >::ConstDepthIterator:
[legend]

Public Member Functions

 ConstDepthIterator (const ConstDepthIterator &copy)
 Make a copy of the supplied iterator. More...
 
const ObjectTrieNode< T > * getAncestor (size_t level) const
 Get a const pointer to the nth ancestor of the current node. More...
 
void getAncestors (std::vector< ObjectTrieNode< T > *const > &output) const
 Populate the supplied const pointer vector with the node's ancestors and the current node. More...
 
bool operator!= (const ConstDepthIterator &rhs) const
 Compare the current iterator and the supplied iterator for inequality. More...
 
const ObjectTrieNode< T > & operator* () const
 Dereference the node pointed to by the iterator. More...
 
ConstDepthIteratoroperator++ ()
 Increment the iterator. More...
 
const ObjectTrieNode< T > * operator-> () const
 Dereference the node pointed to by the iterator. More...
 
ConstDepthIteratoroperator= (const ConstDepthIterator &copy)
 Make a copy of the supplied iterator. More...
 
bool operator== (const ConstDepthIterator &rhs) const
 Compare the current iterator and the supplied iterator for equality. More...
 

Detailed Description

template<typename T>
class Balau::Container::ObjectTrie< T >::ConstDepthIterator

A depth first const iterator for the trie.

Constructor & Destructor Documentation

◆ ConstDepthIterator()

ConstDepthIterator ( const ConstDepthIterator copy)
inline

Make a copy of the supplied iterator.

Member Function Documentation

◆ getAncestor()

const ObjectTrieNode<T>* getAncestor ( size_t  level) const
inline

Get a const pointer to the nth ancestor of the current node.

Nullptr is returned if such an ancestor does not exist.

Parameters
levelthe ancestor distance
Returns
the ancestor or nullptr if such an ancestor does not exist

◆ getAncestors()

void getAncestors ( std::vector< ObjectTrieNode< T > *const > &  output) const
inline

Populate the supplied const pointer vector with the node's ancestors and the current node.

Returns
a const pointer vector to the node's ancestors and the current node

◆ operator!=()

bool operator!= ( const ConstDepthIterator rhs) const
inline

Compare the current iterator and the supplied iterator for inequality.

◆ operator*()

const ObjectTrieNode<T>& operator* ( ) const
inline

Dereference the node pointed to by the iterator.

◆ operator++()

ConstDepthIterator& operator++ ( )
inline

Increment the iterator.

◆ operator->()

const ObjectTrieNode<T>* operator-> ( ) const
inline

Dereference the node pointed to by the iterator.

◆ operator=()

ConstDepthIterator& operator= ( const ConstDepthIterator copy)
inline

Make a copy of the supplied iterator.

◆ operator==()

bool operator== ( const ConstDepthIterator rhs) const
inline

Compare the current iterator and the supplied iterator for equality.


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