Public Member Functions
~CCUserDefault ()
bool getBoolForKey (const char *pKey, bool defaultValue=false)
Get bool value by key, if the key doesn't exist, a default value will return.
int getIntegerForKey (const char *pKey, int defaultValue=0)
Get integer value by key, if the key doesn't exist, a default value will return.
float getFloatForKey (const char *pKey, float defaultValue=0.0f)
Get float value by key, if the key doesn't exist, a default value will return.
double getDoubleForKey (const char *pKey, double defaultValue=0.0)
Get double value by key, if the key doesn't exist, a default value will return.
std::string getStringForKey (const char *pKey, const std::string &defaultValue="")
Get string value by key, if the key doesn't exist, a default value will return.
void setBoolForKey (const char *pKey, bool value)
Set bool value by key.
void setIntegerForKey (const char *pKey, int value)
Set integer value by key.
void setFloatForKey (const char *pKey, float value)
Set float value by key.
void setDoubleForKey (const char *pKey, double value)
Set double value by key.
void setStringForKey (const char *pKey, const std::string &value)
Set string value by key.
void flush ()
Save content to xml file.
Static Public Member Functions
static CCUserDefault * sharedUserDefault ()
static void purgeSharedUserDefault ()
static const std::string & getXMLFilePath ()