Dataflow Runtime API  3.1.1.0
Public Member Functions | Protected Attributes | List of all members
imt::base::core::util::LinkedListIterator< LinkedListNode, iteratorType::UNIDIRECTIONAL > Class Template Reference

LinkedList class iterator. More...

#include <Imt.Base.Core.Util/LinkedListIterator.h>

Public Member Functions

 LinkedListIterator (LinkedListNode *ptr=NULL)
 constructor More...
 
LinkedListIterator< LinkedListNode > & operator= (LinkedListNode *ptr)
 asignment operator More...
 
 operator bool () const
 typecast operator More...
 
bool operator== (const LinkedListIterator< LinkedListNode > &rawIterator) const
 equal operator More...
 
bool operator!= (const LinkedListIterator< LinkedListNode > &rawIterator) const
 not equal operator More...
 
LinkedListIterator< LinkedListNode > & operator++ ()
 increments operator More...
 
LinkedListNode & operator* ()
 get the current Node as reference More...
 
const LinkedListNode & operator* () const
 get the current Node as const reference More...
 
LinkedListNode * operator-> ()
 dereferencing operator More...
 
LinkedListNode * getPtr ()
 get current pointer More...
 
const LinkedListNode * getConstPtr () const
 get current pointer as const More...
 

Protected Attributes

LinkedListNode * m_pNode
 stores the address to the current node More...
 

Detailed Description

template<typename LinkedListNode>
class imt::base::core::util::LinkedListIterator< LinkedListNode, iteratorType::UNIDIRECTIONAL >

LinkedList class iterator.

LinkedListIterator specialization for unidirectional iteration

Template Parameters
LinkedListNodeNode type used by a LinkedList object

Constructor & Destructor Documentation

◆ LinkedListIterator()

template<typename LinkedListNode >
imt::base::core::util::LinkedListIterator< LinkedListNode, iteratorType::UNIDIRECTIONAL >::LinkedListIterator ( LinkedListNode *  ptr = NULL)
inline

constructor

Parameters
ptrto a valid LinkedList Node

Member Function Documentation

◆ getConstPtr()

template<typename LinkedListNode >
const LinkedListNode* imt::base::core::util::LinkedListIterator< LinkedListNode, iteratorType::UNIDIRECTIONAL >::getConstPtr ( ) const
inline

get current pointer as const

Returns
the current Node the iterator points to as const pointer reference

◆ getPtr()

template<typename LinkedListNode >
LinkedListNode* imt::base::core::util::LinkedListIterator< LinkedListNode, iteratorType::UNIDIRECTIONAL >::getPtr ( )
inline

get current pointer

Note
same as the operator->
Returns
the current Node the iterator points to as pointer reference

◆ operator bool()

template<typename LinkedListNode >
imt::base::core::util::LinkedListIterator< LinkedListNode, iteratorType::UNIDIRECTIONAL >::operator bool ( ) const
inline

typecast operator

Returns
true if the iterator is pointing to a valid Node; otherwise false is returned

◆ operator!=()

template<typename LinkedListNode >
bool imt::base::core::util::LinkedListIterator< LinkedListNode, iteratorType::UNIDIRECTIONAL >::operator!= ( const LinkedListIterator< LinkedListNode > &  rawIterator) const
inline

not equal operator

Parameters
rawIteratorthe right hand side object to compare.
Returns
true if the containing inside the node is NOT equal between the two compared nodes. Otherwise false is returned.

◆ operator*() [1/2]

template<typename LinkedListNode >
LinkedListNode& imt::base::core::util::LinkedListIterator< LinkedListNode, iteratorType::UNIDIRECTIONAL >::operator* ( )
inline

get the current Node as reference

Returns
the current Node the iterator points to

◆ operator*() [2/2]

template<typename LinkedListNode >
const LinkedListNode& imt::base::core::util::LinkedListIterator< LinkedListNode, iteratorType::UNIDIRECTIONAL >::operator* ( ) const
inline

get the current Node as const reference

Returns
the current Node the iterator points to

◆ operator++()

template<typename LinkedListNode >
LinkedListIterator<LinkedListNode>& imt::base::core::util::LinkedListIterator< LinkedListNode, iteratorType::UNIDIRECTIONAL >::operator++ ( )
inline

increments operator

Increments the node the iterator points to.

Returns
the node after incrementing has finished

◆ operator->()

template<typename LinkedListNode >
LinkedListNode* imt::base::core::util::LinkedListIterator< LinkedListNode, iteratorType::UNIDIRECTIONAL >::operator-> ( )
inline

dereferencing operator

Returns
the current Node the iterator points to as pointer reference

◆ operator=()

template<typename LinkedListNode >
LinkedListIterator<LinkedListNode>& imt::base::core::util::LinkedListIterator< LinkedListNode, iteratorType::UNIDIRECTIONAL >::operator= ( LinkedListNode *  ptr)
inline

asignment operator

◆ operator==()

template<typename LinkedListNode >
bool imt::base::core::util::LinkedListIterator< LinkedListNode, iteratorType::UNIDIRECTIONAL >::operator== ( const LinkedListIterator< LinkedListNode > &  rawIterator) const
inline

equal operator

Parameters
rawIteratorthe right hand side object to compare.
Returns
true if the containing inside the node is equal between the two compared nodes. Otherwise false is returned.

Member Data Documentation

◆ m_pNode

template<typename LinkedListNode >
LinkedListNode* imt::base::core::util::LinkedListIterator< LinkedListNode, iteratorType::UNIDIRECTIONAL >::m_pNode
protected

stores the address to the current node


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