Documentation
Urho3D::JSONValue Class Reference
JSON value class. More...
#include <JSONValue.h>
Collaboration diagram for Urho3D::JSONValue:
Public Member Functions | |
JSONValue () | |
Construct null value. | |
JSONValue (bool value) | |
Construct with a boolean. | |
JSONValue (int value) | |
Construct with a integer. | |
JSONValue (unsigned value) | |
Construct with a unsigned integer. | |
JSONValue (float value) | |
Construct with a float. | |
JSONValue (double value) | |
Construct with a double. | |
JSONValue (const String &value) | |
Construct with a string. | |
JSONValue (const char *value) | |
Construct with a C string. | |
JSONValue (const JSONArray &value) | |
Construct with a JSON array. | |
JSONValue (const JSONObject &value) | |
Construct with a JSON object. | |
JSONValue (const JSONValue &value) | |
Copy-construct from another JSON value. | |
~JSONValue () | |
Destruct. | |
JSONValue & | operator= (bool rhs) |
Assign from a boolean. | |
JSONValue & | operator= (int rhs) |
Assign from an integer. | |
JSONValue & | operator= (unsigned rhs) |
Assign from an unsigned integer. | |
JSONValue & | operator= (float rhs) |
Assign from a float. | |
JSONValue & | operator= (double rhs) |
Assign from a double. | |
JSONValue & | operator= (const String &rhs) |
Assign from a string. | |
JSONValue & | operator= (const char *rhs) |
Assign from a C string. | |
JSONValue & | operator= (const JSONArray &rhs) |
Assign from a JSON array. | |
JSONValue & | operator= (const JSONObject &rhs) |
Assign from a JSON object. | |
JSONValue & | operator= (const JSONValue &rhs) |
Assign from another JSON value. | |
JSONValueType | GetValueType () const |
Return value type. | |
JSONNumberType | GetNumberType () const |
Return number type. | |
bool | IsNull () const |
Check is null. | |
bool | IsBool () const |
Check is boolean. | |
bool | IsNumber () const |
Check is number. | |
bool | IsString () const |
Check is string. | |
bool | IsArray () const |
Check is array. | |
bool | IsObject () const |
Check is object. | |
bool | GetBool () const |
Return boolean value. | |
int | GetInt () const |
Return integer value. | |
unsigned | GetUInt () const |
Return unsigned integer value. | |
float | GetFloat () const |
Return float value. | |
double | GetDouble () const |
Return double value. | |
const String & | GetString () const |
Return string value. | |
const char * | GetCString () const |
Return C string value. | |
const JSONArray & | GetArray () const |
Return JSON array value. | |
const JSONObject & | GetObject () const |
Return JSON object value. | |
JSONValue & | operator[] (unsigned index) |
Return JSON value at index. | |
const JSONValue & | operator[] (unsigned index) const |
Return JSON value at index. | |
void | Push (const JSONValue &value) |
Add JSON value at end. | |
void | Pop () |
Remove the last JSON value. | |
void | Insert (unsigned pos, const JSONValue &value) |
Insert an JSON value at position. | |
void | Erase (unsigned pos, unsigned length=1) |
Erase a range of JSON values. | |
void | Resize (unsigned newSize) |
Resize array. | |
unsigned | Size () const |
Return size of array. | |
JSONValue & | operator[] (const String &key) |
Return JSON value with key. | |
const JSONValue & | operator[] (const String &key) const |
Return JSON value with key. | |
void | Set (const String &key, const JSONValue &value) |
Set JSON value with key. | |
const JSONValue & | Get (const String &key) const |
Return JSON value with key. | |
bool | Erase (const String &key) |
Erase a pair by key. | |
bool | Contains (const String &key) const |
Return whether contains a pair with key. | |
JSONObjectIterator | Begin () |
Return iterator to the beginning. | |
ConstJSONObjectIterator | Begin () const |
Return iterator to the beginning. | |
JSONObjectIterator | End () |
Return iterator to the end. | |
ConstJSONObjectIterator | End () const |
Return iterator to the beginning. | |
void | Clear () |
Clear array or object. | |
void | SetType (JSONValueType valueType, JSONNumberType numberType=JSONNT_NAN) |
Set value type and number type, internal function. | |
void | SetVariant (const Variant &variant, Context *context=0) |
Set variant, context must provide for resource ref. | |
Variant | GetVariant () const |
Return a variant. | |
void | SetVariantValue (const Variant &variant, Context *context=0) |
Set variant value, context must provide for resource ref. | |
Variant | GetVariantValue (VariantType type) const |
Return a variant with type. | |
void | SetVariantMap (const VariantMap &variantMap, Context *context=0) |
Set variant map, context must provide for resource ref. | |
VariantMap | GetVariantMap () const |
Return a variant map. | |
void | SetVariantVector (const VariantVector &variantVector, Context *context=0) |
Set variant vector, context must provide for resource ref. | |
VariantVector | GetVariantVector () const |
Return a variant vector. | |
Static Public Attributes | |
static const JSONValue | EMPTY |
Empty JSON value. | |
static const JSONArray | emptyArray |
Empty JSON array. | |
static const JSONObject | emptyObject |
Empty JSON object. | |
Private Attributes | |
unsigned | type_ |
type. | |
union { | |
bool boolValue_ | |
Boolean value. | |
double numberValue_ | |
Number value. | |
String * stringValue_ | |
String value. | |
JSONArray * arrayValue_ | |
Array value. | |
JSONObject * objectValue_ | |
Object value. | |
}; | |
Detailed Description
JSON value class.
The documentation for this class was generated from the following files:
- /home/travis/build/urho3d/Urho3D/Source/Urho3D/Resource/JSONValue.h
- /home/travis/build/urho3d/Urho3D/Source/Urho3D/Resource/JSONValue.cpp