cocos2d-x  2.2.3-gd2.113-rev1ec524e
Loading...
Searching...
No Matches
DS_Dictionary Class Reference

#include <DS_Dictionary.h>

Public Member Functions

std::string cleanStringWhiteSpace (const std::string &)
 
void split (const std::string &, char *, const std::vector< std::string > &)
 
bool splitWithForm (const std::string &, std::vector< std::string > &)
 
bool rectFromString (const std::string &, cocos2d::CCRect &)
 
bool vec2FromString (const std::string &, cocos2d::CCPoint &)
 
 DS_Dictionary ()
 
 ~DS_Dictionary ()
 
cocos2d::CCObjectdecodeObjectForKey (const char *, bool, int)
 
bool loadRootSubDictFromFile (const char *)
 
bool loadRootSubDictFromCompressedFile (const char *)
 
bool loadRootSubDictFromString (std::string)
 
bool saveRootSubDictToFile (const char *)
 
bool saveRootSubDictToCompressedFile (const char *)
 
std::string saveRootSubDictToString ()
 
bool stepIntoSubDictWithKey (const char *)
 
void stepOutOfSubDict ()
 
void stepBackToRootSubDict ()
 
unsigned int getNumKeys ()
 
std::string getKey (unsigned int)
 
std::vector< std::string > getAllKeys ()
 
unsigned int getIndexOfKey (const char *)
 
unsigned int getIndexOfKeyWithClosestAlphaNumericalMatch (const char *)
 
void removeKey (unsigned int)
 
void removeKey (const char *)
 
void removeAllKeys ()
 
int getIntegerForKey (const char *)
 
bool getBoolForKey (const char *)
 
float getFloatForKey (const char *)
 
std::string getStringForKey (const char *)
 
cocos2d::CCPoint getVec2ForKey (const char *)
 
cocos2d::CCRect getRectForKey (const char *)
 
std::vector< std::string > getStringArrayForKey (const char *)
 
std::vector< cocos2d::CCPointgetVec2ArrayForKey (const char *)
 
std::vector< cocos2d::CCRectgetRectArrayForKey (const char *)
 
cocos2d::CCArraygetArrayForKey (const char *, bool)
 
cocos2d::CCDictionarygetDictForKey (const char *, bool)
 
cocos2d::CCObjectgetObjectForKey (const char *)
 
void setIntegerForKey (const char *, int)
 
void setIntegerForKey (const char *, int, bool)
 
void setBoolForKey (const char *, bool)
 
void setBoolForKey (const char *, bool, bool)
 
void setFloatForKey (const char *, float)
 
void setFloatForKey (const char *, float, bool)
 
void setStringForKey (const char *, const std::string &)
 
void setStringForKey (const char *, const std::string &, bool)
 
void setVec2ForKey (const char *, const cocos2d::CCPoint &)
 
void setVec2ForKey (const char *, const cocos2d::CCPoint &, bool)
 
void setRectForKey (const char *, const cocos2d::CCRect &)
 
void setRectForKey (const char *, const cocos2d::CCRect &, bool)
 
void setStringArrayForKey (const char *, const std::vector< std::string > &)
 
void setStringArrayForKey (const char *, const std::vector< std::string > &, bool)
 
void setVec2ArrayForKey (const char *, const std::vector< cocos2d::CCPoint > &)
 
void setVec2ArrayForKey (const char *, const std::vector< cocos2d::CCPoint > &, bool)
 
void setRectArrayForKey (const char *, const std::vector< cocos2d::CCRect > &)
 
void setRectArrayForKey (const char *, const std::vector< cocos2d::CCRect > &, bool)
 
void setArrayForKey (const char *, cocos2d::CCArray *)
 
void setBoolMapForKey (const char *, const std::map< std::string, bool > &)
 
void setSubDictForKey (const char *)
 
void setSubDictForKey (const char *, bool, bool)
 
void setDictForKey (const char *, cocos2d::CCDictionary *)
 
void setObjectForKey (const char *, cocos2d::CCObject *)
 
void addBoolValuesToMapForKey (const std::map< std::string, bool > &, const char *, bool)
 
void addBoolValuesToMapForKeySpecial (const std::map< std::string, bool > &, const char *, bool)
 
void checkCompatibility ()
 

Static Public Member Functions

static void copyFile (const char *, const char *)
 

Public Attributes

pugi::xml_document doc
 
std::vector< pugi::xml_node > dictTree
 
bool compatible
 

Constructor & Destructor Documentation

◆ DS_Dictionary()

◆ ~DS_Dictionary()

Member Function Documentation

◆ addBoolValuesToMapForKey()

void addBoolValuesToMapForKey ( const std::map< std::string, bool > &  ,
const char *  ,
bool   
)

◆ addBoolValuesToMapForKeySpecial()

void addBoolValuesToMapForKeySpecial ( const std::map< std::string, bool > &  ,
const char *  ,
bool   
)

◆ checkCompatibility()

void checkCompatibility ( )

◆ cleanStringWhiteSpace()

std::string cleanStringWhiteSpace ( const std::string &  )

◆ copyFile()

static void copyFile ( const char *  ,
const char *   
)
static

◆ decodeObjectForKey()

cocos2d::CCObject * decodeObjectForKey ( const char *  ,
bool  ,
int   
)

◆ getAllKeys()

std::vector< std::string > getAllKeys ( )

◆ getArrayForKey()

cocos2d::CCArray * getArrayForKey ( const char *  ,
bool   
)

◆ getBoolForKey()

bool getBoolForKey ( const char *  )

◆ getDictForKey()

cocos2d::CCDictionary * getDictForKey ( const char *  ,
bool   
)

◆ getFloatForKey()

float getFloatForKey ( const char *  )

◆ getIndexOfKey()

