2011-06-14 14:31:25 +08:00
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
class CCUserDefault
|
2011-06-14 14:31:25 +08:00
|
|
|
{
|
2012-02-02 14:26:38 +08:00
|
|
|
// get value methods
|
|
|
|
bool getBoolForKey(const char* pKey);
|
|
|
|
int getIntegerForKey(const char* pKey);
|
|
|
|
float getFloatForKey(const char* pKey);
|
|
|
|
double getDoubleForKey(const char* pKey);
|
|
|
|
std::string getStringForKey(const char* pKey);
|
|
|
|
|
|
|
|
// set value methods
|
|
|
|
void setBoolForKey(const char* pKey, bool value);
|
|
|
|
void setIntegerForKey(const char* pKey, int value);
|
|
|
|
void setFloatForKey(const char* pKey, float value);
|
|
|
|
void setDoubleForKey(const char* pKey, double value);
|
|
|
|
void setStringForKey(const char* pKey, std::string value);
|
|
|
|
|
2012-08-10 18:14:04 +08:00
|
|
|
void flush();
|
|
|
|
|
2013-07-12 23:58:31 +08:00
|
|
|
static CCUserDefault* getInstance();
|
|
|
|
static void destroyInstance();
|
|
|
|
|
2012-02-02 14:26:38 +08:00
|
|
|
const static std::string& getXMLFilePath();
|
2011-06-14 14:31:25 +08:00
|
|
|
};
|