ejson::iterator< EJSON_BASE_T > Class Template Reference

#include <iterator.hpp>

Public Member Functions

 iterator (EJSON_BASE_T &_obj, size_t _pos)
 
 iterator (const EJSON_BASE_T &_obj, size_t _pos)
 
 iterator (const iterator &_obj)
 
iteratoroperator= (const iterator &_obj)
 
iteratoroperator+= (int32_t _val)
 
iterator operator+ (int32_t _val) const
 
iteratoroperator-= (int32_t _val)
 
iterator operator- (int32_t _val) const
 
iteratoroperator++ ()
 
iterator operator++ (int)
 
iteratoroperator-- ()
 
iterator operator-- (int)
 
bool operator== (const iterator &_obj) const
 
bool operator!= (const iterator &_obj) const
 
const ejson::Value operator* () const noexcept
 
ejson::Value operator* () noexcept
 
size_t getId () const noexcept
 
std::string getKey () const noexcept
 

Detailed Description

template<class EJSON_BASE_T>
class ejson::iterator< EJSON_BASE_T >

iterator on elements.

Constructor & Destructor Documentation

§ iterator() [1/3]

template<class EJSON_BASE_T >
ejson::iterator< EJSON_BASE_T >::iterator ( EJSON_BASE_T &  _obj,
size_t  _pos 
)

Constructor of the generic object class.

Parameters
[in]_objReference on the object to go threw
[in]_posPosition in the object

§ iterator() [2/3]

template<class EJSON_BASE_T >
ejson::iterator< EJSON_BASE_T >::iterator ( const EJSON_BASE_T &  _obj,
size_t  _pos 
)

Const constructor of the generic const object class.

Parameters
[in]_objReference on the object to go threw
[in]_posPosition in the object

§ iterator() [3/3]

template<class EJSON_BASE_T >
ejson::iterator< EJSON_BASE_T >::iterator ( const iterator< EJSON_BASE_T > &  _obj)

Copy iterator.

Parameters
[in]_objIterator to copy

Member Function Documentation

§ getId()

template<class EJSON_BASE_T >
size_t ejson::iterator< EJSON_BASE_T >::getId ( ) const
noexcept

Get ID of an element.

Returns
Position in the Element

§ getKey()

template<class EJSON_BASE_T >
std::string ejson::iterator< EJSON_BASE_T >::getKey ( ) const
noexcept

Get Key of an element.

Returns
Key of the Element

§ operator!=()

template<class EJSON_BASE_T >
bool ejson::iterator< EJSON_BASE_T >::operator!= ( const iterator< EJSON_BASE_T > &  _obj) const

In-Equality compare operator with an other iterator.

Parameters
[in]_objReference on the comparing iterator
Returns
true The iterators are NOT identical
false The iterators are identical

§ operator*() [1/2]

template<class EJSON_BASE_T >
const ejson::Value ejson::iterator< EJSON_BASE_T >::operator* ( ) const
noexcept

Get the property Value.

Returns
Const reference on the value.

§ operator*() [2/2]

template<class EJSON_BASE_T >
ejson::Value ejson::iterator< EJSON_BASE_T >::operator* ( )
noexcept

Get the property Value.

Returns
Const reference on the value.

§ operator+()

template<class EJSON_BASE_T >
iterator ejson::iterator< EJSON_BASE_T >::operator+ ( int32_t  _val) const

Operator+ Addition a value.

Parameters
[in]_valValue to addition
Returns
New iterator containing the value

§ operator++() [1/2]

template<class EJSON_BASE_T >
iterator& ejson::iterator< EJSON_BASE_T >::operator++ ( )

Operator++ Pre-incrementation of this iterator.

Returns
Local reference of the iterator incremented

§ operator++() [2/2]

template<class EJSON_BASE_T >
iterator ejson::iterator< EJSON_BASE_T >::operator++ ( int  )

Operator++ Post-incrementation of this iterator.

Returns
New iterator containing the last value

§ operator+=()

template<class EJSON_BASE_T >
iterator& ejson::iterator< EJSON_BASE_T >::operator+= ( int32_t  _val)

Operator+= Addition value.

Parameters
[in]_valValue to addition
Returns
Local reference of the iterator additionned

§ operator-()

template<class EJSON_BASE_T >
iterator ejson::iterator< EJSON_BASE_T >::operator- ( int32_t  _val) const

Operator- Decrement a value.

Parameters
[in]_valValue to addition
Returns
New iterator containing the value

§ operator--() [1/2]

template<class EJSON_BASE_T >
iterator& ejson::iterator< EJSON_BASE_T >::operator-- ( )

Operator++ Pre-decrementation of this iterator.

Returns
Local reference of the iterator incremented

§ operator--() [2/2]

template<class EJSON_BASE_T >
iterator ejson::iterator< EJSON_BASE_T >::operator-- ( int  )

Operator++ Post-decrementation of this iterator.

Returns
New iterator containing the last value

§ operator-=()

template<class EJSON_BASE_T >
iterator& ejson::iterator< EJSON_BASE_T >::operator-= ( int32_t  _val)

Operator-= Decrement a value.

Parameters
[in]_valValue to addition
Returns
Local reference of the iterator decremented

§ operator=()

template<class EJSON_BASE_T >
iterator& ejson::iterator< EJSON_BASE_T >::operator= ( const iterator< EJSON_BASE_T > &  _obj)

Operator+= Addition value.

Parameters
[in]_objValue to addition
Returns
Local reference of the iterator additionned

§ operator==()

template<class EJSON_BASE_T >
bool ejson::iterator< EJSON_BASE_T >::operator== ( const iterator< EJSON_BASE_T > &  _obj) const

Equality compare operator with an other iterator.

Parameters
[in]_objReference on the comparing iterator
Returns
true The iterators are identical
false The iterators are NOT identical

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