|
RAVE
|
Implementation of a rave object hashtable that maps between strings and rave core objects. More...
Go to the source code of this file.
Typedefs | |
| typedef struct _RaveObjectHashTable_t | RaveObjectHashTable_t |
| Defines a hash table. | |
Functions | |
| int | RaveObjectHashTable_put (RaveObjectHashTable_t *table, const char *key, RaveCoreObject *obj) |
| Inserts a key - object binding in the table. | |
| RaveCoreObject * | RaveObjectHashTable_get (RaveObjectHashTable_t *table, const char *key) |
| Returns the object referred to by key. | |
| int | RaveObjectHashTable_size (RaveObjectHashTable_t *table) |
| Returns the number of items in this table. | |
| int | RaveObjectHashTable_exists (RaveObjectHashTable_t *table, const char *key) |
| Returns if the specified key exists or not. | |
| RaveCoreObject * | RaveObjectHashTable_remove (RaveObjectHashTable_t *table, const char *key) |
| Removes the item with the specified key and returns it. | |
| void | RaveObjectHashTable_clear (RaveObjectHashTable_t *table) |
| Clears all entries in the table. | |
| RaveList_t * | RaveObjectHashTable_keys (RaveObjectHashTable_t *table) |
| Returns the keys for the table at the current state. | |
| RaveObjectList_t * | RaveObjectHashTable_values (RaveObjectHashTable_t *table) |
| Returns the values for the table. | |
| void | RaveObjectHashTable_destroyKeyList (RaveList_t *l) |
| Helper function to destroy the returned list of keys. | |
Variables | |
| RaveCoreObjectType | RaveObjectHashTable_TYPE |
| Type definition to use when creating a rave object. | |
Implementation of a rave object hashtable that maps between strings and rave core objects.
This object currently does not support RAVE_OBJECT_CLONE.
| typedef struct _RaveObjectHashTable_t RaveObjectHashTable_t |
Defines a hash table.
| void RaveObjectHashTable_clear | ( | RaveObjectHashTable_t * | table | ) |
Clears all entries in the table.
| [in] | table | - the table |
| void RaveObjectHashTable_destroyKeyList | ( | RaveList_t * | l | ) |
Helper function to destroy the returned list of keys.
| [in] | l | - the list to destroy |
| int RaveObjectHashTable_exists | ( | RaveObjectHashTable_t * | table, |
| const char * | key ) |
Returns if the specified key exists or not.
| [in] | table | - self |
| [in] | key | - the key to search for |
| RaveCoreObject * RaveObjectHashTable_get | ( | RaveObjectHashTable_t * | table, |
| const char * | key ) |
Returns the object referred to by key.
| [in] | table | - the table |
| [in] | key | - the key |
| RaveList_t * RaveObjectHashTable_keys | ( | RaveObjectHashTable_t * | table | ) |
Returns the keys for the table at the current state.
Note, remember to deallocate keys appropriately after retrival or use the function @ref RaveList_freeAndDestroy that will take care of it for you.
| [in] | table | - self |
| int RaveObjectHashTable_put | ( | RaveObjectHashTable_t * | table, |
| const char * | key, | ||
| RaveCoreObject * | obj ) |
Inserts a key - object binding in the table.
| [in] | table | - the table |
| [in] | key | - the key |
| [in] | obj | - the object |
| RaveCoreObject * RaveObjectHashTable_remove | ( | RaveObjectHashTable_t * | table, |
| const char * | key ) |
Removes the item with the specified key and returns it.
| [in] | table | - the table |
| [in] | key | - the key |
| int RaveObjectHashTable_size | ( | RaveObjectHashTable_t * | table | ) |
Returns the number of items in this table.
| [in] | table | - the table |
| RaveObjectList_t * RaveObjectHashTable_values | ( | RaveObjectHashTable_t * | table | ) |
Returns the values for the table.
Note, it is not cloned values but references to them.
| [in] | table | - self |
|
extern |
Type definition to use when creating a rave object.