| xmlroff Reference Manual | ||||
|---|---|---|---|---|
FoHashTable;
FoHashTableClass;
#define FO_HASH_TABLE_ERROR
GQuark fo_hash_table_error_quark (void);
FoHashTable* fo_hash_table_new (void);
void fo_hash_table_insert (FoHashTable *fo_hash_table,
FoObject *key,
FoObject *value,
GError **error);
void fo_hash_table_replace (FoHashTable *fo_hash_table,
FoObject *key,
FoObject *value,
GError **error);
gboolean fo_hash_table_remove (FoHashTable *fo_hash_table,
FoObject *key,
GError **error);
FoObject* fo_hash_table_lookup (FoHashTable *fo_hash_table,
FoObject *key,
GError **error);
guint fo_hash_table_size (FoHashTable *fo_hash_table);
GQuark fo_hash_table_error_quark (void);
Get the error quark for FoHashTable.
If the quark does not yet exist, create it.
Returns : |
Quark associated with FoHashTable errors. |
FoHashTable* fo_hash_table_new (void);
Creates a new FoHashTable initialized to default value.
Returns : |
the new FoHashTable |
void fo_hash_table_insert (FoHashTable *fo_hash_table, FoObject *key, FoObject *value, GError **error);
Inserts value as the value corresponding to key in
fo_hash_table.
|
FoHashTable in which to insert. |
|
Key at which to insert. |
|
Value to insert. |
|
GError with information about error that occurred. |
void fo_hash_table_replace (FoHashTable *fo_hash_table, FoObject *key, FoObject *value, GError **error);
Replaces the key-value pair in fo_hash_table that has a key
matching key.
|
FoHashTable in which to replace. |
|
Key of key-value pair to replace. |
|
New value. |
|
GError with information about error that occurred. |
gboolean fo_hash_table_remove (FoHashTable *fo_hash_table, FoObject *key, GError **error);
Removes the key-value pair with key matching key from
fo_hash_table.
|
FoHashTable from which to remove a key-value pair. |
|
Key of pair to remove. |
|
GError with information about error that occurred. |
Returns : |
TRUE is successful.
|
FoObject* fo_hash_table_lookup (FoHashTable *fo_hash_table, FoObject *key, GError **error);
Gets the value associated with key in fo_hash_table.
|
FoHashTable in which to look. |
|
Key value against which to compare. |
|
GError with information about error that occurred. |
Returns : |
The value, or NULL if no matching key.
|
guint fo_hash_table_size (FoHashTable *fo_hash_table);
Gets the number of key-value pairs in fo_hash_table.
|
FoHashTable for which to get size. |
Returns : |
Number of key-value pairs. |