#include <string.h>
Public Member Functions | |
virtual uint32 | charSize () const |
virtual void | destroy (String *str) const |
virtual void | insert (String *str, uint32 pos, uint32 len, const String *source) const |
virtual void | reserve (String *str, uint32 size, bool relative=false, bool block=false) const |
virtual void | setCharAt (String *str, uint32 pos, uint32 chr) const |
virtual void | shrink (String *str) const |
virtual t_type | type () const |
virtual | ~Buffer () |
This class manages a variable size strings that are stored in one region of memory. Strings may or may not be zero terminated (in case of need, the zero after the length of the string is checked, and if not present, added). This is actually a useful class to store C strings created on the fly from memory buffer; the requirement is that the memory stored in the managed class is created with the Falcon::memAlloc() function (as it will be freed with Falcon::memFree() and reallocated with Falcon::memRealloc() ).
virtual Falcon::csh::Buffer::~Buffer | ( | ) | [inline, virtual] |
virtual uint32 Falcon::csh::Buffer::charSize | ( | ) | const [inline, virtual] |
virtual void Falcon::csh::Buffer::destroy | ( | String * | str | ) | const [virtual] |
Implements Falcon::csh::Base.
virtual void Falcon::csh::Buffer::insert | ( | String * | str, | |
uint32 | pos, | |||
uint32 | len, | |||
const String * | source | |||
) | const [virtual] |
Implements Falcon::csh::Base.
virtual void Falcon::csh::Buffer::reserve | ( | String * | str, | |
uint32 | size, | |||
bool | relative = false , |
|||
bool | block = false | |||
) | const [virtual] |
Reimplemented from Falcon::csh::Byte.
virtual void Falcon::csh::Buffer::shrink | ( | String * | str | ) | const [virtual] |
Implements Falcon::csh::Base.
virtual t_type Falcon::csh::Buffer::type | ( | ) | const [inline, virtual] |