DGtal 2.0.0
Loading...
Searching...
No Matches
DGtal::experimental::ImageContainerByHashTree< TDomain, TValue, THashKey >::Node Class Reference

#include <DGtal/images/ImageContainerByHashTree.h>

Public Member Functions

 Node (Value aValue, HashKey key)
NodegetNext ()
void setNext (Node *next)
HashKey getKey ()
ValuegetObject ()
 ~Node ()

Protected Attributes

HashKey myKey
NodemyNext
Value myData

Detailed Description

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

An internal class that corresponds to a node of a linked list (as the hashTable points to linked lists to handle collisions). Each element in the container is placed in a Node.

Definition at line 611 of file ImageContainerByHashTree.h.

Constructor & Destructor Documentation

◆ Node()

template<typename TDomain, typename TValue, typename THashKey = typename DGtal::uint64_t>
DGtal::experimental::ImageContainerByHashTree< TDomain, TValue, THashKey >::Node::Node ( Value aValue,
HashKey key )
inline

Construtctor: create pair (aValue, key)

Parameters
aValueFirst value
keykey in the hashtree

Definition at line 621 of file ImageContainerByHashTree.h.

622 {
623 myData = aValue;
624 myKey = key;
625 }
Model of CImageContainer implementing the association key<->Value using a hash tree....

References myData, and myKey.

Referenced by getNext(), and setNext().

◆ ~Node()

template<typename TDomain, typename TValue, typename THashKey = typename DGtal::uint64_t>
DGtal::experimental::ImageContainerByHashTree< TDomain, TValue, THashKey >::Node::~Node ( )
inline

Definition at line 663 of file ImageContainerByHashTree.h.

663{ }

Member Function Documentation

◆ getKey()

template<typename TDomain, typename TValue, typename THashKey = typename DGtal::uint64_t>
HashKey DGtal::experimental::ImageContainerByHashTree< TDomain, TValue, THashKey >::Node::getKey ( )
inline
Returns
the key associated to a Node.

Definition at line 650 of file ImageContainerByHashTree.h.

651 {
652 return myKey;
653 }

References myKey.

◆ getNext()

template<typename TDomain, typename TValue, typename THashKey = typename DGtal::uint64_t>
Node * DGtal::experimental::ImageContainerByHashTree< TDomain, TValue, THashKey >::Node::getNext ( )
inline
Returns
the next pair (aValue, key) in the list.

Definition at line 630 of file ImageContainerByHashTree.h.

631 {
632 return myNext;
633 }

References myNext, and Node().

◆ getObject()

template<typename TDomain, typename TValue, typename THashKey = typename DGtal::uint64_t>
Value & DGtal::experimental::ImageContainerByHashTree< TDomain, TValue, THashKey >::Node::getObject ( )
inline
Returns
the object (aValue) associated to a Node.

Definition at line 659 of file ImageContainerByHashTree.h.

660 {
661 return myData;
662 }

References myData.

◆ setNext()

template<typename TDomain, typename TValue, typename THashKey = typename DGtal::uint64_t>
void DGtal::experimental::ImageContainerByHashTree< TDomain, TValue, THashKey >::Node::setNext ( Node * next)
inline

Insert the pair (value,key) next in the node list

Parameters
nexta pointer to a pair (value,key) (Node).

Definition at line 641 of file ImageContainerByHashTree.h.

642 {
643 myNext = next;
644 }

References myNext, and Node().

Field Documentation

◆ myData

template<typename TDomain, typename TValue, typename THashKey = typename DGtal::uint64_t>
Value DGtal::experimental::ImageContainerByHashTree< TDomain, TValue, THashKey >::Node::myData
protected

Definition at line 667 of file ImageContainerByHashTree.h.

Referenced by getObject(), and Node().

◆ myKey

template<typename TDomain, typename TValue, typename THashKey = typename DGtal::uint64_t>
HashKey DGtal::experimental::ImageContainerByHashTree< TDomain, TValue, THashKey >::Node::myKey
protected

Definition at line 665 of file ImageContainerByHashTree.h.

Referenced by getKey(), and Node().

◆ myNext

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

Definition at line 666 of file ImageContainerByHashTree.h.

Referenced by getNext(), and setNext().


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