Google APIs Client Library for C++
JsonCppConstAssociativeIterator< T > Class Template Reference

Iterator for JsonCppDataAssociativeArray. More...

#include "client/data/jsoncpp_data.h"

+ Inheritance diagram for JsonCppConstAssociativeIterator< T >:

List of all members.

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 > &copy)
 ~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.
value () const

Friends

class JsonCppAssociativeArray< T >

Detailed Description

template<typename T>
class googleapis::client::JsonCppConstAssociativeIterator< T >

Iterator for JsonCppDataAssociativeArray.


Member Typedef Documentation

typedef pair<const string, T> reference
typedef JsonCppAbstractIterator<pair<const string, T>, Json::Value::const_iterator> SuperClass

Constructor & Destructor Documentation


Member Function Documentation

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]

If you only care about one part of the pair, consider key() or value().

T value ( ) const [inline]

Friends And Related Function Documentation

friend class JsonCppAssociativeArray< T > [friend]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines