Google APIs Client Library for C++
|
Iterator for JsonCppDataAssociativeArray. More...
#include "client/data/jsoncpp_data.h"
Public Types | |
typedef JsonCppConstAssociativeIterator < T > | SelfType |
typedef pair< const string, T > | reference |
typedef JsonCppAbstractIterator< pair < const string, T > , Json::Value::const_iterator > | SuperClass |
Public Member Functions | |
JsonCppConstAssociativeIterator (const JsonCppConstAssociativeIterator< T > ©) | |
~JsonCppConstAssociativeIterator () | |
reference | operator* () const |
If you only care about one part of the pair, consider key() or value(). | |
const string | key () const |
This returns a copy of the string, not a reference to the string. | |
T | value () const |
Friends | |
class | JsonCppAssociativeArray< T > |
Iterator for JsonCppDataAssociativeArray.
typedef pair<const string, T> reference |
typedef JsonCppConstAssociativeIterator<T> SelfType |
Reimplemented from JsonCppAbstractIterator< pair< const string, T >, Json::Value::const_iterator >.
typedef JsonCppAbstractIterator<pair<const string, T>, Json::Value::const_iterator> SuperClass |
JsonCppConstAssociativeIterator | ( | const JsonCppConstAssociativeIterator< T > & | copy | ) | [inline] |
~JsonCppConstAssociativeIterator | ( | ) | [inline] |
const string key | ( | ) | const [inline] |
This returns a copy of the string, not a reference to the string.
Unfortunately this is an implementation detail caused by limitations of the underlying data model.
The iterator retuns a local object so the CString/string values disappear ones it leaves scope, forcing us to have to return a copy.
reference operator* | ( | ) | const [inline] |
T value | ( | ) | const [inline] |
friend class JsonCppAssociativeArray< T > [friend] |