Simple back insertion sequence for storing the outputs of textwolf in a contant size buffer.
More...
#include <staticbuffer.hpp>
|
enum | Cause {
Unknown,
DimOutOfRange,
StateNumbersNotAscending,
InvalidParamState,
InvalidParamChar,
DuplicateStateTransition,
InvalidState,
IllegalParam,
IllegalAttributeName,
OutOfMem,
ArrayBoundsReadWrite,
NotAllowedOperation,
FileReadError,
IllegalXmlHeader,
InvalidTagOffset,
CorruptTagStack,
CodePageIndexNotSupported
} |
| Enumeration of error cases. More...
|
|
Simple back insertion sequence for storing the outputs of textwolf in a contant size buffer.
textwolf::StaticBuffer::StaticBuffer |
( |
std::size_t |
n | ) |
|
|
inlineexplicit |
textwolf::StaticBuffer::StaticBuffer |
( |
char * |
p, |
|
|
std::size_t |
n, |
|
|
std::size_t |
i = 0 |
|
) |
| |
|
inline |
textwolf::StaticBuffer::StaticBuffer |
( |
const StaticBuffer & |
o | ) |
|
|
inline |
textwolf::StaticBuffer::~StaticBuffer |
( |
| ) |
|
|
inline |
void textwolf::StaticBuffer::append |
( |
const char * |
cc, |
|
|
std::size_t |
ccsize |
|
) |
| |
|
inline |
Append an array of characters.
- Parameters
-
[in] | cc | the characters to append |
[in] | ccsize | the number of characters to append |
char& textwolf::StaticBuffer::at |
( |
std::size_t |
ii | ) |
const |
|
inline |
random access of element reference
- Parameters
-
- Returns
- the reference to the character at this position
void textwolf::StaticBuffer::clear |
( |
| ) |
|
|
inline |
Clear the buffer content.
char textwolf::StaticBuffer::operator[] |
( |
std::size_t |
ii | ) |
const |
|
inline |
random access of element
- Parameters
-
- Returns
- the character at this position
bool textwolf::StaticBuffer::overflow |
( |
| ) |
const |
|
inline |
check for array bounds write
- Returns
- true if a push_back would have caused an array bounds write
const char* textwolf::StaticBuffer::ptr |
( |
| ) |
const |
|
inline |
Return the buffer content as 0-terminated string.
- Returns
- the C-string
void textwolf::StaticBuffer::push_back |
( |
char |
ch | ) |
|
|
inline |
Append one character.
- Parameters
-
[in] | ch | the character to append |
void textwolf::StaticBuffer::resize |
( |
std::size_t |
n, |
|
|
char |
c = 0 |
|
) |
| |
|
inline |
Shrinks the size of the buffer or expands it with c.
- Parameters
-
[in] | n | new size of the buffer |
[in] | c | fill character if n bigger than the current fill size |
std::size_t textwolf::StaticBuffer::size |
( |
| ) |
const |
|
inline |
Return the number of characters in the buffer.
- Returns
- the number of characters (bytes)
The documentation for this class was generated from the following file: