Coconut Framework
beta
|
Define CNObjectDictionary data structure. More...
Go to the source code of this file.
Classes | |
struct | CNObjectDictionary |
Dictionary of CNObject. More... | |
Functions | |
void | CNInitObjectDictionary (struct CNObjectDictionary *dst, struct CNResource *resource) |
Initialize CNObjectDictionary. More... | |
static void | CNDestroyObjectDictionary (struct CNObjectDictionary *dst) |
Deallocate CNObjectDictionary. More... | |
static size_t | CNCountOfObjectDictionary (const struct CNObjectDictionary *src) |
Number of items in object dictionary. More... | |
static struct CNResource * | CNResourceOfObjectDictionary (struct CNObjectDictionary *src) |
Get resource fot the object dictionary. More... | |
static struct CNObject * | CNSearchObjectInDictionary (const struct CNObjectDictionary *dict, const struct CNFixedString *key) |
Search object in CNObject dictionary. More... | |
static void | CNSetObjectToDictionary (struct CNObjectDictionary *dict, const struct CNFixedString *key, struct CNObject *value) |
Set object for key to CNObjectDictionary. More... | |
struct CNObjectList | CNListOfObjectsInDictionary (const struct CNObjectDictionary *src, struct CNResource *resource) |
Allocate list of all objects in the object dictionary. More... | |
struct CNList | CNListOfKeysInDictionary (struct CNObjectDictionary *src) |
Allocate list of all keys in the object dictionary. More... | |
struct CNObjectList | CNElementListOfObjectDictionary (const struct CNObjectDictionary *src, struct CNResource *resource) |
Make object list of dictionary. More... | |
static CNBoolean | CNVisitElementOfObjectDictionary (const struct CNObjectDictionary *src, CNVisitElementOfDictionaryFuncRef visitfunc, void *info) |
Visit all elements in the object dictionary. More... | |
Define CNObjectDictionary data structure.
void CNInitObjectDictionary | ( | struct CNObjectDictionary * | dst, |
struct CNResource * | resource | ||
) |
Initialize CNObjectDictionary.
dst | Destination dictionary |
resource | Resource to allocate dictionary |
|
inlinestatic |
Deallocate CNObjectDictionary.
dst | Destination dictionary |
References CNDestroyDictionary(), and CNObjectDictionary::dataDictionary.
|
inlinestatic |
Number of items in object dictionary.
src | Source object dictionary |
References CNCountOfDictionary(), and CNObjectDictionary::dataDictionary.
|
static |
Get resource fot the object dictionary.
src | Source object dictionary |
References CNResourceOfDictionary(), and CNObjectDictionary::dataDictionary.
|
static |
Search object in CNObject dictionary.
obj | Matched object |
NULL | No matched object |
dict | Source dictionary |
key | Key string |
References CNSearchDataInDictionary(), and CNObjectDictionary::dataDictionary.
|
inlinestatic |
Set object for key to CNObjectDictionary.
dict | Destination dictionary |
key | Key string |
value | Value object |
References CNRetainObject(), CNSetDataToDictionary(), and CNObjectDictionary::dataDictionary.
struct CNObjectList CNListOfObjectsInDictionary | ( | const struct CNObjectDictionary * | src, |
struct CNResource * | resource | ||
) |
Allocate list of all objects in the object dictionary.
src | Source object dictionary |
resource | Resource to allocate the list |
struct CNList CNListOfKeysInDictionary | ( | struct CNObjectDictionary * | src | ) |
Allocate list of all keys in the object dictionary.
src | Source object dictionary |
struct CNObjectList CNElementListOfObjectDictionary | ( | const struct CNObjectDictionary * | src, |
struct CNResource * | resource | ||
) |
Make object list of dictionary.
src | Source object dictionary |
resource | Resource to allocate the list |
|
inlinestatic |
Visit all elements in the object dictionary.
TRUE | All elements are visited |
FALSE | All elements are NOT visited |
src | Source array |
visitfunc | Function which is called foreach elements |
info | Additiona parameter for visit function |
References CNVisitElementOfDictionary(), and CNObjectDictionary::dataDictionary.