summaryrefslogtreecommitdiffhomepage
path: root/docs/cset_api.md
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2021-09-17 19:56:04 +0200
committerTyge Løvset <[email protected]>2021-09-17 19:56:04 +0200
commit0d252463192cf3391d9c41e47574a560b7377bee (patch)
treed234a699ee8ae8f8bca2819e9b0cc0ff4599bbe5 /docs/cset_api.md
parent103d8d501cf9a3cb3c882e05553e79a5731a0c26 (diff)
downloadSTC-modified-0d252463192cf3391d9c41e47574a560b7377bee.tar.gz
STC-modified-0d252463192cf3391d9c41e47574a560b7377bee.zip
Updated docs.
Added i_key_csptr, i_val_csptr input macros for very easy usage of shared pointers in containers.
Diffstat (limited to 'docs/cset_api.md')
-rw-r--r--docs/cset_api.md16
1 files changed, 9 insertions, 7 deletions
diff --git a/docs/cset_api.md b/docs/cset_api.md
index fc12c5bd..8b645d29 100644
--- a/docs/cset_api.md
+++ b/docs/cset_api.md
@@ -7,13 +7,15 @@ A **cset** is an associative container that contains a set of unique objects of
## Header file and declaration
```c
-#define i_tag
-#define i_val // required
-#define i_cmp // required if i_val is a struct
-#define i_valdel
-#define i_valfrom
-#define i_valto
-#define i_valraw
+#define i_tag // defaults to i_key name
+#define i_key // key: REQUIRED
+#define i_hash // hash func: REQUIRED IF i_keyraw is a non-pod type
+#define i_equ // equality comparison two i_keyraw*. REQUIRED IF i_keyraw is a non-integral type
+#define i_cmp // three-way compare two i_keyraw* : alternative to i_equ
+#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_keydel // destroy key func - defaults to empty destruct
#include <stc/cset.h>
```
`X` should be replaced by the value of i_tag in all of the following documentation.