summaryrefslogtreecommitdiffhomepage
path: root/docs/cbox_api.md
diff options
context:
space:
mode:
authortylov <[email protected]>2023-07-18 01:36:51 +0200
committertylov <[email protected]>2023-07-18 01:36:51 +0200
commit313c1d7bb9b92e75801429c1f7f132589860292e (patch)
treeb68451b728c7e06275388348e8ccb90d5a1c5a7f /docs/cbox_api.md
parent23eeedb3fc298602732f394adba6a43c876ca7d8 (diff)
downloadSTC-modified-313c1d7bb9b92e75801429c1f7f132589860292e.tar.gz
STC-modified-313c1d7bb9b92e75801429c1f7f132589860292e.zip
Renamed i_native_cmp => i_cmp_native
Added c_all_of(), c_any_of(), c_none_of() to algo/filter.h
Diffstat (limited to 'docs/cbox_api.md')
-rw-r--r--docs/cbox_api.md29
1 files changed, 17 insertions, 12 deletions
diff --git a/docs/cbox_api.md b/docs/cbox_api.md
index b6c76d2f..0e6fca64 100644
--- a/docs/cbox_api.md
+++ b/docs/cbox_api.md
@@ -14,18 +14,23 @@ 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_key // element type: REQUIRED
-#define i_cmp // three-way compare two i_key* : REQUIRED IF i_key is a non-integral type
-#define i_keydrop // destroy element func - defaults to empty destruct
-#define i_keyclone // REQUIRED if i_keydrop is defined, unless 'i_opt c_no_clone' is defined.
-
-#define i_keyraw // convertion type (lookup): default to {i_key}
-#define i_keyto // convertion func i_key* => i_keyraw: REQUIRED IF i_keyraw defined.
-#define i_keyfrom // from-raw func.
-
-#define i_keyclass // alt. to i_key: REQUIRES that {i_key}_clone, {i_key}_drop, {i_keyraw}_cmp exist.
-#define i_tag // alternative typename: cbox_{i_tag}. i_tag defaults to i_key
+#define i_key <t> // element type: REQUIRED. Note: i_val* may be specified instead of i_key*.
+#define i_type <t> // cbox container type name
+#define i_cmp <f> // three-way compareison. REQUIRED IF i_key is a non-integral type
+ // Note that containers of carcs will "inherit" i_cmp
+ // when using carc in containers with i_valboxed MyArc - ie. the i_type.
+#define i_cmp_native // define instead of i_cmp only when i_key is an integral/native-type.
+#define i_keydrop <f> // destroy element func - defaults to empty destruct
+#define i_keyclone <f> // REQUIRED if i_keydrop is defined, unless 'i_opt c_no_clone' is defined.
+
+#define i_keyraw <t> // convertion type (lookup): default to {i_key}
+#define i_keyto <f> // convertion func i_key* => i_keyraw: REQUIRED IF i_keyraw defined.
+#define i_keyfrom <f> // from-raw func.
+
+#define i_tag <s> // alternative typename: cbox_{i_tag}. i_tag defaults to i_key
+#define i_keyclass <t> // Use instead of i_key when functions {i_key}_clone,
+ // {i_key}_drop and {i_keyraw}_cmp exist.
+#define i_keyboxed <t> // Use instead of i_key when key is a carc- or a cbox-type.
#include <stc/cbox.h>
```
`X` should be replaced by the value of `i_tag` in all of the following documentation.