diff options
| author | Tyge Løvset <[email protected]> | 2021-11-03 11:30:06 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-11-03 11:30:06 +0100 |
| commit | e259ed7807dd9474cc94ba625db4dcd573431362 (patch) | |
| tree | 0e83bf2d49a1f0ec43f9e9b0b74c69ef4fd97a1b /docs/csmap_api.md | |
| parent | 73b1ed7c17b94647438c7e73738bf0820e5d57ad (diff) | |
| download | STC-modified-e259ed7807dd9474cc94ba625db4dcd573431362.tar.gz STC-modified-e259ed7807dd9474cc94ba625db4dcd573431362.zip | |
Changed container_X_get() and container_X_at() to return const value* (or const mapped*). Added container_X_getmut() for mutable version. Updated docs.
Diffstat (limited to 'docs/csmap_api.md')
| -rw-r--r-- | docs/csmap_api.md | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/docs/csmap_api.md b/docs/csmap_api.md index 7a528c7b..176ebad6 100644 --- a/docs/csmap_api.md +++ b/docs/csmap_api.md @@ -42,15 +42,19 @@ void csmap_X_copy(csmap_X* self, csmap_X other); void csmap_X_swap(csmap_X* a, csmap_X* b); void csmap_X_del(csmap_X* self); // destructor -bool csmap_X_empty(csmap_X map); size_t csmap_X_size(csmap_X map); +bool csmap_X_empty(csmap_X map); + +const csmap_X_mapped* csmap_X_at(const csmap_X* self, i_keyraw rkey); // rkey must be in map. +const csmap_X_value* csmap_X_get(const csmap_X* self, i_keyraw rkey); // return NULL if not found +csmap_X_value* csmap_X_mutget(csmap_X* self, i_keyraw rkey); // mutable get +bool csmap_X_contains(const csmap_X* self, i_keyraw rkey); +csmap_X_iter csmap_X_find(const csmap_X* self, i_keyraw rkey); +csmap_X_value* csmap_X_find_it(const csmap_X* self, i_keyraw rkey, csmap_X_iter* out); // return NULL if not found +csmap_X_iter csmap_X_lower_bound(const csmap_X* self, i_keyraw rkey); // find closest entry >= rkey -bool csmap_X_contains(const csmap_X* self, i_keyraw rkey); -csmap_X_mapped* csmap_X_at(const csmap_X* self, i_keyraw rkey); // rkey must be in map. -csmap_X_value* csmap_X_get(const csmap_X* self, i_keyraw rkey); // return NULL if not found -csmap_X_iter csmap_X_lower_bound(const csmap_X* self, i_keyraw rkey); // find closest entry >= rkey -csmap_X_iter csmap_X_find(const csmap_X* self, i_keyraw rkey); -csmap_X_value* csmap_X_find_it(const csmap_X* self, i_keyraw rkey, csmap_X_iter* out); // return NULL if not found +csmap_X_value* csmap_X_front(const csmap_X* self); +csmap_X_value* csmap_X_back(const csmap_X* self); csmap_X_result csmap_X_insert(csmap_X* self, i_key key, i_val mapped); // no change if key in map csmap_X_result csmap_X_insert_or_assign(csmap_X* self, i_key key, i_val mapped); // always update mapped |
