From 15e1dd79211828bcb8c2a809837b56397d65c6d9 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Wed, 29 Dec 2021 15:42:10 +0100 Subject: Fixed minors in map docs. --- docs/cmap_api.md | 14 +++++++++----- docs/cset_api.md | 8 ++++---- docs/csmap_api.md | 10 +++++++--- docs/csset_api.md | 7 ++++--- 4 files changed, 24 insertions(+), 15 deletions(-) diff --git a/docs/cmap_api.md b/docs/cmap_api.md index 5c029a29..c5311e27 100644 --- a/docs/cmap_api.md +++ b/docs/cmap_api.md @@ -17,19 +17,23 @@ See the c++ class [std::unordered_map](https://en.cppreference.com/w/cpp/contain ## Header file and declaration ```c -#define i_key // key: REQUIRED -#define i_val // value: REQUIRED -#define i_cmp // three-way compare two i_keyraw*: REQUIRED IF i_keyraw is non-integral type -#define i_eq // equality comparison two i_keyraw*: ALTERNATIVE to i_cmp +#define i_key // hash key: REQUIRED +#define i_val // map value: REQUIRED +#define i_hash // hash func i_keyraw*: REQUIRED IF i_keyraw is non-pod type +#define i_eq // equality comparison two i_keyraw*: REQUIRED IF i_keyraw is a + // non-integral type. Three-way i_cmp may be specified alternatively. #define i_keydrop // destroy key func - defaults to empty destruct #define i_keyraw // convertion "raw" type - defaults to i_key #define i_keyfrom // convertion func i_keyraw => i_key - defaults to plain copy #define i_keyto // convertion func i_key* => i_keyraw - defaults to plain copy + #define i_valdrop // destroy value func - defaults to empty destruct #define i_valraw // convertion "raw" type - defaults to i_val #define i_valfrom // convertion func i_valraw => i_val - defaults to plain copy #define i_valto // convertion func i_val* => i_valraw - defaults to plain copy -#define i_tag // defaults to i_key + +#define i_tag // typename tag. defaults to i_key +#define i_type // full typename of the container #include ``` `X` should be replaced by the value of `i_tag` in all of the following documentation. diff --git a/docs/cset_api.md b/docs/cset_api.md index 32488b81..b5f8073b 100644 --- a/docs/cset_api.md +++ b/docs/cset_api.md @@ -7,15 +7,15 @@ A **cset** is an associative container that contains a set of unique objects of ## Header file and declaration ```c -#define i_key // key: REQUIRED -#define i_cmp // three-way compare two i_keyraw*: REQUIRED IF i_keyraw is a non-integral type -#define i_hash // hash func: REQUIRED IF i_keyraw is a non-pod type +#define i_key // hash key: REQUIRED. +#define i_hash // hash func: REQUIRED IF i_keyraw is a non-pod type. #define i_eq // equality comparison two i_keyraw*: !i_cmp will be used if not defined. #define i_drop // destroy key func - defaults to empty destruct #define i_keyraw // convertion "raw" type - defaults to i_key #define i_keyfrom // convertion func i_keyraw => i_key - defaults to plain copy #define i_keyto // convertion func i_key* => i_keyraw - defaults to plain copy -#define i_tag // defaults to i_key +#define i_tag // typename tag. defaults to i_key +#define i_type // full typename of the container #include ``` `X` should be replaced by the value of `i_tag` in all of the following documentation. diff --git a/docs/csmap_api.md b/docs/csmap_api.md index 65f932ea..964046b1 100644 --- a/docs/csmap_api.md +++ b/docs/csmap_api.md @@ -18,15 +18,19 @@ See the c++ class [std::map](https://en.cppreference.com/w/cpp/container/map) fo #define i_key // key: REQUIRED #define i_val // value: REQUIRED #define i_cmp // three-way compare two i_keyraw* : REQUIRED IF i_keyraw is a non-integral type -#define i_keydrop // destroy key func - defaults to empty destruct + +#define i_keydrop // destroy key func - defaults to empty destruct #define i_keyraw // convertion "raw" type - defaults to i_key #define i_keyfrom // convertion func i_keyraw => i_key - defaults to plain copy #define i_keyto // convertion func i_key* => i_keyraw - defaults to plain copy -#define i_valdrop // destroy value func - defaults to empty destruct + +#define i_valdrop // destroy value func - defaults to empty destruct #define i_valraw // convertion "raw" type - defaults to i_val #define i_valfrom // convertion func i_valraw => i_val - defaults to plain copy #define i_valto // convertion func i_val* => i_valraw - defaults to plain copy -#define i_tag // defaults to i_key + +#define i_tag // typename tag. defaults to i_key +#define i_type // full typename of the container #include ``` `X` should be replaced by the value of `i_tag` in all of the following documentation. diff --git a/docs/csset_api.md b/docs/csset_api.md index 561b8f8e..5a33c70c 100644 --- a/docs/csset_api.md +++ b/docs/csset_api.md @@ -12,9 +12,10 @@ See the c++ class [std::set](https://en.cppreference.com/w/cpp/container/set) fo #define i_cmp // three-way compare two i_keyraw* : REQUIRED IF i_keyraw is a non-integral type #define i_drop // destroy key func - defaults to empty destruct #define i_keyraw // convertion "raw" type - defaults to i_key -#define i_keyfrom // convertion func i_keyraw => i_key - defaults to plain copy -#define i_keyto // convertion func i_key* => i_keyraw - defaults to plain copy -#define i_tag // defaults to i_key +#define i_keyfrom // convertion func i_keyraw => i_key - defaults to plain copy +#define i_keyto // convertion func i_key* => i_keyraw - defaults to plain copy +#define i_tag // typename tag. defaults to i_key +#define i_type // full typename of the container #include ``` `X` should be replaced by the value of `i_tag` in all of the following documentation. -- cgit v1.2.3