CCDictElement is used for traversing CCDictionary.
More...
#include <CCDictionary.h>
CCDictElement is used for traversing CCDictionary.
A CCDictElement is one element of CCDictionary, it contains two properties, key and object. Its key has two different type (integer and string).
- Note
- The key type is unique, all the elements in CCDictionary has the same key type(integer or string).
CCDictElement* pElement;
{
const char*key = pElement->getStrKey();
CCSprite* pSprite = (CCSprite*)pElement->getObject();
}
Get the integer key of this element.
- Note
- This method assumes you know the key type in the element. If the element's key type is string, invoking this method will cause an assert.
- Returns
- The integer key of this element.
Get the object of this element.
- Returns
- The object of this element.
const char* getStrKey |
( |
) | |
const |
|
inline |
Get the string key of this element.
- Note
- This method assumes you know the key type in the element. If the element's key type is integer, invoking this method will cause an assert.
- Returns
- The string key of this element.
The documentation for this class was generated from the following file: