Util--  1.1
Public Types | Public Member Functions | Friends | List of all members
utilmm::hash_toolbox::const_iter< Key, Value, Extract, Hash, Equal > Class Template Reference

const iterator for table More...

#include <utilmm/hash/bits/iter.hh>

Public Types

typedef Value value_type
 Type of the pointed elements. More...
 
typedef value_type const * pointer
 Pointer type. More...
 
typedef value_type const & reference
 Reference type. More...
 
typedef size_t size_type
 Size type. More...
 

Public Member Functions

 const_iter ()
 default crontructor More...
 
 const_iter (iter< Key, Value, Extract, Hash, Equal > const &other)
 Convertion constructor. More...
 
bool operator== (const_iter const &other) const
 Equality test. More...
 
bool operator!= (const_iter const &other) const
 Difference test. More...
 
const_iteroperator+= (size_type delta)
 Advance operation. More...
 
const_iter operator+ (size_type delta) const
 Addition operation. More...
 
const_iteroperator++ ()
 Pre-incremant operation. More...
 
const_iter operator++ (int)
 Post-increment operation. More...
 
pointer operator-> () const
 access operator More...
 
reference operator* () const
 dereference operator More...
 

Friends

template<typename K , typename V , class Ex , class H , class Eq >
class table
 

Detailed Description

template<typename Key, typename Value, class Extract, class Hash, class Equal>
class utilmm::hash_toolbox::const_iter< Key, Value, Extract, Hash, Equal >

const iterator for table

This class implements a const iterator for utilmm::hash_toolbox::table. A const iterator is an iterator with guarantees that it will never modify the container it points to.

Author
Frédéric Py fpy@l.nosp@m.aas..nosp@m.fr

Member Typedef Documentation

◆ pointer

template<typename Key, typename Value, class Extract, class Hash, class Equal>
typedef value_type const* utilmm::hash_toolbox::const_iter< Key, Value, Extract, Hash, Equal >::pointer

Pointer type.

This is the type of the pointer used to access to Value. For cont iterator it is a const pointer

◆ reference

template<typename Key, typename Value, class Extract, class Hash, class Equal>
typedef value_type const& utilmm::hash_toolbox::const_iter< Key, Value, Extract, Hash, Equal >::reference

Reference type.

This is the type of the reference used to access to Value. For cont iterator it is a const reference

◆ size_type

template<typename Key, typename Value, class Extract, class Hash, class Equal>
typedef size_t utilmm::hash_toolbox::const_iter< Key, Value, Extract, Hash, Equal >::size_type

Size type.

This is the type used to advance the iterator or other things like that.

◆ value_type

template<typename Key, typename Value, class Extract, class Hash, class Equal>
typedef Value utilmm::hash_toolbox::const_iter< Key, Value, Extract, Hash, Equal >::value_type

Type of the pointed elements.

This the type of the elements in the container

Constructor & Destructor Documentation

◆ const_iter() [1/2]

template<typename Key, typename Value, class Extract, class Hash, class Equal>
utilmm::hash_toolbox::const_iter< Key, Value, Extract, Hash, Equal >::const_iter ( )

default crontructor

Create an iterator not attached to any table

◆ const_iter() [2/2]

template<typename Key, typename Value, class Extract, class Hash, class Equal>
utilmm::hash_toolbox::const_iter< Key, Value, Extract, Hash, Equal >::const_iter ( iter< Key, Value, Extract, Hash, Equal > const &  other)

Convertion constructor.

This constructor is used to make implicit conversion from non cont iterator to const iterator when needed.

Parameters
otherthe instance to copy

Member Function Documentation

◆ operator!=()

template<typename Key, typename Value, class Extract, class Hash, class Equal>
bool utilmm::hash_toolbox::const_iter< Key, Value, Extract, Hash, Equal >::operator!= ( const_iter< Key, Value, Extract, Hash, Equal > const &  other) const

Difference test.

Parameters
otherThe instance to compare
Return values
trueif *this is not equal to other
falseelse

◆ operator*()

template<typename Key, typename Value, class Extract, class Hash, class Equal>
reference utilmm::hash_toolbox::const_iter< Key, Value, Extract, Hash, Equal >::operator* ( ) const

dereference operator

Returns
a refence to pointed cell

◆ operator+()

template<typename Key, typename Value, class Extract, class Hash, class Equal>
const_iter utilmm::hash_toolbox::const_iter< Key, Value, Extract, Hash, Equal >::operator+ ( size_type  delta) const

Addition operation.

Parameters
deltadistance to add

This function returns an iterator delta cells after current instance

Returns
the itrerator at delta

◆ operator++() [1/2]

template<typename Key, typename Value, class Extract, class Hash, class Equal>
const_iter& utilmm::hash_toolbox::const_iter< Key, Value, Extract, Hash, Equal >::operator++ ( )

Pre-incremant operation.

Advance iterator of one cell

Returns
the iterator after operation.

◆ operator++() [2/2]

template<typename Key, typename Value, class Extract, class Hash, class Equal>
const_iter utilmm::hash_toolbox::const_iter< Key, Value, Extract, Hash, Equal >::operator++ ( int  )

Post-increment operation.

Advance iterator of one cell

Returns
value of the iterator just before the operation.

◆ operator+=()

template<typename Key, typename Value, class Extract, class Hash, class Equal>
const_iter& utilmm::hash_toolbox::const_iter< Key, Value, Extract, Hash, Equal >::operator+= ( size_type  delta)

Advance operation.

Parameters
deltadistance to advance

This function increments the iterator position of the given distance delta .

Returns
*this after operation

◆ operator->()

template<typename Key, typename Value, class Extract, class Hash, class Equal>
pointer utilmm::hash_toolbox::const_iter< Key, Value, Extract, Hash, Equal >::operator-> ( ) const

access operator

This operator allow user to acces directly to attributes of pointed cell.

Returns
a pointer to the cell

◆ operator==()

template<typename Key, typename Value, class Extract, class Hash, class Equal>
bool utilmm::hash_toolbox::const_iter< Key, Value, Extract, Hash, Equal >::operator== ( const_iter< Key, Value, Extract, Hash, Equal > const &  other) const

Equality test.

Parameters
otherThe instance to compare
Return values
trueif *this is equal to other
falseelse

Friends And Related Function Documentation

◆ table

template<typename Key, typename Value, class Extract, class Hash, class Equal>
template<typename K , typename V , class Ex , class H , class Eq >
friend class table
friend

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

Generated on Mon Sep 24 2018 17:06:40 for Util-- by doxygen 1.8.13
SourceForge.net Project Page