|
WvStreams
|
A raw memory read-only buffer backed by a constant WvString. More...
#include <wvbuf.h>

Public Member Functions | |
| 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. | |
| 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. | |
| void | reset (const void *_data, size_t _avail) |
| void | reset (const unsigned char *_data, size_t _avail) |
| Resets the underlying buffer pointer and properties. | |
| const unsigned char * | ptr () const |
| Returns the underlying array pointer. | |
| void | setavail (size_t _avail) |
| Sets the amount of available data using the current buffer and resets the read index to the beginning of the buffer. | |
| WvBufStore * | getstore () |
| Returns a pointer to the underlying storage class object. | |
| WvBufStore * | getstore () |
| Returns a pointer to the underlying storage class object. | |
| bool | isreadable () const |
| Returns true if the buffer supports reading. | |
| bool | isreadable () const |
| Returns true if the buffer supports reading. | |
| size_t | used () const |
| Returns the number of elements in the buffer currently available for reading. | |
| size_t | used () const |
| Returns the number of elements in the buffer currently available for reading. | |
| const unsigned char * | get (size_t count) |
| Reads exactly the specified number of elements and returns a pointer to a storage location owned by the buffer. | |
| unsigned char | get () |
| Reads the next element from the buffer. | |
| const unsigned char * | get (size_t count) |
| Reads exactly the specified number of elements and returns a pointer to a storage location owned by the buffer. | |
| unsigned char | get () |
| Reads the next element from the buffer. | |
| void | skip (size_t count) |
| Skips exactly the specified number of elements. | |
| void | skip (size_t count) |
| Skips exactly the specified number of elements. | |
| size_t | optgettable () const |
| Returns the optimal maximum number of elements in the buffer currently available for reading without incurring significant overhead. | |
| size_t | optgettable () const |
| Returns the optimal maximum number of elements in the buffer currently available for reading without incurring significant overhead. | |
| void | unget (size_t count) |
| Ungets exactly the specified number of elements by returning them to the buffer for subsequent reads. | |
| void | unget (size_t count) |
| Ungets exactly the specified number of elements by returning them to the buffer for subsequent reads. | |
| size_t | ungettable () const |
| Returns the maximum number of elements that may be ungotten at this time. | |
| size_t | ungettable () const |
| Returns the maximum number of elements that may be ungotten at this time. | |
| const unsigned char * | peek (int offset, size_t count) |
| Returns a const pointer into the buffer at the specified offset to the specified number of elements without actually adjusting the current get() index. | |
| unsigned char | peek (int offset=0) |
| Returns the element at the specified offset in the buffer. | |
| const unsigned char * | peek (int offset, size_t count) |
| Returns a const pointer into the buffer at the specified offset to the specified number of elements without actually adjusting the current get() index. | |
| unsigned char | peek (int offset=0) |
| Returns the element at the specified offset in the buffer. | |
| size_t | peekable (int offset) |
| size_t | peekable (int offset) |
| size_t | optpeekable (int offset) |
| size_t | optpeekable (int offset) |
| void | zap () |
| Clears the buffer. | |
| void | zap () |
| Clears the buffer. | |
| void | move (unsigned char *buf, size_t count) |
| Efficiently copies the specified number of elements from the buffer to the specified UNINITIALIZED storage location and removes the elements from the buffer. | |
| void | move (unsigned char *buf, size_t count) |
| Efficiently copies the specified number of elements from the buffer to the specified UNINITIALIZED storage location and removes the elements from the buffer. | |
| void | move (void *data, size_t count) |
| void | move (unsigned char *buf, size_t count) |
| Efficiently copies the specified number of elements from the buffer to the specified UNINITIALIZED storage location and removes the elements from the buffer. | |
| void | copy (unsigned char *buf, int offset, size_t count) |
| Efficiently copies the specified number of elements from the buffer to the specified UNINITIALIZED storage location but does not remove the elements from the buffer. | |
| void | copy (unsigned char *buf, int offset, size_t count) |
| Efficiently copies the specified number of elements from the buffer to the specified UNINITIALIZED storage location but does not remove the elements from the buffer. | |
| void | copy (unsigned char *buf, int offset, size_t count) |
| Efficiently copies the specified number of elements from the buffer to the specified UNINITIALIZED storage location but does not remove the elements from the buffer. | |
| bool | iswritable () const |
| Returns true if the buffer supports writing. | |
| bool | iswritable () const |
| Returns true if the buffer supports writing. | |
| size_t | free () const |
| Returns the number of elements that the buffer can currently accept for writing. | |
| size_t | free () const |
| Returns the number of elements that the buffer can currently accept for writing. | |
| unsigned char * | alloc (size_t count) |
| Allocates exactly the specified number of elements and returns a pointer to an UNINITIALIZED storage location owned by the buffer. | |
| unsigned char * | alloc (size_t count) |
| Allocates exactly the specified number of elements and returns a pointer to an UNINITIALIZED storage location owned by the buffer. | |
| size_t | optallocable () const |
| Returns the optimal maximum number of elements that the buffer can currently accept for writing without incurring significant overhead. | |
| size_t | optallocable () const |
| Returns the optimal maximum number of elements that the buffer can currently accept for writing without incurring significant overhead. | |
| void | unalloc (size_t count) |
| Unallocates exactly the specified number of elements by removing them from the buffer and releasing their storage. | |
| void | unalloc (size_t count) |
| Unallocates exactly the specified number of elements by removing them from the buffer and releasing their storage. | |
| size_t | unallocable () const |
| Returns the maximum number of elements that may be unallocated at this time. | |
| size_t | unallocable () const |
| Returns the maximum number of elements that may be unallocated at this time. | |
| unsigned char * | mutablepeek (int offset, size_t count) |
| Returns a non-const pointer info the buffer at the specified offset to the specified number of elements without actually adjusting the current get() index. | |
| unsigned char * | mutablepeek (int offset, size_t count) |
| Returns a non-const pointer info the buffer at the specified offset to the specified number of elements without actually adjusting the current get() index. | |
| void | put (const unsigned char *data, size_t count) |
| Writes the specified number of elements from the specified storage location into the buffer at its tail. | |
| void | put (unsigned char &value) |
| Writes the element into the buffer at its tail. | |
| void | put (const unsigned char *data, size_t count) |
| Writes the specified number of elements from the specified storage location into the buffer at its tail. | |
| void | put (unsigned char &value) |
| Writes the element into the buffer at its tail. | |
| void | put (unsigned char value) |
| void | put (const void *data, size_t count) |
| void | put (const unsigned char *data, size_t count) |
| Writes the specified number of elements from the specified storage location into the buffer at its tail. | |
| void | put (unsigned char &value) |
| Writes the element into the buffer at its tail. | |
| void | poke (const unsigned char *data, int offset, size_t count) |
| Efficiently copies the specified number of elements from the specified storage location into the buffer at a particular offset. | |
| void | poke (unsigned char &value, int offset) |
| Writes the element into the buffer at the specified offset. | |
| void | poke (const unsigned char *data, int offset, size_t count) |
| Efficiently copies the specified number of elements from the specified storage location into the buffer at a particular offset. | |
| void | poke (unsigned char &value, int offset) |
| Writes the element into the buffer at the specified offset. | |
| void | poke (void *data, int offset, size_t count) |
| void | poke (const unsigned char *data, int offset, size_t count) |
| Efficiently copies the specified number of elements from the specified storage location into the buffer at a particular offset. | |
| void | poke (unsigned char &value, int offset) |
| Writes the element into the buffer at the specified offset. | |
| void | merge (Buffer &inbuf, size_t count) |
| Efficiently moves count bytes from the specified buffer into this one. | |
| void | merge (Buffer &inbuf) |
| Efficiently merges the entire contents of a buffer into this one. | |
| void | merge (Buffer &inbuf, size_t count) |
| Efficiently moves count bytes from the specified buffer into this one. | |
| void | merge (Buffer &inbuf) |
| Efficiently merges the entire contents of a buffer into this one. | |
| void | merge (Buffer &inbuf, size_t count) |
| Efficiently moves count bytes from the specified buffer into this one. | |
| void | merge (Buffer &inbuf) |
| Efficiently merges the entire contents of a buffer into this one. | |
| void | putstr (WvStringParm str) |
| Copies a WvString into the buffer, excluding the null-terminator. | |
| void | putstr (WVSTRING_FORMAT_DECL) |
| void | putstr (WvStringParm str) |
| Copies a WvString into the buffer, excluding the null-terminator. | |
| void | putstr (WVSTRING_FORMAT_DECL) |
| WvString | getstr () |
| Returns the entire buffer as a null-terminated WvString. | |
| WvString | getstr (size_t len) |
| Returns the first len characters in the buffer. | |
| WvString | getstr () |
| Returns the entire buffer as a null-terminated WvString. | |
| WvString | getstr (size_t len) |
| Returns the first len characters in the buffer. | |
| int | getch () |
| Returns a single character from the buffer as an int. | |
| int | getch () |
| Returns a single character from the buffer as an int. | |
| void | putch (int ch) |
| Puts a single character into the buffer as an int. | |
| void | putch (int ch) |
| Puts a single character into the buffer as an int. | |
| int | peekch (int offset=0) |
| Peeks a single character from the buffer as an int. | |
| int | peekch (int offset=0) |
| Peeks a single character from the buffer as an int. | |
| size_t | strchr (int ch) |
| Returns the number of characters that would have to be read to find the first instance of the character. | |
| size_t | strchr (int ch) |
| Returns the number of characters that would have to be read to find the first instance of the character. | |
| size_t | match (const void *bytelist, size_t numbytes) |
| Returns the number of leading buffer elements that match any of those in the list. | |
| size_t | match (const char *chlist) |
| Returns the number of leading buffer elements that match any of those in the list. | |
| size_t | match (const void *bytelist, size_t numbytes) |
| Returns the number of leading buffer elements that match any of those in the list. | |
| size_t | match (const char *chlist) |
| Returns the number of leading buffer elements that match any of those in the list. | |
| size_t | notmatch (const void *bytelist, size_t numbytes) |
| Returns the number of leading buffer elements that do not match any of those in the list. | |
| size_t | notmatch (const char *chlist) |
| Returns the number of leading buffer elements that do not match any of those in the list. | |
| size_t | notmatch (const void *bytelist, size_t numbytes) |
| Returns the number of leading buffer elements that do not match any of those in the list. | |
| size_t | notmatch (const char *chlist) |
| Returns the number of leading buffer elements that do not match any of those in the list. | |
Protected Types | |
| typedef unsigned char | Elem |
| typedef WvBufBase< unsigned char > | Buffer |
| typedef WvBufBase< unsigned char > | Buffer |
Protected Attributes | |
| WvConstInPlaceBufStore | mystore |
| WvBufStore * | store |
A raw memory read-only buffer backed by a constant WvString.
Definition at line 241 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbuf.h.
|
protectedinherited |
Definition at line 730 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
protectedinherited |
Definition at line 40 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
protectedinherited |
Definition at line 40 of file include/wvbufbase.h.
|
explicit |
Creates a new buffer backed by a constant string.
"_str" is the string
Definition at line 100 of file wvbuffer.cc.
References reset().
| WvConstStringBuffer::WvConstStringBuffer | ( | ) |
Creates a new empty buffer backed by a null string.
Definition at line 106 of file wvbuffer.cc.
|
explicit |
Creates a new buffer backed by a constant string.
"_str" is the string
| void WvConstStringBuffer::reset | ( | WvStringParm | _str | ) |
Resets the buffer contents to a new string.
"_str" is the new string
Definition at line 111 of file wvbuffer.cc.
Referenced by WvConstStringBuffer().
|
inline |
Returns the string that backs the array.
Returns: the string
Definition at line 268 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbuf.h.
| void WvConstStringBuffer::reset | ( | WvStringParm | _str | ) |
Resets the buffer contents to a new string.
"_str" is the new string
|
inline |
Returns the string that backs the array.
Returns: the string
Definition at line 268 of file include/wvbuf.h.
|
inlineinherited |
Definition at line 195 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbuf.h.
|
inlineinherited |
Resets the underlying buffer pointer and properties.
Never frees the old buffer.
"_data" is the array of data to wrap "_avail" is the amount of data available for reading
Definition at line 777 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Returns the underlying array pointer.
Returns: the element pointer
Definition at line 763 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Sets the amount of available data using the current buffer and resets the read index to the beginning of the buffer.
"_avail" is the amount of data available for reading
Definition at line 788 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Returns a pointer to the underlying storage class object.
Returns: the low-level storage class object pointer, non-null
Definition at line 69 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Returns a pointer to the underlying storage class object.
Returns: the low-level storage class object pointer, non-null
Definition at line 69 of file include/wvbufbase.h.
|
inlineinherited |
Returns true if the buffer supports reading.
Returns: true if reading is supported
Definition at line 81 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Returns true if the buffer supports reading.
Returns: true if reading is supported
Definition at line 81 of file include/wvbufbase.h.
|
inlineinherited |
Returns the number of elements in the buffer currently available for reading.
This function could also be called gettable().
Definition at line 92 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Returns the number of elements in the buffer currently available for reading.
This function could also be called gettable().
Definition at line 92 of file include/wvbufbase.h.
|
inlineinherited |
Reads exactly the specified number of elements and returns a pointer to a storage location owned by the buffer.
The pointer is only valid until the next non-const buffer member is called. eg. alloc(size_t)
If count == 0, a NULL pointer may be returned.
It is an error for count to be greater than the number of available elements in the buffer.
For maximum efficiency, call this function multiple times with count no greater than optgettable() each time.
After this operation, at least count elements may be ungotten.
Definition at line 114 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Reads the next element from the buffer.
It is an error to invoke this method if used() == 0.
After this operation, at least 1 element may be ungotten.
Returns: the element
Definition at line 272 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Reads exactly the specified number of elements and returns a pointer to a storage location owned by the buffer.
The pointer is only valid until the next non-const buffer member is called. eg. alloc(size_t)
If count == 0, a NULL pointer may be returned.
It is an error for count to be greater than the number of available elements in the buffer.
For maximum efficiency, call this function multiple times with count no greater than optgettable() each time.
After this operation, at least count elements may be ungotten.
Definition at line 114 of file include/wvbufbase.h.
|
inlineinherited |
Reads the next element from the buffer.
It is an error to invoke this method if used() == 0.
After this operation, at least 1 element may be ungotten.
Returns: the element
Definition at line 272 of file include/wvbufbase.h.
|
inlineinherited |
Skips exactly the specified number of elements.
This is equivalent to invoking get(size_t) with the count and discarding the result, but may be faster for certain types of buffers. As with get(size_t), the call may be followed up by an unget(size_t).
It is an error for count to be greater than the number of available elements in the buffer.
"count" is the number of elements
Definition at line 136 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Skips exactly the specified number of elements.
This is equivalent to invoking get(size_t) with the count and discarding the result, but may be faster for certain types of buffers. As with get(size_t), the call may be followed up by an unget(size_t).
It is an error for count to be greater than the number of available elements in the buffer.
"count" is the number of elements
Definition at line 136 of file include/wvbufbase.h.
|
inlineinherited |
Returns the optimal maximum number of elements in the buffer currently available for reading without incurring significant overhead.
Invariants:
Returns: the number of elements
Definition at line 154 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Returns the optimal maximum number of elements in the buffer currently available for reading without incurring significant overhead.
Invariants:
Returns: the number of elements
Definition at line 154 of file include/wvbufbase.h.
|
inlineinherited |
Ungets exactly the specified number of elements by returning them to the buffer for subsequent reads.
This operation may always be safely performed with count less than or equal to that specified in the last get(size_t) if no non-const buffer members have been called since then.
If count == 0, nothing happens.
It is an error for count to be greater than ungettable().
"count" is the number of elements
Definition at line 177 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Ungets exactly the specified number of elements by returning them to the buffer for subsequent reads.
This operation may always be safely performed with count less than or equal to that specified in the last get(size_t) if no non-const buffer members have been called since then.
If count == 0, nothing happens.
It is an error for count to be greater than ungettable().
"count" is the number of elements
Definition at line 177 of file include/wvbufbase.h.
|
inlineinherited |
Returns the maximum number of elements that may be ungotten at this time.
Returns: the number of elements
Definition at line 188 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Returns the maximum number of elements that may be ungotten at this time.
Returns: the number of elements
Definition at line 188 of file include/wvbufbase.h.
|
inlineinherited |
Returns a const pointer into the buffer at the specified offset to the specified number of elements without actually adjusting the current get() index.
The pointer is only valid until the next non-const buffer member is called. eg. alloc(size_t)
If count == 0, a NULL pointer may be returned.
If offset is greater than zero, then elements will be returned beginning with the with the offset'th element that would be returned by get(size_t).
If offset equals zero, then elements will be returned beginning with the next one available for get(size_t).
If offset is less than zero, then elements will be returned beginning with the first one that would be returned on a get(size_t) following an unget(-offset).
It is an error for count to be greater than peekable(offset).
For maximum efficiency, call this function multiple times with count no greater than that returned by optpeekable(size_t) at incremental offsets.
"offset" is the buffer offset "count" is the number of elements Returns: the element storage pointer
Definition at line 225 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Returns the element at the specified offset in the buffer.
It is an error to invoke this method if used() == 0.
"offset" is the offset, default 0 Returns: the element
Definition at line 286 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Returns a const pointer into the buffer at the specified offset to the specified number of elements without actually adjusting the current get() index.
The pointer is only valid until the next non-const buffer member is called. eg. alloc(size_t)
If count == 0, a NULL pointer may be returned.
If offset is greater than zero, then elements will be returned beginning with the with the offset'th element that would be returned by get(size_t).
If offset equals zero, then elements will be returned beginning with the next one available for get(size_t).
If offset is less than zero, then elements will be returned beginning with the first one that would be returned on a get(size_t) following an unget(-offset).
It is an error for count to be greater than peekable(offset).
For maximum efficiency, call this function multiple times with count no greater than that returned by optpeekable(size_t) at incremental offsets.
"offset" is the buffer offset "count" is the number of elements Returns: the element storage pointer
Definition at line 225 of file include/wvbufbase.h.
|
inlineinherited |
Returns the element at the specified offset in the buffer.
It is an error to invoke this method if used() == 0.
"offset" is the offset, default 0 Returns: the element
Definition at line 286 of file include/wvbufbase.h.
|
inlineinherited |
Definition at line 231 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Definition at line 231 of file include/wvbufbase.h.
|
inlineinherited |
Definition at line 236 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Definition at line 236 of file include/wvbufbase.h.
|
inlineinherited |
Clears the buffer.
For many types of buffers, calling zap() will increased the amount of free space available for writing (see below) by an amount greater than used(). Hence it is wise to zap() a buffer just before writing to it to maximize free space.
After this operation, used() == 0, and often ungettable() == 0.
Definition at line 257 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Clears the buffer.
For many types of buffers, calling zap() will increased the amount of free space available for writing (see below) by an amount greater than used(). Hence it is wise to zap() a buffer just before writing to it to maximize free space.
After this operation, used() == 0, and often ungettable() == 0.
Definition at line 257 of file include/wvbufbase.h.
|
inlineinherited |
Efficiently copies the specified number of elements from the buffer to the specified UNINITIALIZED storage location and removes the elements from the buffer.
It is an error for count to be greater than used().
For maximum efficiency, choose as large a count as possible.
The pointer buf may be NULL only if count == 0.
After this operation, an indeterminate number of elements may be ungotten.
"buf" is the buffer that will receive the elements "count" is the number of elements
Definition at line 309 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Efficiently copies the specified number of elements from the buffer to the specified UNINITIALIZED storage location and removes the elements from the buffer.
It is an error for count to be greater than used().
For maximum efficiency, choose as large a count as possible.
The pointer buf may be NULL only if count == 0.
After this operation, an indeterminate number of elements may be ungotten.
"buf" is the buffer that will receive the elements "count" is the number of elements
Definition at line 309 of file include/wvbufbase.h.
Definition at line 144 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbuf.h.
|
inlineinherited |
Efficiently copies the specified number of elements from the buffer to the specified UNINITIALIZED storage location and removes the elements from the buffer.
It is an error for count to be greater than used().
For maximum efficiency, choose as large a count as possible.
The pointer buf may be NULL only if count == 0.
After this operation, an indeterminate number of elements may be ungotten.
"buf" is the buffer that will receive the elements "count" is the number of elements
Definition at line 309 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Efficiently copies the specified number of elements from the buffer to the specified UNINITIALIZED storage location but does not remove the elements from the buffer.
It is an error for count to be greater than peekable(offset).
For maximum efficiency, choose as large a count as possible.
The pointer buf may be NULL only if count == 0.
"buf" is the buffer that will receive the elements "offset" is the buffer offset "count" is the number of elements
Definition at line 330 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Efficiently copies the specified number of elements from the buffer to the specified UNINITIALIZED storage location but does not remove the elements from the buffer.
It is an error for count to be greater than peekable(offset).
For maximum efficiency, choose as large a count as possible.
The pointer buf may be NULL only if count == 0.
"buf" is the buffer that will receive the elements "offset" is the buffer offset "count" is the number of elements
Definition at line 330 of file include/wvbufbase.h.
|
inlineinherited |
Efficiently copies the specified number of elements from the buffer to the specified UNINITIALIZED storage location but does not remove the elements from the buffer.
It is an error for count to be greater than peekable(offset).
For maximum efficiency, choose as large a count as possible.
The pointer buf may be NULL only if count == 0.
"buf" is the buffer that will receive the elements "offset" is the buffer offset "count" is the number of elements
Definition at line 330 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Returns true if the buffer supports writing.
Returns: true if writing is supported
Definition at line 342 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Returns true if the buffer supports writing.
Returns: true if writing is supported
Definition at line 342 of file include/wvbufbase.h.
|
inlineinherited |
Returns the number of elements that the buffer can currently accept for writing.
Returns: the number of elements
Definition at line 353 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Returns the number of elements that the buffer can currently accept for writing.
Returns: the number of elements
Definition at line 353 of file include/wvbufbase.h.
|
inlineinherited |
Allocates exactly the specified number of elements and returns a pointer to an UNINITIALIZED storage location owned by the buffer.
The pointer is only valid until the next non-const buffer member is called. eg. alloc(size_t)
If count == 0, a NULL pointer may be returned.
It is an error for count to be greater than free().
For best results, call this function multiple times with count no greater than optallocable() each time.
After this operation, at least count elements may be unallocated.
"count" is the number of elements Returns: the element storage pointer
Definition at line 379 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Allocates exactly the specified number of elements and returns a pointer to an UNINITIALIZED storage location owned by the buffer.
The pointer is only valid until the next non-const buffer member is called. eg. alloc(size_t)
If count == 0, a NULL pointer may be returned.
It is an error for count to be greater than free().
For best results, call this function multiple times with count no greater than optallocable() each time.
After this operation, at least count elements may be unallocated.
"count" is the number of elements Returns: the element storage pointer
Definition at line 379 of file include/wvbufbase.h.
|
inlineinherited |
Returns the optimal maximum number of elements that the buffer can currently accept for writing without incurring significant overhead.
Invariants:
Returns: the number of elements
Definition at line 397 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Returns the optimal maximum number of elements that the buffer can currently accept for writing without incurring significant overhead.
Invariants:
Returns: the number of elements
Definition at line 397 of file include/wvbufbase.h.
|
inlineinherited |
Unallocates exactly the specified number of elements by removing them from the buffer and releasing their storage.
This operation may always be safely performed with count less than or equal to that specified in the last alloc(size_t) or put(const T*, size_t) if no non-const buffer members have been called since then.
If count == 0, nothing happens.
It is an error for count to be greater than unallocable().
"count" is the number of elements
Definition at line 421 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Unallocates exactly the specified number of elements by removing them from the buffer and releasing their storage.
This operation may always be safely performed with count less than or equal to that specified in the last alloc(size_t) or put(const T*, size_t) if no non-const buffer members have been called since then.
If count == 0, nothing happens.
It is an error for count to be greater than unallocable().
"count" is the number of elements
Definition at line 421 of file include/wvbufbase.h.
|
inlineinherited |
Returns the maximum number of elements that may be unallocated at this time.
For all practical purposes, this number will always be at least as large as the amount currently in use. It is provided primarily for symmetry, but also to handle cases where buffer reading (hence used()) is not supported by the implementation.
Invariants:
Returns: the number of elements
Definition at line 443 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Returns the maximum number of elements that may be unallocated at this time.
For all practical purposes, this number will always be at least as large as the amount currently in use. It is provided primarily for symmetry, but also to handle cases where buffer reading (hence used()) is not supported by the implementation.
Invariants:
Returns: the number of elements
Definition at line 443 of file include/wvbufbase.h.
|
inlineinherited |
Returns a non-const pointer info the buffer at the specified offset to the specified number of elements without actually adjusting the current get() index.
Other than the fact that the returned storage is mutable, operates identically to peek(int, size_t).
"offset" is the buffer offset "count" is the number of elements Returns: the element storage pointer
Definition at line 461 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Returns a non-const pointer info the buffer at the specified offset to the specified number of elements without actually adjusting the current get() index.
Other than the fact that the returned storage is mutable, operates identically to peek(int, size_t).
"offset" is the buffer offset "count" is the number of elements Returns: the element storage pointer
Definition at line 461 of file include/wvbufbase.h.
|
inlineinherited |
Writes the specified number of elements from the specified storage location into the buffer at its tail.
It is an error for count to be greater than free().
For maximum efficiency, choose as large a count as possible.
The pointer buf may be NULL only if count == 0.
After this operation, at least count elements may be unallocated.
"data" is the buffer that contains the elements "count" is the number of elements
Definition at line 483 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Writes the element into the buffer at its tail.
It is an error to invoke this method if free() == 0.
After this operation, at least 1 element may be unallocated.
"valid" is the element
Definition at line 519 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Writes the specified number of elements from the specified storage location into the buffer at its tail.
It is an error for count to be greater than free().
For maximum efficiency, choose as large a count as possible.
The pointer buf may be NULL only if count == 0.
After this operation, at least count elements may be unallocated.
"data" is the buffer that contains the elements "count" is the number of elements
Definition at line 483 of file include/wvbufbase.h.
|
inlineinherited |
Writes the element into the buffer at its tail.
It is an error to invoke this method if free() == 0.
After this operation, at least 1 element may be unallocated.
"valid" is the element
Definition at line 519 of file include/wvbufbase.h.
Definition at line 139 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbuf.h.
Definition at line 141 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbuf.h.
|
inlineinherited |
Writes the specified number of elements from the specified storage location into the buffer at its tail.
It is an error for count to be greater than free().
For maximum efficiency, choose as large a count as possible.
The pointer buf may be NULL only if count == 0.
After this operation, at least count elements may be unallocated.
"data" is the buffer that contains the elements "count" is the number of elements
Definition at line 483 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Writes the element into the buffer at its tail.
It is an error to invoke this method if free() == 0.
After this operation, at least 1 element may be unallocated.
"valid" is the element
Definition at line 519 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Efficiently copies the specified number of elements from the specified storage location into the buffer at a particular offset.
If offset <= used() and offset + count > used(), the remaining data is simply tacked onto the end of the buffer with put().
It is an error for count to be greater than free() - offset.
"data" is the buffer that contains the elements "count" is the number of elements "offset" is the buffer offset, default 0
Definition at line 504 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Writes the element into the buffer at the specified offset.
It is an error to invoke this method if free() == 0.
After this operation, at least 1 element may be unallocated.
"value" is the element "offset" is the buffer offset
Definition at line 535 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Efficiently copies the specified number of elements from the specified storage location into the buffer at a particular offset.
If offset <= used() and offset + count > used(), the remaining data is simply tacked onto the end of the buffer with put().
It is an error for count to be greater than free() - offset.
"data" is the buffer that contains the elements "count" is the number of elements "offset" is the buffer offset, default 0
Definition at line 504 of file include/wvbufbase.h.
|
inlineinherited |
Writes the element into the buffer at the specified offset.
It is an error to invoke this method if free() == 0.
After this operation, at least 1 element may be unallocated.
"value" is the element "offset" is the buffer offset
Definition at line 535 of file include/wvbufbase.h.
Definition at line 147 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbuf.h.
|
inlineinherited |
Efficiently copies the specified number of elements from the specified storage location into the buffer at a particular offset.
If offset <= used() and offset + count > used(), the remaining data is simply tacked onto the end of the buffer with put().
It is an error for count to be greater than free() - offset.
"data" is the buffer that contains the elements "count" is the number of elements "offset" is the buffer offset, default 0
Definition at line 504 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Writes the element into the buffer at the specified offset.
It is an error to invoke this method if free() == 0.
After this operation, at least 1 element may be unallocated.
"value" is the element "offset" is the buffer offset
Definition at line 535 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Efficiently moves count bytes from the specified buffer into this one.
In some cases, this may be a zero-copy operation.
It is an error for count to be greater than inbuf.used().
For maximum efficiency, choose as large a count as possible.
After this operation, an indeterminate number of elements may be ungotten from inbuf.
"inbuf" is the buffer from which to read "count" is the number of elements
Definition at line 558 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Efficiently merges the entire contents of a buffer into this one.
"inbuf" is the buffer from which to read
Definition at line 568 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Efficiently moves count bytes from the specified buffer into this one.
In some cases, this may be a zero-copy operation.
It is an error for count to be greater than inbuf.used().
For maximum efficiency, choose as large a count as possible.
After this operation, an indeterminate number of elements may be ungotten from inbuf.
"inbuf" is the buffer from which to read "count" is the number of elements
Definition at line 558 of file include/wvbufbase.h.
|
inlineinherited |
Efficiently merges the entire contents of a buffer into this one.
"inbuf" is the buffer from which to read
Definition at line 568 of file include/wvbufbase.h.
|
inlineinherited |
Efficiently moves count bytes from the specified buffer into this one.
In some cases, this may be a zero-copy operation.
It is an error for count to be greater than inbuf.used().
For maximum efficiency, choose as large a count as possible.
After this operation, an indeterminate number of elements may be ungotten from inbuf.
"inbuf" is the buffer from which to read "count" is the number of elements
Definition at line 558 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inlineinherited |
Efficiently merges the entire contents of a buffer into this one.
"inbuf" is the buffer from which to read
Definition at line 568 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
inherited |
Copies a WvString into the buffer, excluding the null-terminator.
"str" is the string
References putstr().
Referenced by WvCRL::decode(), WvRSAKey::decode(), WvX509::decode(), WvX509::get_fingerprint(), non_breaking(), UniConfKey::printable(), putstr(), UniIniGen::refresh(), and strreplace().
|
inlineinherited |
Definition at line 34 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbuf.h.
|
inherited |
|
inlineinherited |
Definition at line 34 of file include/wvbuf.h.
Returns the entire buffer as a null-terminated WvString.
If the buffer contains null characters, they will seem to prematurely terminate the string.
After this operation, ungettable() >= length of the string.
Returns: the buffer contents as a string
Referenced by WvX509::certreq(), WvCRL::encode(), WvRSAKey::encode(), WvX509::encode(), WvEncoder::encodebufstr(), WvEncoder::flushstrstr(), UniFileSystemGen::get(), WvX509::get_fingerprint(), WvDSAKey::getpem(), non_breaking(), UniConfKey::printable(), UniIniGen::refresh(), strreplace(), undupe(), and url_encode().
Returns the first len characters in the buffer.
This is equivalent to doing a get(len), but returns it as a WvString instead of as an unsigned char *.
Returns the entire buffer as a null-terminated WvString.
If the buffer contains null characters, they will seem to prematurely terminate the string.
After this operation, ungettable() >= length of the string.
Returns: the buffer contents as a string
Returns the first len characters in the buffer.
This is equivalent to doing a get(len), but returns it as a WvString instead of as an unsigned char *.
|
inlineinherited |
Returns a single character from the buffer as an int.
The same constraints apply as for get(1).
Returns: the character
Definition at line 66 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbuf.h.
References WvBufBaseCommonImpl< T >::get().
Referenced by WvBase64Decoder::_encode(), WvBase64Encoder::_encode(), WvHexDecoder::_encode(), WvHexEncoder::_encode(), and WvWordWrapEncoder::_encode().
|
inlineinherited |
Returns a single character from the buffer as an int.
The same constraints apply as for get(1).
Returns: the character
Definition at line 66 of file include/wvbuf.h.
References WvBufBaseCommonImpl< T >::get().
|
inlineinherited |
Puts a single character into the buffer as an int.
The same constraints apply as for alloc(1).
"ch" is the character
Definition at line 76 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbuf.h.
References WvBufBaseCommonImpl< T >::put().
Referenced by WvBackslashEncoder::_encode(), WvBase64Decoder::_encode(), WvBase64Encoder::_encode(), WvHexDecoder::_encode(), WvHexEncoder::_encode(), WvWordWrapEncoder::_encode(), WvBase64Encoder::_finish(), WvX509::get_fingerprint(), non_breaking(), and undupe().
|
inlineinherited |
Puts a single character into the buffer as an int.
The same constraints apply as for alloc(1).
"ch" is the character
Definition at line 76 of file include/wvbuf.h.
References WvBufBaseCommonImpl< T >::put().
|
inlineinherited |
Peeks a single character from the buffer as an int.
The same constraints apply as for peek(offset, 1).
"offset" is the offset Returns: the character
Definition at line 87 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbuf.h.
References WvBufBaseCommonImpl< T >::peek().
|
inlineinherited |
Peeks a single character from the buffer as an int.
The same constraints apply as for peek(offset, 1).
"offset" is the offset Returns: the character
Definition at line 87 of file include/wvbuf.h.
References WvBufBaseCommonImpl< T >::peek().
|
inherited |
Returns the number of characters that would have to be read to find the first instance of the character.
"ch" is the character Returns: the number of bytes, or zero if the character is not in the buffer
Referenced by UniIniGen::refresh().
|
inherited |
Returns the number of characters that would have to be read to find the first instance of the character.
"ch" is the character Returns: the number of bytes, or zero if the character is not in the buffer
|
inlineinherited |
Returns the number of leading buffer elements that match any of those in the list.
"bytelist" is the list bytes to search for "numbytes" is the number of bytes in the list Returns: the number of leading buffer elements that match
Definition at line 106 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbuf.h.
Referenced by match().
|
inlineinherited |
Returns the number of leading buffer elements that match any of those in the list.
"chlist" is a string of characters to search for Returns: the number of leading buffer elements that match
Definition at line 115 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbuf.h.
References match().
|
inlineinherited |
Returns the number of leading buffer elements that match any of those in the list.
"bytelist" is the list bytes to search for "numbytes" is the number of bytes in the list Returns: the number of leading buffer elements that match
Definition at line 106 of file include/wvbuf.h.
|
inlineinherited |
Returns the number of leading buffer elements that match any of those in the list.
"chlist" is a string of characters to search for Returns: the number of leading buffer elements that match
Definition at line 115 of file include/wvbuf.h.
References match().
|
inlineinherited |
Returns the number of leading buffer elements that do not match any of those in the list.
"bytelist" is the list bytes to search for "numbytes" is the number of bytes in the list Returns: the number of leading buffer elements that don't match
Definition at line 125 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbuf.h.
Referenced by notmatch().
|
inlineinherited |
Returns the number of leading buffer elements that do not match any of those in the list.
"chlist" is a string of characters to search for Returns: the number of leading buffer elements that don't match
Definition at line 134 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbuf.h.
References notmatch().
|
inlineinherited |
Returns the number of leading buffer elements that do not match any of those in the list.
"bytelist" is the list bytes to search for "numbytes" is the number of bytes in the list Returns: the number of leading buffer elements that don't match
Definition at line 125 of file include/wvbuf.h.
|
inlineinherited |
Returns the number of leading buffer elements that do not match any of those in the list.
"chlist" is a string of characters to search for Returns: the number of leading buffer elements that don't match
Definition at line 134 of file include/wvbuf.h.
References notmatch().
|
protectedinherited |
Definition at line 732 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.
|
protectedinherited |
Definition at line 42 of file debian/libwvstreams-dev/usr/include/wvstreams/wvbufbase.h.