NDDEM
Public Member Functions | Private Types | Private Attributes | List of all members
cereal::JSONInputArchive::Iterator Class Reference

An internal iterator that handles both array and object types. More...

Public Member Functions

 Iterator ()
 
 Iterator (MemberIterator begin, MemberIterator end)
 
 Iterator (ValueIterator begin, ValueIterator end)
 
Iteratoroperator++ ()
 Advance to the next node. More...
 
GenericValue constvalue ()
 Get the value of the current node. More...
 
const char * name () const
 Get the name of the current node, or nullptr if it has no name. More...
 
void search (const char *searchName)
 Adjust our position such that we are at the node with the given name. More...
 

Private Types

enum  Type { Value , Member , Null_ }
 

Private Attributes

MemberIterator itsMemberItBegin
 
MemberIterator itsMemberItEnd
 The member iterator (object) More...
 
ValueIterator itsValueItBegin
 The value iterator (array) More...
 
size_t itsIndex
 
size_t itsSize
 The current index of this iterator. More...
 
enum cereal::JSONInputArchive::Iterator::Type itsType
 Whether this holds values (array) or members (objects) or nothing. More...
 

Detailed Description

An internal iterator that handles both array and object types.

This class is a variant and holds both types of iterators that rapidJSON supports - one for arrays and one for objects.

Member Enumeration Documentation

◆ Type

Enumerator
Value 
Member 
Null_ 

Constructor & Destructor Documentation

◆ Iterator() [1/3]

cereal::JSONInputArchive::Iterator::Iterator ( )
inline

◆ Iterator() [2/3]

cereal::JSONInputArchive::Iterator::Iterator ( MemberIterator  begin,
MemberIterator  end 
)
inline

◆ Iterator() [3/3]

cereal::JSONInputArchive::Iterator::Iterator ( ValueIterator  begin,
ValueIterator  end 
)
inline

Member Function Documentation

◆ name()

const char* cereal::JSONInputArchive::Iterator::name ( ) const
inline

Get the name of the current node, or nullptr if it has no name.

◆ operator++()

Iterator& cereal::JSONInputArchive::Iterator::operator++ ( )
inline

Advance to the next node.

◆ search()

void cereal::JSONInputArchive::Iterator::search ( const char *  searchName)
inline

Adjust our position such that we are at the node with the given name.

Exceptions
Exceptionif no such named node exists

◆ value()

GenericValue const& cereal::JSONInputArchive::Iterator::value ( )
inline

Get the value of the current node.

Member Data Documentation

◆ itsIndex

size_t cereal::JSONInputArchive::Iterator::itsIndex
private

◆ itsMemberItBegin

MemberIterator cereal::JSONInputArchive::Iterator::itsMemberItBegin
private

◆ itsMemberItEnd

MemberIterator cereal::JSONInputArchive::Iterator::itsMemberItEnd
private

The member iterator (object)

◆ itsSize

size_t cereal::JSONInputArchive::Iterator::itsSize
private

The current index of this iterator.

◆ itsType

enum cereal::JSONInputArchive::Iterator::Type cereal::JSONInputArchive::Iterator::itsType
private

Whether this holds values (array) or members (objects) or nothing.

◆ itsValueItBegin

ValueIterator cereal::JSONInputArchive::Iterator::itsValueItBegin
private

The value iterator (array)


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