All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Valuable::ArchiveIterator Class Reference

Child iterator for ArchiveElement children, uses instance of ArchiveIteratorImpl to provide implementation for different element types. More...

#include <Valuable/Archive.hpp>

Public Member Functions

 ArchiveIterator (std::shared_ptr< ArchiveIteratorImpl > impl)
 Construct a new ArchiveIterator. More...
 
 operator bool () const
 Returns NULL if the iterator is not valid anymore. More...
 
bool operator!= (const ArchiveIterator &other) const
 Compares if the iterators point to different elements.
 
ArchiveElement operator* () const
 Returns the current child, or null element in case of an invalid iterator.
 
ArchiveIteratoroperator++ ()
 Prefix increment operator, changes the iterator to point to the next element. More...
 
bool operator== (const ArchiveIterator &other) const
 Compares if the iterators point to the same element.
 

Detailed Description

Child iterator for ArchiveElement children, uses instance of ArchiveIteratorImpl to provide implementation for different element types.

Constructor & Destructor Documentation

Valuable::ArchiveIterator::ArchiveIterator ( std::shared_ptr< ArchiveIteratorImpl impl)

Construct a new ArchiveIterator.

Parameters
implThe ArchiveIterator implementation to use, has to be valid pointer.

Member Function Documentation

Valuable::ArchiveIterator::operator bool ( ) const

Returns NULL if the iterator is not valid anymore.

Can be used like for(it = foo.children(); it; ++it) {}

Returns
true if the iterator is still valid
ArchiveIterator& Valuable::ArchiveIterator::operator++ ( )

Prefix increment operator, changes the iterator to point to the next element.

Returns
Returns itself after moving the location.