2012-04-26 09:34:42 +08:00
|
|
|
class CCDictionary : public CCObject
|
|
|
|
{
|
|
|
|
unsigned int count();
|
|
|
|
CCArray* allKeys();
|
|
|
|
CCArray* allKeysForObject(CCObject* object);
|
|
|
|
|
2012-04-26 11:39:49 +08:00
|
|
|
CCObject* objectForKey(const std::string& key);
|
2012-04-26 09:34:42 +08:00
|
|
|
CCObject* objectForKey(int key);
|
2012-04-26 11:39:49 +08:00
|
|
|
const CCString* valueForKey(const std::string& key);
|
2012-04-26 09:34:42 +08:00
|
|
|
const CCString* valueForKey(int key);
|
|
|
|
|
|
|
|
|
2012-04-26 11:39:49 +08:00
|
|
|
void setObject(CCObject* pObject, const std::string& key);
|
2012-04-26 09:34:42 +08:00
|
|
|
void setObject(CCObject* pObject, int key);
|
|
|
|
|
2012-04-26 11:39:49 +08:00
|
|
|
void removeObjectForKey(const std::string& key);
|
2012-04-26 09:34:42 +08:00
|
|
|
void removeObjectForKey(int key);
|
|
|
|
void removeObjectsForKeys(CCArray* pKeyArray);
|
|
|
|
void removeAllObjects();
|
|
|
|
|
2012-06-15 11:46:51 +08:00
|
|
|
static CCDictionary* create();
|
2012-06-27 14:21:29 +08:00
|
|
|
static CCDictionary* create(CCDictionary* srcDict);
|
|
|
|
static CCDictionary* create(const char *pFileName);
|
2012-04-26 09:34:42 +08:00
|
|
|
|
|
|
|
};
|
|
|
|
|