inicpp
C++ parser of INI files with schema validation.
inicpp::config_iterator< Element > Class Template Reference

#include <config.h>

+ Inheritance diagram for inicpp::config_iterator< Element >:

Public Member Functions

 config_iterator ()=delete
 
 config_iterator (const config_iterator &src)=default
 
config_iteratoroperator= (const config_iterator &source)=default
 
 config_iterator (config_iterator &&src)=default
 
config_iteratoroperator= (config_iterator &&source)=default
 
 config_iterator (config &source, size_t position)
 
 config_iterator (config &source)
 
config_iteratoroperator++ ()
 
config_iterator operator++ (int)
 
bool operator== (const config_iterator &second) const
 
bool operator!= (const config_iterator &second) const
 
bool operator< (const config_iterator &second) const
 
reference operator* ()
 
pointer operator-> ()
 

Detailed Description

template<typename Element>
class inicpp::config_iterator< Element >

Forward declaration of iterator used in config class

Templated config iterator. Templates provide const and non-const iterator in one implementation. For easier implementation inheritance from std::iterator is used.

Definition at line 20 of file config.h.

Constructor & Destructor Documentation

template<typename Element >
inicpp::config_iterator< Element >::config_iterator ( )
delete

Deleted default constructor.

template<typename Element >
inicpp::config_iterator< Element >::config_iterator ( const config_iterator< Element > &  src)
default

Copy constructor.

template<typename Element >
inicpp::config_iterator< Element >::config_iterator ( config_iterator< Element > &&  src)
default

Move constructor.

template<typename Element >
inicpp::config_iterator< Element >::config_iterator ( config source,
size_t  position 
)
inline

Construct iterator on given container and pointing at specified postion.

Parameters
sourcecontainer which can be iterated
positioninitial position to given container

Definition at line 275 of file config.h.

template<typename Element >
inicpp::config_iterator< Element >::config_iterator ( config source)
inline

Construct iterator on given container pointing at the start.

Parameters
sourcecontainer which can be iterated

Definition at line 282 of file config.h.

Member Function Documentation

template<typename Element >
bool inicpp::config_iterator< Element >::operator!= ( const config_iterator< Element > &  second) const
inline

Non-equality compare method for iterators.

Parameters
second
Returns
true if iterators are different

Definition at line 320 of file config.h.

template<typename Element >
reference inicpp::config_iterator< Element >::operator* ( )
inline

Iterator dereference operator.

Returns
reference to section on current position

Definition at line 338 of file config.h.

template<typename Element >
config_iterator& inicpp::config_iterator< Element >::operator++ ( )
inline

Moves iterator to next position.

Returns
iterator itself

Definition at line 290 of file config.h.

template<typename Element >
config_iterator inicpp::config_iterator< Element >::operator++ ( int  )
inline

Moves iterator to next position.

Returns
new iterator with old position

Definition at line 299 of file config.h.

template<typename Element >
pointer inicpp::config_iterator< Element >::operator-> ( )
inline

Iterator -> operator

Returns
pointer to option on current position

Definition at line 347 of file config.h.

template<typename Element >
bool inicpp::config_iterator< Element >::operator< ( const config_iterator< Element > &  second) const
inline

Less than compare method for iterators.

Parameters
second
Returns
true if this iterator is lesser than second

Definition at line 329 of file config.h.

template<typename Element >
config_iterator& inicpp::config_iterator< Element >::operator= ( const config_iterator< Element > &  source)
default

Copy assignment.

template<typename Element >
config_iterator& inicpp::config_iterator< Element >::operator= ( config_iterator< Element > &&  source)
default

Move assignment.

template<typename Element >
bool inicpp::config_iterator< Element >::operator== ( const config_iterator< Element > &  second) const
inline

Equality compare method for iterators.

Parameters
second
Returns
true if iterators are the same

Definition at line 311 of file config.h.


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