unsigned int getIndexOfKey ( const char *  )

◆ getIndexOfKeyWithClosestAlphaNumericalMatch()

unsigned int getIndexOfKeyWithClosestAlphaNumericalMatch ( const char *  )

◆ getIntegerForKey()

int getIntegerForKey ( const char *  )

◆ getKey()

std::string getKey ( unsigned int  )

◆ getNumKeys()

unsigned int getNumKeys ( )

◆ getObjectForKey()

cocos2d::CCObject * getObjectForKey ( const char *  )

◆ getRectArrayForKey()

std::vector< cocos2d::CCRect > getRectArrayForKey ( const char *  )

◆ getRectForKey()

cocos2d::CCRect getRectForKey ( const char *  )

◆ getStringArrayForKey()

std::vector< std::string > getStringArrayForKey ( const char *  )

◆ getStringForKey()

std::string getStringForKey ( const char *  )

◆ getVec2ArrayForKey()

std::vector< cocos2d::CCPoint > getVec2ArrayForKey ( const char *  )

◆ getVec2ForKey()

cocos2d::CCPoint getVec2ForKey ( const char *  )

◆ loadRootSubDictFromCompressedFile()

bool loadRootSubDictFromCompressedFile ( const char *  )

◆ loadRootSubDictFromFile()

bool loadRootSubDictFromFile ( const char *  )

◆ loadRootSubDictFromString()

bool loadRootSubDictFromString ( std::string  )

◆ rectFromString()

bool rectFromString ( const std::string &  ,
cocos2d::CCRect  
)

◆ removeAllKeys()

void removeAllKeys ( )

◆ removeKey() [1/2]

void removeKey ( const char *  )

◆ removeKey() [2/2]

void removeKey ( unsigned int  )

◆ saveRootSubDictToCompressedFile()

bool saveRootSubDictToCompressedFile ( const char *  )

◆ saveRootSubDictToFile()

bool saveRootSubDictToFile ( const char *  )

◆ saveRootSubDictToString()

std::string saveRootSubDictToString ( )

◆ setArrayForKey()

void setArrayForKey ( const char *  ,
cocos2d::CCArray  
)

◆ setBoolForKey() [1/2]

void setBoolForKey ( const char *  ,
bool   
)

◆ setBoolForKey() [2/2]

void setBoolForKey ( const char *  ,
bool  ,
bool   
)

◆ setBoolMapForKey()

void setBoolMapForKey ( const char *  ,
const std::map< std::string, bool > &   
)

◆ setDictForKey()

void setDictForKey ( const char *  ,
cocos2d::CCDictionary  
)

◆ setFloatForKey() [1/2]

void setFloatForKey ( const char *  ,
float   
)

◆ setFloatForKey() [2/2]

void setFloatForKey ( const char *  ,
float  ,
bool   
)

◆ setIntegerForKey() [1/2]

void setIntegerForKey ( const char *  ,
int   
)

◆ setIntegerForKey() [2/2]

void setIntegerForKey ( const char *  ,
int  ,
bool   
)

◆ setObjectForKey()

void setObjectForKey ( const char *  ,
cocos2d::CCObject  
)

◆ setRectArrayForKey() [1/2]

void setRectArrayForKey ( const char *  ,
const std::vector< cocos2d::CCRect > &   
)

◆ setRectArrayForKey() [2/2]

void setRectArrayForKey ( const char *  ,
const std::vector< cocos2d::CCRect > &  ,
bool   
)

◆ setRectForKey() [1/2]

void setRectForKey ( const char *  ,
const cocos2d::CCRect  
)

◆ setRectForKey() [2/2]

void setRectForKey ( const char *  ,
const cocos2d::CCRect ,
bool   
)

◆ setStringArrayForKey() [1/2]

void setStringArrayForKey ( const char *  ,
const std::vector< std::string > &   
)

◆ setStringArrayForKey() [2/2]

void setStringArrayForKey ( const char *  ,
const std::vector< std::string > &  ,
bool   
)

◆ setStringForKey() [1/2]

void setStringForKey ( const char *  ,
const std::string &   
)

◆ setStringForKey() [2/2]

void setStringForKey ( const char *  ,
const std::string &  ,
bool   
)

◆ setSubDictForKey() [1/2]

void setSubDictForKey ( const char *  )

◆ setSubDictForKey() [2/2]

void setSubDictForKey ( const char *  ,
bool  ,
bool   
)

◆ setVec2ArrayForKey() [1/2]

void setVec2ArrayForKey ( const char *  ,
const std::vector< cocos2d::CCPoint > &   
)

◆ setVec2ArrayForKey() [2/2]

void setVec2ArrayForKey ( const char *  ,
const std::vector< cocos2d::CCPoint > &  ,
bool   
)

◆ setVec2ForKey() [1/2]

void setVec2ForKey ( const char *  ,
const cocos2d::CCPoint  
)

◆ setVec2ForKey() [2/2]

void setVec2ForKey ( const char *  ,
const cocos2d::CCPoint ,
bool   
)

◆ split()

void split ( const std::string &  ,
char *  ,
const std::vector< std::string > &   
)

◆ splitWithForm()

bool splitWithForm ( const std::string &  ,
std::vector< std::string > &   
)

◆ stepBackToRootSubDict()

void stepBackToRootSubDict ( )

◆ stepIntoSubDictWithKey()

bool stepIntoSubDictWithKey ( const char *  )

◆ stepOutOfSubDict()

void stepOutOfSubDict ( )

◆ vec2FromString()

bool vec2FromString ( const std::string &  ,
cocos2d::CCPoint  
)

Member Data Documentation

◆ compatible

bool compatible

◆ dictTree

std::vector<pugi::xml_node> dictTree

◆ doc

pugi::xml_document doc

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