34 void putstr(WVSTRING_FORMAT_DECL)
35 { putstr(
WvString(WVSTRING_FORMAT_CALL)); }
67 {
return int(
get()); }
77 {
put((
unsigned char)ch); }
87 int peekch(
int offset = 0)
88 {
return int(
peek(offset)); }
97 size_t strchr(
int ch);
106 size_t match(
const void *bytelist,
size_t numbytes)
107 {
return _match(bytelist, numbytes,
false); }
115 size_t match(
const char *chlist)
116 {
return match(chlist, strlen(chlist)); }
125 size_t notmatch(
const void *bytelist,
size_t numbytes)
126 {
return _match(bytelist, numbytes,
true); }
134 size_t notmatch(
const char *chlist)
135 {
return notmatch(chlist, strlen(chlist)); }
139 void put(
unsigned char value)
141 void put(
const void *data,
size_t count)
143 (
const unsigned char*)data, count); }
144 void move(
void *data,
size_t count)
146 (
unsigned char*)data, count); }
147 void poke(
void *data,
int offset,
size_t count)
149 (
unsigned char*)data, offset, count); }
153 size_t _match(
const void *bytelist,
size_t numbytes,
bool reverse);
168 bool _autofree =
false) :
170 _avail, _size, _autofree) { }
175 void reset(
void *_data,
size_t _avail,
size_t _size,
176 bool _autofree =
false)
179 (
unsigned char*)_data, _avail, _size, _autofree);
192 (const unsigned char*)_data, _avail) { }
195 void reset(
const void *_data,
size_t _avail)
198 (
const unsigned char*)_data, _avail);
210 bool _autofree =
false) :
212 _avail, _size, _autofree) { }
217 void reset(
void *_data,
size_t _avail,
size_t _size,
218 bool _autofree =
false)
221 (
unsigned char*)_data, _avail, _size, _autofree);
An abstract generic buffer template.
void poke(const T *data, int offset, size_t count)
Efficiently copies the specified number of elements from the specified storage location into the buff...
void put(const T *data, size_t count)
Writes the specified number of elements from the specified storage location into the buffer at its ta...
const T * peek(int offset, size_t count)
Returns a const pointer into the buffer at the specified offset to the specified number of elements w...
T get()
Reads the next element from the buffer.
void move(T *buf, size_t count)
Efficiently copies the specified number of elements from the buffer to the specified UNINITIALIZED st...
The generic buffer base type.
A buffer that acts like a cursor over a portion of another buffer.
The abstract buffer storage base class.
A buffer that provides a read-write view over another buffer with a different datatype.
A buffer that wraps a pre-allocated array and provides read-write access to its elements using a circ...
void reset(T *_data, size_t _avail, size_t _size, bool _autofree=false)
Resets the underlying buffer pointer and properties.
The circular in place raw memory buffer type.
A buffer that wraps a pre-allocated array and provides read-only access to its elements.
void reset(const T *_data, size_t _avail)
Resets the underlying buffer pointer and properties.
The const in place raw memory buffer type.
A raw memory read-only buffer backed by a constant WvString.
WvConstStringBuffer(WvStringParm _str)
Creates a new buffer backed by a constant string.
WvConstStringBuffer()
Creates a new empty buffer backed by a null string.
void reset(WvStringParm _str)
Resets the buffer contents to a new string.
WvString str()
Returns the string that backs the array.
A buffer that dynamically grows and shrinks based on demand.
A WvFastString acts exactly like a WvString, but can take (const char *) strings without needing to a...
A buffer that wraps a pre-allocated array and provides read-write access to its elements.
void reset(T *_data, size_t _avail, size_t _size, bool _autofree=false)
Resets the underlying buffer pointer and properties.
The in place raw memory buffer type.
A buffer that is always empty.
WvString is an implementation of a simple and efficient printable-string class.