Google APIs Client Library for C++
JsonCppDictionary Class Reference

Denotes a JsonCppData instance that is a dictionary. More...

#include "client/data/jsoncpp_data.h"

+ Inheritance diagram for JsonCppDictionary:

List of all members.

Public Member Functions

 JsonCppDictionary (const Json::Value &value)
 JsonCppDictionary (Json::Value *value)
int size () const
bool has (const char *key) const
void remove (const char *key)
void put_value (const char *key, const Json::Value &data)
 NOTE(ewiseblatt): 20120827 The data value here is mutable.
void put_object (const char *key, const JsonCppData &value)
const Json::Value & as_value (const char *key) const
const JsonCppData as_object (const char *key) const
JsonCppData mutable_object (const char *key)

Detailed Description

Denotes a JsonCppData instance that is a dictionary.

The JsonCppData wraps a shared reference to jsoncpp values. Multiple objects may reference the same values. A dictionary does not have homogenous value types. Usually you want to use an associative array instead.

This class is not thread-safe.

See also:
JsonCppAssociativeArray

Constructor & Destructor Documentation

JsonCppDictionary ( const Json::Value &  value) [explicit]
JsonCppDictionary ( Json::Value *  value) [explicit]

Member Function Documentation

const JsonCppData as_object ( const char *  key) const [inline]
const Json::Value& as_value ( const char *  key) const [inline]
bool has ( const char *  key) const [inline]
JsonCppData mutable_object ( const char *  key) [inline]
void put_object ( const char *  key,
const JsonCppData value 
) [inline]
void put_value ( const char *  key,
const Json::Value &  data 
) [inline]

NOTE(ewiseblatt): 20120827 The data value here is mutable.

Currently there isnt a way to have just const values in a dictionary.

void remove ( const char *  key) [inline]
int size ( ) const [inline]

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