diff options
| author | Tyge Løvset <[email protected]> | 2021-02-21 23:47:56 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-02-21 23:47:56 +0100 |
| commit | 73632edaa63b83b1f25bbcc41b5e0e8acf500ad2 (patch) | |
| tree | 97ae05e545c8ac7c89ad53e804fe14567f7b7435 | |
| parent | b4fe781e2caeed3f0dec670def76df9bf4cefc95 (diff) | |
| download | STC-modified-73632edaa63b83b1f25bbcc41b5e0e8acf500ad2.tar.gz STC-modified-73632edaa63b83b1f25bbcc41b5e0e8acf500ad2.zip | |
Updates outdated docs.
| -rw-r--r-- | docs/carray_api.md | 3 | ||||
| -rw-r--r-- | docs/cdeq_api.md | 3 | ||||
| -rw-r--r-- | docs/clist_api.md | 3 | ||||
| -rw-r--r-- | docs/cmap_api.md | 15 | ||||
| -rw-r--r-- | docs/cpque_api.md | 10 | ||||
| -rw-r--r-- | docs/cset_api.md | 8 | ||||
| -rw-r--r-- | docs/csmap_api.md | 3 | ||||
| -rw-r--r-- | docs/csset_api.md | 5 | ||||
| -rw-r--r-- | docs/cvec_api.md | 7 |
9 files changed, 25 insertions, 32 deletions
diff --git a/docs/carray_api.md b/docs/carray_api.md index 1e70d996..e3d35083 100644 --- a/docs/carray_api.md +++ b/docs/carray_api.md @@ -12,8 +12,7 @@ See the c++ class [boost::multi_array](https://www.boost.org/doc/libs/release/li using_carray(X, Value); using_carray(X, Value, valueDestroy); ``` -The macro `using_carray()` can be instantiated with 2 or 4 arguments in the global scope. -Default values are given above for args not specified. `X` and `N` are type tags and +The macro `using_carray()` must be instantiated in the global scope. `X` and `N` are type tags and will affect the names of all cset types and methods. E.g. declaring `using_carray(my, int);`, `X` should be replaced by `my` in all of the following documentation. The `N` character should be replaced by `1`, `2` or `3`. diff --git a/docs/cdeq_api.md b/docs/cdeq_api.md index 8fe8b4a8..fd42d295 100644 --- a/docs/cdeq_api.md +++ b/docs/cdeq_api.md @@ -15,8 +15,7 @@ using_cdeq(X, Value, valueCompareRaw, valueDestroy, valueFromRaw, valueToRaw, Ra using_cdeq_str(); ``` -The macro `using_cdeq()` can be instantiated with 2, 3, 5, or 7 arguments in the global scope. -Defaults values are given above for args not specified. `X` is a type tag name and +The macro `using_cdeq()` must be instantiated in the global scope. `X` is a type tag name and will affect the names of all cdeq types and methods. E.g. declaring `using_cdeq(my, int);`, `X` should be replaced by `my` in all of the following documentation. diff --git a/docs/clist_api.md b/docs/clist_api.md index b1e009e7..f6772aa0 100644 --- a/docs/clist_api.md +++ b/docs/clist_api.md @@ -24,8 +24,7 @@ using_clist(X, Value, valueCompareRaw, valueDestroy, valueFromRaw, valueToRaw, R using_clist_str() ``` -The macro `using_clist()` 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 +The macro `using_clist()` must be instantiated in the global scope. `X` is a type tag name and will affect the names of all clist types and methods. E.g. declaring `using_clist(my, int);`, `X` should be replaced by `my` in all of the following documentation. `using_clist_str()` is a shorthand for ```c diff --git a/docs/cmap_api.md b/docs/cmap_api.md index 05217fe8..614e48c4 100644 --- a/docs/cmap_api.md +++ b/docs/cmap_api.md @@ -29,8 +29,7 @@ using_cmap_strval(X, Key, keyEqualsRaw, keyHashRaw, keyDestroy, keyFromRaw, keyT using_cmap_str() // using_cmap(str, cstr, cstr, ...) ``` -The `using_cmap()` macro family must be instantiated in the global scope. -Default values are given above for args not specified. `X` is a type tag name and +The `using_cmap()` macro family must be instantiated in the global scope. `X` is a type tag name and will affect the names of all cmap types and methods. E.g. declaring `using_cmap(my, int);`, `X` should be replaced by `my` in all of the following documentation. @@ -72,7 +71,6 @@ void cmap_X_emplace_n(cmap_X* self, const cmap_X_rawvalue_t arr[] cmap_X_mapped_t* cmap_X_at(const cmap_X* self, RawKey rkey); // rkey must be in map. size_t cmap_X_erase(cmap_X* self, RawKey rkey); -void cmap_X_erase_entry(cmap_X* self, cmap_X_value_t* entry); cmap_X_iter_t cmap_X_erase_at(cmap_X* self, cmap_X_iter_t pos); cmap_X_iter_t cmap_X_begin(cmap_X* self); @@ -82,10 +80,15 @@ cmap_X_mapped_t* cmap_X_itval(cmap_X_iter_t it); cmap_X_value_t cmap_X_value_clone(cmap_X_value_t val); void cmap_X_value_del(cmap_X_value_t* val); - +``` +``` uint64_t c_default_hash(const void *data, size_t len); -uint64_t c_default_hash32(const void* data, size_t ignored); -uint64_t c_default_hash64(const void* data, size_t ignored); +uint64_t c_default_hash32(const void* data, size_t len=4); +uint64_t c_default_hash64(const void* data, size_t len=8); +int c_default_equals(const RawKey* a, const RawKey* b); +void c_default_destruct(Value* val); +Value c_default_fromraw(RawValue raw); +RawValue c_default_toraw(Value* val); ``` ## Types diff --git a/docs/cpque_api.md b/docs/cpque_api.md index 794cd77d..aa62a3c3 100644 --- a/docs/cpque_api.md +++ b/docs/cpque_api.md @@ -10,13 +10,13 @@ See the c++ class [std::priority_queue](https://en.cppreference.com/w/cpp/contai ```c using_cpque(X, ctype, direction) ``` -The macro `using_cpque()` must be instantiated in the global scope. -**cpque** uses normally **cvec_X** or **cdeq_X** as underlying implementation, specified as `ctype`. -The *direction* must be given as `<` or `>`, specifying *max-heap* or *min-heap* for the priority queue. +The macro `using_cpque()` must be instantiated in the global scope. **cpque** uses normally **cvec_X** +or **cdeq_X** as underlying implementation, specified as `ctype`. The *direction* must be given as +`<` or `>`, specifying *max-heap* or *min-heap* for the priority queue. -Note that the function `{ctype}_value_compare(x, y)` defined by the underlying vector type is used to +Note that the function *`ctype`_value_compare(x, y)* defined by the underlying vector type is used to compare values (priorities). `X` is a type tag name and will affect the names of all cpque types and methods. -Declaring `using_cpque(my, cvec_my, >);`, `X` should be replaced by `my` in the following documentation. +Declaring `using_cpque(my, cvec_my, >)`, `X` should be replaced by `my` in the following documentation. ## Header file diff --git a/docs/cset_api.md b/docs/cset_api.md index 33d48415..526a93d7 100644 --- a/docs/cset_api.md +++ b/docs/cset_api.md @@ -13,12 +13,11 @@ using_cset(X, Key, keyEqualsRaw, keyHashRaw, keyDestroy); using_cset(X, Key, keyEqualsRaw, keyHashRaw, keyDestroy, keyFromRaw, keyToRaw, RawKey);
using_cset_str();
```
-The macro `using_cset()` can be instantiated with 2, 4, 6, or 8 arguments in the global scope.
-Default values are given above for args not specified. `X` is a type tag name and
+The macro `using_cset()` must be instantiated in the global scope. `X` is a type tag name and
will affect the names of all cset types and methods. E.g. declaring `using_cset(my, int);`, `X` should
be replaced by `my` in all of the following documentation.
-`using_cset_str()` is a predefined macro for `using_cset(str, cstr_t, ...)`.
+`using_cset_str()` is a predefined macro for `using_cset(str, cstr, ...)`.
## Header file
@@ -55,7 +54,6 @@ void cset_X_emplace_n(cset_X* self, const RawKey arr[], size_t si size_t cset_X_erase(cset_X* self, RawKey rkey);
cset_X_iter_t cset_X_erase_at(cset_X* self, cset_X_iter_t pos);
-void cset_X_erase_entry(cset_X* self, cset_X_key_t* key);
cset_X_iter_t cset_X_begin(cset_X* self);
cset_X_iter_t cset_X_end(cset_X* self);
@@ -64,8 +62,6 @@ cset_X_value_t* cset_X_itval(cset_X_iter_t it); cset_X_value_t cset_X_value_clone(cset_X_value_t val);
void cset_X_value_del(cset_X_value_t* val);
-uint32_t c_default_hash(const void *data, size_t len);
-uint32_t c_default_hash32(const void* data, size_t len);
```
## Types
diff --git a/docs/csmap_api.md b/docs/csmap_api.md index ae1eb840..d404aa79 100644 --- a/docs/csmap_api.md +++ b/docs/csmap_api.md @@ -28,8 +28,7 @@ using_csmap_strval(X, Key, keyCompareRaw, keyDestroy, keyFromRaw, keyToRaw, RawK using_csmap_str(); // using_csmap(str, cstr, cstr, ...) ``` -The `using_csmap()` macro family must be instantiated in the global scope. -Default values are given above for args not specified. `X` is a type tag name and +The `using_csmap()` macro family must be instantiated in the global scope. `X` is a type tag name and will affect the names of all csmap types and methods. E.g. declaring `using_csmap(my, int);`, `X` should be replaced by `my` in all of the following documentation. diff --git a/docs/csset_api.md b/docs/csset_api.md index 8a8ba62e..7a0085f5 100644 --- a/docs/csset_api.md +++ b/docs/csset_api.md @@ -14,12 +14,11 @@ using_csset(X, Key, keyCompare, keyDestroy); using_csset(X, Key, keyCompare, keyDestroy, keyFromRaw, keyToRaw, RawKey);
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
+The macro `using_csset()` must be instantiated in the global scope. `X` is a type tag name and
will affect the names of all csset types and methods. E.g. declaring `using_csset(my, int);`, `X` should
be replaced by `my` in all of the following documentation.
-`using_csset_str()` is a predefined macro for `using_csset(str, cstr_t, ...)`.
+`using_csset_str()` is a predefined macro for `using_csset(str, cstr, ...)`.
## Header file
diff --git a/docs/cvec_api.md b/docs/cvec_api.md index f79ad3b0..b6aa841f 100644 --- a/docs/cvec_api.md +++ b/docs/cvec_api.md @@ -19,8 +19,7 @@ using_cvec(X, Value, valueCompareRaw, valueDestroy, valueFromRaw, valueToRaw, Ra using_cvec_str() ``` -The macro `using_cvec()` can be instantiated with 2, 3, 5, or 7 arguments in the global scope. -Defaults values are given above for args not specified. `X` is a type tag name and +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(my, int);`, `X` should be replaced by `my` in all of the following documentation. @@ -82,8 +81,8 @@ cvec_X_iter_t cvec_X_erase_range_p(cvec_X* self, cvec_X_value_t* pfirst, c cvec_X_iter_t cvec_X_find(const cvec_X* self, RawValue raw); cvec_X_iter_t cvec_X_find_in_range(cvec_X_iter_t i1, cvec_X_iter_t i2, RawValue raw); -bool cvec_X_bsearch(const cvec_X* self, RawValue raw); -bool cvec_X_bsearch_in_range(cvec_X_iter_t i1, cvec_X_iter_t i2, RawValue raw); +cvec_X_iter_t cvec_X_bsearch(const cvec_X* self, RawValue raw); +cvec_X_iter_t cvec_X_bsearch_in_range(cvec_X_iter_t i1, cvec_X_iter_t i2, RawValue raw); void cvec_X_sort(cvec_X* self); void cvec_X_sort_range(cvec_X_iter_t i1, cvec_X_iter_t i2, int(*cmp)(const cvec_X_value_t*, const cvec_X_value_t*)); |
