diff options
| author | Tyge Løvset <[email protected]> | 2022-11-06 12:57:47 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-11-06 12:57:47 +0100 |
| commit | b69006463de7b3f11d974bdddb5782282482f515 (patch) | |
| tree | 6f182dc201164fead2b5b1a094e6e8a2b43dc0a1 /docs/cbox_api.md | |
| parent | c230e4cd830de22fad2f7085d968d905dadc7418 (diff) | |
| download | STC-modified-b69006463de7b3f11d974bdddb5782282482f515.tar.gz STC-modified-b69006463de7b3f11d974bdddb5782282482f515.zip | |
Improved documentation of template parameters for all containers.
Diffstat (limited to 'docs/cbox_api.md')
| -rw-r--r-- | docs/cbox_api.md | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/docs/cbox_api.md b/docs/cbox_api.md index 79911876..710c82f7 100644 --- a/docs/cbox_api.md +++ b/docs/cbox_api.md @@ -14,14 +14,18 @@ See similar c++ class [std::unique_ptr](https://en.cppreference.com/w/cpp/memory ## Header file and declaration ```c +#define i_type // full typename of the cbox #define i_val // value: REQUIRED #define i_cmp // three-way compare two i_val* : REQUIRED IF i_val is a non-integral type #define i_valdrop // destroy value func - defaults to empty destruct #define i_valclone // REQUIRED if i_valdrop is defined, unless 'i_opt c_no_clone' is defined. -#define i_valraw // convertion type (lookup) + +#define i_valraw // convertion type (lookup): default to {i_val} +#define i_valto // convertion func i_val* => i_valraw: REQUIRED IF i_valraw defined. #define i_valfrom // from-raw func. -#define i_valto // to-raw func. -#define i_tag // type name tag, defaults to i_val + +#define i_valclass // alt. to i_val: REQUIRES that {i_val}_clone, {i_val}_drop, {i_valraw}_cmp exist. +#define i_tag // alternative typename: cbox_{i_tag}. i_tag defaults to i_val #include <stc/cbox.h> ``` `X` should be replaced by the value of `i_tag` in all of the following documentation. |
