diff options
| author | Tyge Løvset <[email protected]> | 2021-03-24 15:20:41 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-03-24 15:20:41 +0100 |
| commit | dba28f4d568439545785932ec273a1bc19abee24 (patch) | |
| tree | 9b9d6c27903eb27955a346f0d7b585b639d95896 /docs/cptr_api.md | |
| parent | 52f53e8c8ea9320e2af86d6e1a09f1416a73d51c (diff) | |
| download | STC-modified-dba28f4d568439545785932ec273a1bc19abee24.tar.gz STC-modified-dba28f4d568439545785932ec273a1bc19abee24.zip | |
Removed separate ## Header section in docs.
Diffstat (limited to 'docs/cptr_api.md')
| -rw-r--r-- | docs/cptr_api.md | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/docs/cptr_api.md b/docs/cptr_api.md index 4ef2e443..3583bc62 100644 --- a/docs/cptr_api.md +++ b/docs/cptr_api.md @@ -6,9 +6,11 @@ The pointed-to elements are automatically destructed and deleted when the contai See the c++ classes [std::shared_ptr](https://en.cppreference.com/w/cpp/memory/shared_ptr) for a functional reference. -## Declaration +## Header file and declaration ```c +#include <stc/cptr.h> + using_cptr(X, Value); using_cptr(X, Value, valueCompare); using_cptr(X, Value, valueCompare, valueDel); @@ -21,14 +23,6 @@ The macro `using_cptr()` must be instantiated in the global scope. `X` is a type affect the names of all cptr types and methods. E.g. declaring `using_cptr(v4, Vec4);`, `X` should be replaced by `v4` in all of the following documentation. -## Header file - -All cptr and csptr definitions and prototypes are available by including a single header file. - -```c -#include <stc/cptr.h> -``` - ## Methods The *del()* and *compare()* methods are defined based on the arguments passed to the **using**-macro. For **csptr**, use *csptr_X_clone(p)* when sharing ownership of the pointed-to object. See examples below. |
