In development. It changes without notice.
Topic
Fixed-Capacity Containers
Text, lists, queues and functions that keep what they hold inside themselves and never allocate.
| Type | Holds |
|---|---|
| kleidos:: | Text |
| kleidos:: | A list, as std:: does |
| kleidos:: | A queue of one task |
| kleidos:: | A function to call, with what it captured |
What does not fit is refused, with a false or by leaving the container as it was. The ones that may hold a secret can wipe themselves. A queue between two tasks is RTOS Facade.
- See also
- Safe Strings, RTOS Facade
Files | |
| file | src/ |
| Fixed-size, heap-free type-erased callable (a std::function without the heap). | |
| file | src/ |
| Fixed-capacity, heap-free FIFO ring buffer (in-place storage). | |
| file | src/ |
| Fixed-capacity, heap-free, always-NUL-terminating string value type. | |
| file | src/ |
| Fixed-capacity, heap-free sequence container (in-place storage). | |
Classes | |
| class | kleidos:: |
| Fixed-size heap-free callable for signature R(Args...). More about kleidos:: | |
| class | kleidos:: |
Fixed-capacity FIFO ring buffer holding up to Capacity elements. More about kleidos:: | |
| class | kleidos:: |
Fixed-capacity, heap-free string holding up to Capacity characters. More about kleidos:: | |
| class | kleidos:: |
Fixed-capacity sequence container holding up to Capacity elements. More about kleidos:: | |
safe_string facade overloads for InplaceString | |
Mirror the | |
| template<size_ | |
| size_t | kleidos:: |
Replace dest with src (truncating to its capacity). | |
| template<size_ | |
| size_t | kleidos:: |
Append src to dest (truncating to its capacity). | |
| template<size_ | |
| size_t | kleidos:: |
Length of str in characters, excluding the terminating NUL. | |
Function Documentation
append() #
Append src to dest (truncating to its capacity).
- Template Parameters
-
Name Meaning Capacity Destination capacity.
- Parameters
-
Name Meaning dest Destination string. src Source C string; treated as empty if nullptr.
- Returns
- Resulting length, excluding the terminating NUL.
copy() #
Replace dest with src (truncating to its capacity).
- Template Parameters
-
Name Meaning Capacity Destination capacity.
- Parameters
-
Name Meaning dest Destination string. src Source C string; treated as empty if nullptr.
- Returns
- Resulting length, excluding the terminating NUL.
length() #
Length of str in characters, excluding the terminating NUL.
- Template Parameters
-
Name Meaning Capacity String capacity.
- Parameters
-
Name Meaning str String to measure.
- Returns
- Current length.