Go to the source code of this file.
◆ as_orderedmap_clear()
Remove all entries from the map.
- Parameters
-
- Returns
- 0 on success. Otherwise an error occurred.
◆ as_orderedmap_destroy()
Free the map and associated resources.
- Parameters
-
◆ as_orderedmap_foreach()
Call the callback function for each entry in the map.
- Parameters
-
map | The map. |
callback | The function to call for each entry. |
udata | User-data to be passed to the callback. |
- Returns
- true if iteration completes fully. false if iteration was aborted.
◆ as_orderedmap_get()
Get the value for specified key.
- Parameters
-
- Returns
- The value for the specified key. Otherwise NULL.
◆ as_orderedmap_init()
Initialize a stack allocated orderedmap.
- Parameters
-
map | The map to initialize. |
capacity | The number of entries (keys) to allocate for. |
- Returns
- On success, the initialized map. Otherwise NULL.
◆ as_orderedmap_iterator_destroy()
Destroy the iterator and releases resources used by the iterator.
- Parameters
-
it | The iterator to release |
◆ as_orderedmap_iterator_has_next()
Tests if there are more values available in the iterator.
- Parameters
-
it | The iterator to be tested. |
- Returns
- true if there are more values. Otherwise false.
◆ as_orderedmap_iterator_init()
Initializes a stack allocated as_iterator for the given as_orderedmap.
- Parameters
-
it | The iterator to initialize. |
map | The map to iterate. |
- Returns
- On success, the initialized iterator. Otherwise NULL.
◆ as_orderedmap_iterator_new()
Creates a heap allocated as_iterator for the given as_orderedmap.
- Parameters
-
- Returns
- On success, the new iterator. Otherwise NULL.
◆ as_orderedmap_iterator_next()
Attempts to get the next value from the iterator. This will return the next value, and iterate past the value.
- Parameters
-
it | The iterator to get the next value from. |
- Returns
- The next value in the list if available. Otherwise NULL.
◆ as_orderedmap_new()
Creates a new map as an orderedmap.
- Parameters
-
capacity | The number of keys to allocate for. |
- Returns
- On success, the new map. Otherwise NULL.
◆ as_orderedmap_remove()
Remove the entry specified by the key.
- Parameters
-
map | The map to remove the entry from. |
key | The key of the entry to be removed. |
- Returns
- 0 on success. Otherwise an error occurred.
◆ as_orderedmap_set()
Set the value for specified key.
- Parameters
-
map | The map. |
key | The key. |
val | The value for the given key. |
- Returns
- 0 on success. Otherwise an error occurred.
◆ as_orderedmap_set_flags()
static void as_orderedmap_set_flags |
( |
as_orderedmap * | map, |
|
|
uint32_t | flags ) |
|
inlinestatic |
◆ as_orderedmap_size()
Get the number of entries in the map.
- Parameters
-
- Returns
- The number of entries in the map.