diff options
| author | Tyge Løvset <[email protected]> | 2021-01-21 11:25:31 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-01-21 11:25:31 +0100 |
| commit | ff84705c03e06ad2f44396719253fe0fb8112171 (patch) | |
| tree | 10e34d73a00a7ddb75dffb0b34b2ba1ab0c720b1 /docs/csset_api.md | |
| parent | 396dc5b30de95776a745be18c33ef207f0bb6f49 (diff) | |
| download | STC-modified-ff84705c03e06ad2f44396719253fe0fb8112171.tar.gz STC-modified-ff84705c03e06ad2f44396719253fe0fb8112171.zip | |
Updated docs.
Diffstat (limited to 'docs/csset_api.md')
| -rw-r--r-- | docs/csset_api.md | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/docs/csset_api.md b/docs/csset_api.md index 4aded6a8..31210284 100644 --- a/docs/csset_api.md +++ b/docs/csset_api.md @@ -1,17 +1,19 @@ -# STC Container [csset](../stc/csmap.h): Sorted Set
+# STC [csset](../stc/csmap.h): Sorted Set

-A **csset** is an associative container that contains a sorted set of unique objects of type *Key*. Sorting is done using the key comparison function *keyCompare*. Search, removal, and insertion operations have logarithmic complexity. **csset** is implemented as a AA-tree. See [std::set](https://en.cppreference.com/w/cpp/container/set) for a similar c++ class.
+A **csset** is an associative container that contains a sorted set of unique objects of type *Key*. Sorting is done using the key comparison function *keyCompare*. Search, removal, and insertion operations have logarithmic complexity. **csset** is implemented as a AA-tree.
+
+See the c++ class [std::set](https://en.cppreference.com/w/cpp/container/set) for a functional description.
## Declaration
```c
-#define using_csset(X, Key, keyCompare=c_default_compare,
- keyDestroy=c_default_del,
- keyFromRaw=c_default_clone,
- keyToRaw=c_default_to_raw,
- RawKey=Key)
-#define using_csset_str()
+using_csset(X, Key, keyCompare=c_default_compare,
+ keyDestroy=c_default_del,
+ keyFromRaw=c_default_clone,
+ keyToRaw=c_default_to_raw,
+ RawKey=Key)
+using_csset_str()
```
The macro `using_csset()` can be instantiated with 2, 3, 5, or 7 arguments in the global scope.
Default values are given above for args not specified. `X` is a type tag name and
@@ -25,7 +27,7 @@ be replaced by `my` in all of the following documentation. All csset definitions and prototypes may be included in your C source file by including a single header file.
```c
-#include "stc/csmap.h" // both csmap and csset
+#include "stc/csset.h"
```
## Methods
|
