HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_JSONValue::traverser Class Reference

Traverse the children of the current value. More...

#include <UT_JSONValue.h>

+ Inheritance diagram for UT_JSONValue::traverser:

Public Types

using difference_type = exint
 
using value_type = UT_JSONValue
 
using pointer = value_type *
 
using reference = value_type &
 
using iterator_category = std::forward_iterator_tag
 

Public Member Functions

 traverser ()
 
 traverser (const traverser &src)
 
 ~traverser ()
 
const traverseroperator= (const traverser &src)
 
traverseroperator++ ()
 ++iterator More...
 
bool operator== (const traverser &rhs) const
 No post increment as it is harmful. More...
 
bool operator!= (const traverser &rhs) const
 
const UT_JSONValueoperator* () const
 
UT_JSONValueoperator* ()
 
const UT_JSONValueoperator-> () const
 
UT_JSONValueoperator-> ()
 
bool atEnd () const
 
void advance ()
 
UT_JSONValuegetValue ()
 
const UT_JSONValuegetValue () const
 
int64 getArrayIndex () const
 
bool getKey (UT_String &key)
 Deprecated in favour of UT_StringHolder method. More...
 
bool getLowerCaseKey (UT_String &key)
 Deprecated in favour of UT_StringHolder method. More...
 
bool getKey (UT_StringHolder &key) const
 
bool getLowerCaseKey (UT_StringHolder &key)
 Get a lower case map key (for case insensitive maps) More...
 

Friends

class UT_JSONValue
 

Detailed Description

Traverse the children of the current value.

This class will iterate over all items in this value, whether they are in the form of an array or a map. For values with neither, it will return the current value itself. Note that the getKey() function is only available when this value is a map.

Example:

for (it = value.beginTraversal(); !it.atEnd(); ++it)

Definition at line 444 of file UT_JSONValue.h.

Member Typedef Documentation

using UT_JSONValue::traverser::iterator_category = std::forward_iterator_tag

Definition at line 451 of file UT_JSONValue.h.

Definition at line 449 of file UT_JSONValue.h.

Definition at line 450 of file UT_JSONValue.h.

Constructor & Destructor Documentation

UT_JSONValue::traverser::traverser ( )
inline

Definition at line 453 of file UT_JSONValue.h.

UT_JSONValue::traverser::traverser ( const traverser src)
inline

Definition at line 459 of file UT_JSONValue.h.

UT_JSONValue::traverser::~traverser ( )
inline

Definition at line 463 of file UT_JSONValue.h.

Member Function Documentation

void UT_JSONValue::traverser::advance ( )
inline

Definition at line 506 of file UT_JSONValue.h.

bool UT_JSONValue::traverser::atEnd ( ) const
inline

Definition at line 505 of file UT_JSONValue.h.

int64 UT_JSONValue::traverser::getArrayIndex ( ) const
inline

Definition at line 544 of file UT_JSONValue.h.

bool UT_JSONValue::traverser::getKey ( UT_String key)
inline

Deprecated in favour of UT_StringHolder method.

Definition at line 555 of file UT_JSONValue.h.

bool UT_JSONValue::traverser::getKey ( UT_StringHolder key) const
inline

Definition at line 573 of file UT_JSONValue.h.

bool UT_JSONValue::traverser::getLowerCaseKey ( UT_String key)
inline

Deprecated in favour of UT_StringHolder method.

Definition at line 564 of file UT_JSONValue.h.

bool UT_JSONValue::traverser::getLowerCaseKey ( UT_StringHolder key)
inline

Get a lower case map key (for case insensitive maps)

Definition at line 595 of file UT_JSONValue.h.

UT_JSONValue* UT_JSONValue::traverser::getValue ( )
inline

Returns the child value which corresponds to the current traversal position.

Definition at line 532 of file UT_JSONValue.h.

const UT_JSONValue* UT_JSONValue::traverser::getValue ( ) const
inline

Definition at line 538 of file UT_JSONValue.h.

bool UT_JSONValue::traverser::operator!= ( const traverser rhs) const
inline

Definition at line 485 of file UT_JSONValue.h.

const UT_JSONValue& UT_JSONValue::traverser::operator* ( ) const
inline

Definition at line 489 of file UT_JSONValue.h.

UT_JSONValue& UT_JSONValue::traverser::operator* ( )
inline

Definition at line 493 of file UT_JSONValue.h.

traverser& UT_JSONValue::traverser::operator++ ( )
inline

++iterator

Definition at line 477 of file UT_JSONValue.h.

const UT_JSONValue* UT_JSONValue::traverser::operator-> ( ) const
inline

Definition at line 497 of file UT_JSONValue.h.

UT_JSONValue* UT_JSONValue::traverser::operator-> ( )
inline

Definition at line 501 of file UT_JSONValue.h.

const traverser& UT_JSONValue::traverser::operator= ( const traverser src)
inline

Definition at line 465 of file UT_JSONValue.h.

bool UT_JSONValue::traverser::operator== ( const traverser rhs) const
inline

No post increment as it is harmful.

Definition at line 480 of file UT_JSONValue.h.

Friends And Related Function Documentation

friend class UT_JSONValue
friend

Definition at line 630 of file UT_JSONValue.h.


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