cocos2d-x  2.2.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DictionaryHelper Class Reference

#include <DictionaryHelper.h>

Public Member Functions

 DictionaryHelper ()
 ~DictionaryHelper ()
cocos2d::CCDictionarygetSubDictionary (cocos2d::CCDictionary *root, const char *key)
int getIntValue (cocos2d::CCDictionary *root, const char *key)
float getFloatValue (cocos2d::CCDictionary *root, const char *key)
const char * getStringValue (cocos2d::CCDictionary *root, const char *key)
bool getBooleanValue (cocos2d::CCDictionary *root, const char *key)
cocos2d::CCArraygetArrayValue (cocos2d::CCDictionary *root, const char *key)
cocos2d::CCObjectcheckObjectExist (cocos2d::CCDictionary *root, const char *key)
int objectToIntValue (cocos2d::CCObject *obj)
float objectToFloatValue (cocos2d::CCObject *obj)
const char * objectToStringValue (cocos2d::CCObject *obj)
bool objectToBooleanValue (cocos2d::CCObject *obj)
cocos2d::CCArrayobjectToCCArray (cocos2d::CCObject *obj)
const rapidjson::ValuegetSubDictionary_json (const rapidjson::Value &root, const char *key)
const rapidjson::ValuegetSubDictionary_json (const rapidjson::Value &root, const char *key, int idx)
const rapidjson::ValuegetSubDictionary_json (const rapidjson::Value &root, int idx)
int getIntValue_json (const rapidjson::Value &root, const char *key, int def=0)
float getFloatValue_json (const rapidjson::Value &root, const char *key, float def=0.0f)
bool getBooleanValue_json (const rapidjson::Value &root, const char *key, bool def=false)
const char * getStringValue_json (const rapidjson::Value &root, const char *key, const char *def=NULL)
int getArrayCount_json (const rapidjson::Value &root, const char *key, int def=0)
int getIntValueFromArray_json (const rapidjson::Value &root, const char *arrayKey, int idx, int def=0)
float getFloatValueFromArray_json (const rapidjson::Value &root, const char *arrayKey, int idx, float def=0.0f)
bool getBoolValueFromArray_json (const rapidjson::Value &root, const char *arrayKey, int idx, bool def=false)
const char * getStringValueFromArray_json (const rapidjson::Value &root, const char *arrayKey, int idx, const char *def=NULL)
const rapidjson::ValuegetDictionaryFromArray_json (const rapidjson::Value &root, const char *key, int idx)
bool checkObjectExist_json (const rapidjson::Value &root)
bool checkObjectExist_json (const rapidjson::Value &root, const char *key)
bool checkObjectExist_json (const rapidjson::Value &root, int index)

Static Public Member Functions

static DictionaryHelpershareHelper ()
static void purgeDictionaryHelper ()

Constructor & Destructor Documentation

Member Function Documentation

cocos2d::CCObject* checkObjectExist ( cocos2d::CCDictionary root,
const char *  key 
)
bool checkObjectExist_json ( const rapidjson::Value root)
bool checkObjectExist_json ( const rapidjson::Value root,
const char *  key 
)
bool checkObjectExist_json ( const rapidjson::Value root,
int  index 
)
int getArrayCount_json ( const rapidjson::Value root,
const char *  key,
int  def = 0 
)
cocos2d::CCArray* getArrayValue ( cocos2d::CCDictionary root,
const char *  key 
)
bool getBooleanValue ( cocos2d::CCDictionary root,
const char *  key 
)
bool getBooleanValue_json ( const rapidjson::Value root,
const char *  key,
bool  def = false 
)
bool getBoolValueFromArray_json ( const rapidjson::Value root,
const char *  arrayKey,
int  idx,
bool  def = false 
)
const rapidjson::Value&
getDictionaryFromArray_json
( const rapidjson::Value root,
const char *  key,
int  idx 
)
float getFloatValue ( cocos2d::CCDictionary root,
const char *  key 
)
float getFloatValue_json ( const rapidjson::Value root,
const char *  key,
float  def = 0.0f 
)
float getFloatValueFromArray_json ( const rapidjson::Value root,
const char *  arrayKey,
int  idx,
float  def = 0.0f 
)
int getIntValue ( cocos2d::CCDictionary root,
const char *  key 
)
int getIntValue_json ( const rapidjson::Value root,
const char *  key,
int  def = 0 
)
int getIntValueFromArray_json ( const rapidjson::Value root,
const char *  arrayKey,
int  idx,
int  def = 0 
)
const char* getStringValue ( cocos2d::CCDictionary root,
const char *  key 
)
const char* getStringValue_json ( const rapidjson::Value root,
const char *  key,
const char *  def = NULL 
)
const char*
getStringValueFromArray_json
( const rapidjson::Value root,
const char *  arrayKey,
int  idx,
const char *  def = NULL 
)
cocos2d::CCDictionary*
getSubDictionary
( cocos2d::CCDictionary root,
const char *  key 
)
const rapidjson::Value&
getSubDictionary_json
( const rapidjson::Value root,
const char *  key 
)
const rapidjson::Value&
getSubDictionary_json
( const rapidjson::Value root,
const char *  key,
int  idx 
)
const rapidjson::Value&
getSubDictionary_json
( const rapidjson::Value root,
int  idx 
)
bool objectToBooleanValue ( cocos2d::CCObject obj)
cocos2d::CCArray* objectToCCArray ( cocos2d::CCObject obj)
float objectToFloatValue ( cocos2d::CCObject obj)
int objectToIntValue ( cocos2d::CCObject obj)
const char* objectToStringValue ( cocos2d::CCObject obj)
static void purgeDictionaryHelper ( )
static
static DictionaryHelper*
shareHelper
( )
static

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