DictElement is used for traversing Dictionary.
More...
#include <CCDictionary.h>
DictElement is used for traversing Dictionary.
A DictElement is one element of Dictionary, 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 Dictionary has the same key type(integer or string).
DictElement* pElement;
{
const char*key = pElement->getStrKey();
Sprite* pSprite = static_cast<Sprite*>(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 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 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.
Get the object of this element.
- Returns
- The object 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.
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.
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: