typedef struct { } OmtkDictionary;
You shouldn't access this structure directly, because it may change.
#define OMTK_DICTIONARY_FOREACH(dict, key, object)
OmtkDictionary *omtk_dictionary_create(void);
Creates a new dictionary. A dictionary is something like a list with key-object pairs, for example:
OmtkDictionary ------------------------ Key (here: month): 1 2 3 ... Object (here: income): 4500 4000 4250 ...
void omtk_dictionary_object_add(OmtkDictionary *dictionary, void *key, \ void *object);
Adds a new key-object pair to the dictionary.
Example:
omtk_dictionary_object_add(dict, (void *)1, (void *)4500);
int omtk_dictionary_object_get(OmtkDictionary *dict, void *key, void **object);
Stores the object of key in object.
Example:
int x; if (omtk_dictionary_object_get(dict, (void *)2, &x)) printf("The income was %d dollars.\n", x);
void omtk_dictionary_rewind(OmtkDictionary *dict);
int omtk_dictionary_next(OmtkDictionary *dict, void **key, void **object);
int omtk_dictionary_count(OmtkDictionary *dict);
void omtk_dictionary_print(OmtkDictionary *dict);
void omtk_dictionary_free(OmtkDictionary *dict);
You have to call this function to free the dictionary.
Zurück zu www.eggdrop.ch | Back to www.eggdrop.ch Last update: 20.02.04 |
Copyright (C) 2004, 2005 by Thomas "tom" Steinacher <tom at eggdrop.ch> |