summaryrefslogtreecommitdiffhomepage
path: root/docs/csmap_api.md
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2021-02-06 23:11:03 +0100
committerTyge Løvset <[email protected]>2021-02-06 23:11:03 +0100
commit765e46dba87a3fa7070ef7fb70d9be76e1d7a47b (patch)
treee50ddcfbf0061d7981f1525d75dcc571010d780a /docs/csmap_api.md
parent1f0785734d0126cff9525ee516fda0e9db8afbea (diff)
downloadSTC-modified-765e46dba87a3fa7070ef7fb70d9be76e1d7a47b.tar.gz
STC-modified-765e46dba87a3fa7070ef7fb70d9be76e1d7a47b.zip
Updated csmap.h to match api of cmap. Updated docs.
Diffstat (limited to 'docs/csmap_api.md')
-rw-r--r--docs/csmap_api.md20
1 files changed, 9 insertions, 11 deletions
diff --git a/docs/csmap_api.md b/docs/csmap_api.md
index 8400f044..45ce8fee 100644
--- a/docs/csmap_api.md
+++ b/docs/csmap_api.md
@@ -53,25 +53,23 @@ void csmap_X_clear(csmap_X* self);
void csmap_X_swap(csmap_X* a, csmap_X* b);
void csmap_X_del(csmap_X* self);
-bool csmap_X_empty(csmap_X m);
-size_t csmap_X_size(csmap_X m);
+bool csmap_X_empty(csmap_X map);
+size_t csmap_X_size(csmap_X map);
-void csmap_X_push_n(csmap_X* self, const csmap_X_rawvalue_t arr[], size_t size);
+csmap_X_iter_t csmap_X_find(const csmap_X* self, RawKey rkey);
+csmap_X_value_t* csmap_X_find_it(const csmap_X* self, RawKey rkey, csmap_X_iter_t* out); // return NULL if not found
+bool csmap_X_contains(const csmap_X* self, RawKey rkey);
+void csmap_X_push_n(csmap_X* self, const csmap_X_rawvalue_t arr[], size_t size);
+csmap_X_result_t csmap_X_put(csmap_X* self, RawKey rkey, RawMapped rmapped); // like std::map::operator[]
csmap_X_result_t csmap_X_emplace(csmap_X* self, RawKey rkey, RawMapped rmapped); // no change if rkey in map
-csmap_X_result_t csmap_X_insert(csmap_X* self, csmap_X_rawvalue_t rval); // same, just different param
-csmap_X_result_t csmap_X_insert_or_assign(csmap_X* self, RawKey rkey, RawMapped rmapped);
-csmap_X_result_t csmap_X_put(csmap_X* self, RawKey rkey, RawMapped rmapped); // same as insert_or_assign()
-csmap_X_result_t csmap_X_put_mapped(csmap_X* self, RawKey rkey, Mapped mapped); // same, different param
+csmap_X_result_t csmap_X_insert(csmap_X* self, csmap_X_value_t val); // like emplace
+csmap_X_result_t csmap_X_insert_or_assign(csmap_X* self, Key key, Mapped mapped); // like put
csmap_X_mapped_t* csmap_X_at(const csmap_X* self, RawKey rkey); // rkey must be in map.
size_t csmap_X_erase(csmap_X* self, RawKey rkey);
csmap_X_iter_t csmap_X_erase_at(csmap_X* self, csmap_X_iter_t pos);
-csmap_X_iter_t csmap_X_find(const csmap_X* self, RawKey rkey);
-csmap_X_value_t* csmap_X_find_it(const csmap_X* self, RawKey rkey, csmap_X_iter_t* out); // return NULL if not found
-bool csmap_X_contains(const csmap_X* self, RawKey rkey);
-
csmap_X_iter_t csmap_X_begin(csmap_X* self);
csmap_X_iter_t csmap_X_end(csmap_X* self);
void csmap_X_next(csmap_X_iter_t* it);