summaryrefslogtreecommitdiffhomepage
path: root/docs/cvec_api.md
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2021-03-24 15:20:41 +0100
committerTyge Løvset <[email protected]>2021-03-24 15:20:41 +0100
commitdba28f4d568439545785932ec273a1bc19abee24 (patch)
tree9b9d6c27903eb27955a346f0d7b585b639d95896 /docs/cvec_api.md
parent52f53e8c8ea9320e2af86d6e1a09f1416a73d51c (diff)
downloadSTC-modified-dba28f4d568439545785932ec273a1bc19abee24.tar.gz
STC-modified-dba28f4d568439545785932ec273a1bc19abee24.zip
Removed separate ## Header section in docs.
Diffstat (limited to 'docs/cvec_api.md')
-rw-r--r--docs/cvec_api.md13
1 files changed, 4 insertions, 9 deletions
diff --git a/docs/cvec_api.md b/docs/cvec_api.md
index 48bb5475..d1a23695 100644
--- a/docs/cvec_api.md
+++ b/docs/cvec_api.md
@@ -9,15 +9,17 @@ Reallocations are usually costly operations in terms of performance. The *cvec_X
See the c++ class [std::vector](https://en.cppreference.com/w/cpp/container/vector) for a functional description.
-## Declaration
+## Header file and declaration
```c
+#include <stc/cvec.h>
+
using_cvec(X, Value);
using_cvec(X, Value, valueCompare);
using_cvec(X, Value, valueCompare, valueDel, valueClone);
using_cvec(X, Value, valueCompareRaw, valueDel, valueFromRaw, valueToRaw, RawValue);
-using_cvec_str()
+using_cvec_str(); // using_cvec(str, cstr, ...)
```
The macro `using_cvec()` must be instantiated in the global scope. `X` is a type tag name and
will affect the names of all cvec types and methods. E.g. declaring `using_cvec(i, int);`, `X` should
@@ -28,13 +30,6 @@ be replaced by `i` in all of the following documentation.
using_cvec(str, cstr, cstr_compare_raw, cstr_del, cstr_from, cstr_c_str, const char*)
```
-## Header file
-
-All cvec definitions and prototypes are available by including a single header file.
-
-```c
-#include <stc/cvec.h>
-```
## Methods
```c