DGtal  1.3.beta
Public Member Functions | Protected Attributes
DGtal::experimental::ImageContainerByHashTree< TDomain, TValue, THashKey >::Iterator Class Reference

Built-in iterator on an HashTree. This iterator visits all node in the tree. More...

#include <DGtal/images/ImageContainerByHashTree.h>

Public Member Functions

 Iterator (Node **data, unsigned int position, unsigned int arraySize)
 
bool isAtEnd () const
 
Valueoperator* ()
 
bool operator++ ()
 
bool operator== (const Iterator &it)
 
bool operator!= (const Iterator &it)
 
HashKey getKey () const
 
bool next ()
 

Protected Attributes

NodemyNode
 
unsigned int myCurrentCell
 
unsigned int myArraySize
 
Node ** myContainerData
 

Detailed Description

template<typename TDomain, typename TValue, typename THashKey = typename DGtal::uint64_t>
class DGtal::experimental::ImageContainerByHashTree< TDomain, TValue, THashKey >::Iterator

Built-in iterator on an HashTree. This iterator visits all node in the tree.

Iterator inner-class


Definition at line 516 of file ImageContainerByHashTree.h.

Constructor & Destructor Documentation

◆ Iterator()

template<typename TDomain , typename TValue , typename THashKey = typename DGtal::uint64_t>
DGtal::experimental::ImageContainerByHashTree< TDomain, TValue, THashKey >::Iterator::Iterator ( Node **  data,
unsigned int  position,
unsigned int  arraySize 
)
inline

Member Function Documentation

◆ getKey()

template<typename TDomain , typename TValue , typename THashKey = typename DGtal::uint64_t>
HashKey DGtal::experimental::ImageContainerByHashTree< TDomain, TValue, THashKey >::Iterator::getKey ( ) const
inline

◆ isAtEnd()

template<typename TDomain , typename TValue , typename THashKey = typename DGtal::uint64_t>
bool DGtal::experimental::ImageContainerByHashTree< TDomain, TValue, THashKey >::Iterator::isAtEnd ( ) const
inline

◆ next()

template<typename TDomain , typename TValue , typename THashKey = typename DGtal::uint64_t>
bool DGtal::experimental::ImageContainerByHashTree< TDomain, TValue, THashKey >::Iterator::next ( )

◆ operator!=()

template<typename TDomain , typename TValue , typename THashKey = typename DGtal::uint64_t>
bool DGtal::experimental::ImageContainerByHashTree< TDomain, TValue, THashKey >::Iterator::operator!= ( const Iterator it)
inline

Definition at line 549 of file ImageContainerByHashTree.h.

550  {
551  if (isAtEnd() && it.isAtEnd())
552  return false;
553  else
554  return (myNode != it.myNode);
555  }

References DGtal::experimental::ImageContainerByHashTree< TDomain, TValue, THashKey >::Iterator::isAtEnd(), and DGtal::experimental::ImageContainerByHashTree< TDomain, TValue, THashKey >::Iterator::myNode.

◆ operator*()

template<typename TDomain , typename TValue , typename THashKey = typename DGtal::uint64_t>
Value& DGtal::experimental::ImageContainerByHashTree< TDomain, TValue, THashKey >::Iterator::operator* ( )
inline

◆ operator++()

template<typename TDomain , typename TValue , typename THashKey = typename DGtal::uint64_t>
bool DGtal::experimental::ImageContainerByHashTree< TDomain, TValue, THashKey >::Iterator::operator++ ( )
inline

◆ operator==()

template<typename TDomain , typename TValue , typename THashKey = typename DGtal::uint64_t>
bool DGtal::experimental::ImageContainerByHashTree< TDomain, TValue, THashKey >::Iterator::operator== ( const Iterator it)
inline

Definition at line 542 of file ImageContainerByHashTree.h.

543  {
544  if (isAtEnd() && it.isAtEnd())
545  return true;
546  else
547  return (myNode == it.myNode);
548  }

References DGtal::experimental::ImageContainerByHashTree< TDomain, TValue, THashKey >::Iterator::isAtEnd(), and DGtal::experimental::ImageContainerByHashTree< TDomain, TValue, THashKey >::Iterator::myNode.

Field Documentation

◆ myArraySize

template<typename TDomain , typename TValue , typename THashKey = typename DGtal::uint64_t>
unsigned int DGtal::experimental::ImageContainerByHashTree< TDomain, TValue, THashKey >::Iterator::myArraySize
protected

◆ myContainerData

template<typename TDomain , typename TValue , typename THashKey = typename DGtal::uint64_t>
Node** DGtal::experimental::ImageContainerByHashTree< TDomain, TValue, THashKey >::Iterator::myContainerData
protected

◆ myCurrentCell

template<typename TDomain , typename TValue , typename THashKey = typename DGtal::uint64_t>
unsigned int DGtal::experimental::ImageContainerByHashTree< TDomain, TValue, THashKey >::Iterator::myCurrentCell
protected

◆ myNode

template<typename TDomain , typename TValue , typename THashKey = typename DGtal::uint64_t>
Node* DGtal::experimental::ImageContainerByHashTree< TDomain, TValue, THashKey >::Iterator::myNode
protected

The documentation for this class was generated from the following file:
DGtal::experimental::ImageContainerByHashTree::Iterator::myArraySize
unsigned int myArraySize
Definition: ImageContainerByHashTree.h:564
DGtal::experimental::ImageContainerByHashTree::Iterator::myNode
Node * myNode
Definition: ImageContainerByHashTree.h:562
DGtal::experimental::ImageContainerByHashTree::data
const Node **& data() const noexcept
Definition: ImageContainerByHashTree.h:294
DGtal::experimental::ImageContainerByHashTree::Iterator::next
bool next()
DGtal::experimental::ImageContainerByHashTree::Node::getObject
Value & getObject()
Definition: ImageContainerByHashTree.h:669
DGtal::experimental::ImageContainerByHashTree::Iterator::myContainerData
Node ** myContainerData
Definition: ImageContainerByHashTree.h:565
DGtal::experimental::ImageContainerByHashTree::Iterator::isAtEnd
bool isAtEnd() const
Definition: ImageContainerByHashTree.h:530
DGtal::experimental::ImageContainerByHashTree::Iterator::myCurrentCell
unsigned int myCurrentCell
Definition: ImageContainerByHashTree.h:563
DGtal::experimental::ImageContainerByHashTree::Node::getKey
HashKey getKey()
Definition: ImageContainerByHashTree.h:660