From f9043a0ad319eed6b83c3c25921aff5a1b42c8fc Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Thu, 11 Mar 2021 12:16:02 +0100 Subject: Update maps/sets docs accordingly. --- docs/cmap_api.md | 2 +- docs/cset_api.md | 19 ++++++++++--------- docs/csmap_api.md | 2 +- docs/csset_api.md | 20 ++++++++++---------- 4 files changed, 22 insertions(+), 21 deletions(-) diff --git a/docs/cmap_api.md b/docs/cmap_api.md index e4aa886f..0bbc76c7 100644 --- a/docs/cmap_api.md +++ b/docs/cmap_api.md @@ -101,10 +101,10 @@ void c_trivial_del(Type* val); // doe | `cmap_X` | `struct { ... }` | The cmap type | | `cmap_X_rawkey_t` | `RawKey` | The raw key type | | `cmap_X_rawmapped_t` | `RawMapped` | The raw mapped type | +| `cmap_X_rawvalue_t` | `struct { RawKey first; RawMapped second; }` | RawKey + RawMapped type | | `cmap_X_key_t` | `Key` | The key type | | `cmap_X_mapped_t` | `Mapped` | The mapped type | | `cmap_X_value_t` | `struct { Key first; Mapped second; }` | The value type | -| `cmap_X_rawvalue_t` | `struct { RawKey first; RawMapped second; }` | RawKey + RawMapped type | | `cmap_X_result_t` | `struct { cmap_X_value_t *ref; bool inserted; }`| Result of insert/put/emplace | | `cmap_X_iter_t` | `struct { cmap_X_value_t *ref; ... }` | Iterator type | diff --git a/docs/cset_api.md b/docs/cset_api.md index 6d5f9b2e..db3321ae 100644 --- a/docs/cset_api.md +++ b/docs/cset_api.md @@ -54,6 +54,7 @@ void cset_X_emplace_n(cset_X* self, const RawKey arr[], size_t si size_t cset_X_erase(cset_X* self, RawKey rkey); cset_X_iter_t cset_X_erase_at(cset_X* self, cset_X_iter_t pos); +void cset_X_erase_entry(cset_X* self, cset_X_value_t* entry); cset_X_iter_t cset_X_begin(const cset_X* self); cset_X_iter_t cset_X_end(const cset_X* self); @@ -65,15 +66,15 @@ cset_X_value_t cset_X_value_clone(cset_X_value_t val); ## Types -| Type name | Type definition | Used to represent... | -|:---------------------|:--------------------------------------|:-------------------------| -| `cset_X` | `struct { ... }` | The cset type | -| `cset_X_rawkey_t` | `RawKey` | The raw key type | -| `cset_X_rawvalue_t` | `cset_X_rawkey_t` | The raw key type | -| `cset_X_key_t` | `Key` | The key type | -| `cset_X_value_t` | `cset_X_key_t` | The value type | -| `cset_X_result_t` | `struct { Key first; bool second; }` | Result of insert/emplace | -| `cset_X_iter_t` | `struct { cset_X_value_t *ref; ... }` | Iterator type | +| Type name | Type definition | Used to represent... | +|:---------------------|:-------------------------------------------------|:-------------------------| +| `cset_X` | `struct { ... }` | The cset type | +| `cset_X_rawkey_t` | `RawKey` | The raw key type | +| `cset_X_rawvalue_t` | `cset_X_rawkey_t` | The raw key type | +| `cset_X_key_t` | `Key` | The key type | +| `cset_X_value_t` | `cset_X_key_t` | The value type | +| `cset_X_result_t` | `struct { cset_X_value_t* ref; bool inserted; }` | Result of insert/emplace | +| `cset_X_iter_t` | `struct { cset_X_value_t *ref; ... }` | Iterator type | ## Example ```c diff --git a/docs/csmap_api.md b/docs/csmap_api.md index 7f7c5e96..72688c26 100644 --- a/docs/csmap_api.md +++ b/docs/csmap_api.md @@ -84,10 +84,10 @@ csmap_X_value_t csmap_X_value_clone(csmap_X_value_t val); | `csmap_X` | `struct { ... }` | The csmap type | | `csmap_X_rawkey_t` | `RawKey` | The raw key type | | `csmap_X_rawmapped_t` | `RawMapped` | The raw mapped type | +| `csmap_X_rawvalue_t` | `struct { RawKey first; RawMapped second; }` | RawKey + RawVal type | | `csmap_X_key_t` | `Key` | The key type | | `csmap_X_mapped_t` | `Mapped` | The mapped type | | `csmap_X_value_t` | `struct { Key first; Mapped second; }` | The value type | -| `csmap_X_rawvalue_t` | `struct { RawKey first; RawMapped second; }` | RawKey + RawVal type | | `csmap_X_result_t` | `struct { csmap_X_value_t *ref; bool inserted; }` | Result of insert/put/emplace | | `csmap_X_iter_t` | `struct { csmap_X_value_t *ref; ... }` | Iterator type | diff --git a/docs/csset_api.md b/docs/csset_api.md index 5d593b6f..4a39b864 100644 --- a/docs/csset_api.md +++ b/docs/csset_api.md @@ -34,7 +34,7 @@ csset_X csset_X_init(void); csset_X csset_X_clone(csset_x set); void csset_X_clear(csset_X* self); void csset_X_swap(csset_X* a, csset_X* b); -void csset_X_del(csset_X* self); // destructor +void csset_X_del(csset_X* self); // destructor bool csset_X_empty(csset_X m); size_t csset_X_size(csset_X m); @@ -60,15 +60,15 @@ csset_X_value_t csset_X_value_clone(csset_X_value_t val); ## Types -| Type name | Type definition | Used to represent... | -|:---------------------|:---------------------------------------|:-------------------------| -| `csset_X` | `struct { ... }` | The csset type | -| `csset_X_rawkey_t` | `RawKey` | The raw key type | -| `csset_X_rawvalue_t` | `csset_X_rawkey_t` | The raw key type | -| `csset_X_key_t` | `Key` | The key type | -| `csset_X_value_t` | `csset_X_key_t` | The value type | -| `csset_X_result_t` | `struct { Key first; bool second; }` | Result of insert/emplace | -| `csset_X_iter_t` | `struct { csset_X_value_t *ref; ... }` | Iterator type | +| Type name | Type definition | Used to represent... | +|:---------------------|:--------------------------------------------------|:-------------------------| +| `csset_X` | `struct { ... }` | The csset type | +| `csset_X_rawkey_t` | `RawKey` | The raw key type | +| `csset_X_rawvalue_t` | `csset_X_rawkey_t` | The raw key type | +| `csset_X_key_t` | `Key` | The key type | +| `csset_X_value_t` | `csset_X_key_t` | The value type | +| `csset_X_result_t` | `struct { csset_X_value_t* ref; bool inserted; }` | Result of insert/emplace | +| `csset_X_iter_t` | `struct { csset_X_value_t *ref; ... }` | Iterator type | ## Example ```c -- cgit v1.2.3