#include <wvbufstore.h>
Inherits WvBufStore.
Collaboration diagram for WvCircularBufStore:
Definition at line 318 of file wvbufstore.h.
Public Member Functions | |
WvCircularBufStore (int _granularity, void *_data, size_t _avail, size_t _size, bool _autofree) | |
WvCircularBufStore (int _granularity, size_t _size) | |
virtual | ~WvCircularBufStore () |
void * | ptr () const |
size_t | size () const |
bool | autofree () const |
void | setautofree (bool _autofree) |
void | reset (void *_data, size_t _avail, size_t _size, bool _autofree) |
void | setavail (size_t _avail) |
void | normalize () |
virtual size_t | used () const |
virtual size_t | optgettable () const |
virtual const void * | get (size_t count) |
virtual void | unget (size_t count) |
virtual size_t | ungettable () const |
virtual void | zap () |
virtual size_t | free () const |
virtual size_t | optallocable () const |
virtual void * | alloc (size_t count) |
virtual void | unalloc (size_t count) |
virtual size_t | unallocable () const |
virtual void * | mutablepeek (int offset, size_t count) |
virtual bool | isreadable () const |
virtual void | skip (size_t count) |
virtual size_t | peekable (int offset) const |
virtual size_t | optpeekable (int offset) const |
virtual const void * | peek (int offset, size_t count) |
void | move (void *buf, size_t count) |
void | copy (void *buf, int offset, size_t count) |
virtual bool | iswritable () const |
void | put (const void *data, size_t count) |
void | fastput (const void *data, size_t count) |
void | poke (const void *data, int offset, size_t count) |
virtual void | merge (WvBufStore &instore, size_t count) |
void | basicmerge (WvBufStore &instore, size_t count) |
Protected Member Functions | |
size_t | ensurecontiguous (int offset, size_t count, bool keephistory) |
Ensures that count new bytes can be read from or written to the buffer beginning at the specified offset as one large contiguous block. | |
virtual bool | usessubbuffers () const |
Returns true if the buffer uses subbuffers for storage. | |
virtual size_t | numsubbuffers () const |
Returns the number of subbuffers in the buffer. | |
virtual WvBufStore * | firstsubbuffer () const |
Returns the first subbuffer. | |
virtual void | appendsubbuffer (WvBufStore *buffer, bool autofree) |
Appends a subbuffer to the buffer. | |
virtual void | prependsubbuffer (WvBufStore *buffer, bool autofree) |
Prepends a subbuffer to the buffer. | |
virtual bool | unlinksubbuffer (WvBufStore *buffer, bool allowautofree) |
Unlinks the specified subbuffer. | |
Static Protected Member Functions | |
void | compact (void *data, size_t size, size_t head, size_t count) |
Compacts an array arranged as a circular buffer such that the specified region is moved to the beginning of the array. | |
Protected Attributes | |
void * | data |
size_t | xsize |
size_t | head |
size_t | totalused |
size_t | totalinit |
bool | xautofree |
int | granularity |
|
Definition at line 485 of file wvbufferstore.cc. References reset(). |
|
Definition at line 493 of file wvbufferstore.cc. |
|
Definition at line 500 of file wvbufferstore.cc. |
|
Implements WvBufStore. Definition at line 592 of file wvbufferstore.cc. References data, ensurecontiguous(), totalinit, totalused, and xsize. |
|
Appends a subbuffer to the buffer.
Reimplemented in WvLinkedBufferStore. Definition at line 109 of file wvbufstore.h. Referenced by WvBufStore::merge(). |
|
Definition at line 337 of file wvbufstore.h. References xautofree. Referenced by WvCircularBufBase< unsigned char >::autofree(). |
|
Definition at line 229 of file wvbufferstore.cc. References WvBufStore::alloc(), WvBufStore::get(), memops, WvBufStore::optallocable(), WvBufStore::optgettable(), and WvBufStore::unalloc(). Referenced by WvBufStore::merge(). |
|
Compacts an array arranged as a circular buffer such that the specified region is moved to the beginning of the array. "data" is the array base "size" is the size of the array "head" is the beginning of the region to keep "count" is the number of bytes in the region to keep Definition at line 684 of file wvbufferstore.cc. References memops. Referenced by ensurecontiguous(), and normalize(). |
|
Definition at line 128 of file wvbufferstore.cc. References memops, WvBufStore::optpeekable(), and WvBufStore::peek(). Referenced by WvBufBaseCommonImpl< unsigned >::copy(). |
|
Ensures that count new bytes can be read from or written to the buffer beginning at the specified offset as one large contiguous block. "offset" is the offset "count" is the number of bytes "keephistory" is if true, does not purge unget history Returns: the offset of the first available byte Definition at line 647 of file wvbufferstore.cc. References compact(), data, head, totalinit, totalused, and xsize. Referenced by alloc(), get(), and mutablepeek(). |
|
Definition at line 163 of file wvbufferstore.cc. References WvBufStore::alloc(), and memops. Referenced by WvBufBaseCommonImpl< unsigned >::put(). |
|
Returns the first subbuffer. Returns: the buffer or NULL if none or not supported Reimplemented in WvLinkedBufferStore. Definition at line 105 of file wvbufstore.h. Referenced by WvBufStore::merge(). |
|
Implements WvBufStore. Definition at line 577 of file wvbufferstore.cc. |
|
Implements WvBufStore. Definition at line 543 of file wvbufferstore.cc. References data, ensurecontiguous(), head, totalused, and xsize. |
|
Reimplemented in WvBufCursorStore, and WvWriteOnlyBufferStoreMixin< WvReadOnlyBufferStoreMixin< WvBufStore > >. Definition at line 45 of file wvbufstore.h. Referenced by WvBufCursorStore::isreadable(), and WvBufBaseCommonImpl< unsigned >::isreadable(). |
|
Reimplemented in WvBufCursorStore, and WvReadOnlyBufferStoreMixin< WvBufStore >. Definition at line 68 of file wvbufstore.h. Referenced by WvBufCursorStore::iswritable(). |
|
Reimplemented in WvReadOnlyBufferStoreMixin< WvBufStore >. Definition at line 198 of file wvbufferstore.cc. References WvBufStore::appendsubbuffer(), WvBufStore::basicmerge(), WvBufStore::firstsubbuffer(), WvBufStore::unlinksubbuffer(), WvBufStore::used(), and WvBufStore::usessubbuffers(). Referenced by WvLinkedBufferStore::coalesce(), and WvBufBaseCommonImpl< unsigned >::merge(). |
|
Definition at line 111 of file wvbufferstore.cc. References WvBufStore::get(), memops, and WvBufStore::optgettable(). Referenced by WvBufBaseCommonImpl< unsigned >::move(). |
|
Implements WvBufStore. Definition at line 621 of file wvbufferstore.cc. References data, ensurecontiguous(), totalinit, and totalused. |
|
Definition at line 636 of file wvbufferstore.cc. References compact(), data, head, totalinit, totalused, and xsize. Referenced by WvCircularBufBase< unsigned char >::normalize(). |
|
Returns the number of subbuffers in the buffer.
Reimplemented in WvLinkedBufferStore. Definition at line 98 of file wvbufstore.h. |
|
Reimplemented from WvBufStore. Definition at line 583 of file wvbufferstore.cc. |
|
Reimplemented from WvBufStore. Definition at line 534 of file wvbufferstore.cc. |
|
Reimplemented in WvLinkedBufferStore, WvBufCursorStore, and WvWriteOnlyBufferStoreMixin< WvReadOnlyBufferStoreMixin< WvBufStore > >. Definition at line 56 of file wvbufstore.h. References WvBufStore::peekable(). Referenced by WvBufStore::copy(), WvBufCursorStore::optgettable(), WvBufCursorStore::optpeekable(), WvLinkedBufferStore::optpeekable(), WvBufBaseCommonImpl< unsigned >::optpeekable(), and WvBufStore::poke(). |
|
Reimplemented in WvConstInPlaceBufStore, WvBufCursorStore, and WvWriteOnlyBufferStoreMixin< WvReadOnlyBufferStoreMixin< WvBufStore > >. Definition at line 58 of file wvbufstore.h. References WvBufStore::mutablepeek(). Referenced by WvBufStore::copy(), WvBufCursorStore::get(), WvBufCursorStore::peek(), and WvBufBaseCommonImpl< unsigned >::peek(). |
|
Reimplemented in WvBufCursorStore, and WvWriteOnlyBufferStoreMixin< WvReadOnlyBufferStoreMixin< WvBufStore > >. Definition at line 90 of file wvbufferstore.cc. References WvBufStore::ungettable(), and WvBufStore::used(). Referenced by WvLinkedBufferStore::mutablepeek(), WvBufStore::optpeekable(), WvBufBaseCommonImpl< unsigned >::optpeekable(), and WvBufBaseCommonImpl< unsigned >::peekable(). |
|
Definition at line 170 of file wvbufferstore.cc. References memops, WvBufStore::mutablepeek(), WvBufStore::optpeekable(), WvBufStore::put(), and WvBufStore::used(). Referenced by WvBufBaseCommonImpl< unsigned >::poke(). |
|
Prepends a subbuffer to the buffer.
Reimplemented in WvLinkedBufferStore. Definition at line 113 of file wvbufstore.h. |
|
Definition at line 333 of file wvbufstore.h. References data. Referenced by WvCircularBufBase< unsigned char >::ptr(). |
|
Definition at line 146 of file wvbufferstore.cc. References WvBufStore::alloc(), memops, and WvBufStore::optallocable(). Referenced by WvBufStore::poke(), and WvBufBaseCommonImpl< unsigned >::put(). |
|
Definition at line 507 of file wvbufferstore.cc. References data, memops, setavail(), xautofree, and xsize. Referenced by WvCircularBufBase< unsigned char >::reset(), and WvCircularBufStore(). |
|
Definition at line 339 of file wvbufstore.h. References xautofree. Referenced by WvCircularBufBase< unsigned char >::setautofree(). |
|
Definition at line 520 of file wvbufferstore.cc. References head, totalinit, totalused, and xsize. Referenced by reset(), and WvCircularBufBase< unsigned char >::setavail(). |
|
Definition at line 335 of file wvbufstore.h. References xsize. Referenced by WvCircularBufBase< unsigned char >::size(). |
|
Reimplemented in WvBufCursorStore, and WvWriteOnlyBufferStoreMixin< WvReadOnlyBufferStoreMixin< WvBufStore > >. Definition at line 51 of file wvbufstore.h. References WvBufStore::get(). Referenced by WvLinkedBufferStore::coalesce(), and WvBufBaseCommonImpl< unsigned >::skip(). |
|
Implements WvBufStore. Definition at line 606 of file wvbufferstore.cc. |
|
Implements WvBufStore. Definition at line 615 of file wvbufferstore.cc. References totalused. |
|
Implements WvBufStore. Definition at line 555 of file wvbufferstore.cc. |
|
Implements WvBufStore. Definition at line 564 of file wvbufferstore.cc. |
|
Unlinks the specified subbuffer. Only autofrees the buffer if allowautofree == true. Returns: the autofree flag for the buffer Reimplemented in WvLinkedBufferStore. Definition at line 121 of file wvbufstore.h. Referenced by WvBufStore::merge(). |
|
Implements WvBufStore. Definition at line 528 of file wvbufferstore.cc. References totalused. |
|
Returns true if the buffer uses subbuffers for storage.
Reimplemented in WvLinkedBufferStore. Definition at line 94 of file wvbufstore.h. Referenced by WvBufStore::merge(). |
|
Implements WvBufStore. Definition at line 570 of file wvbufferstore.cc. |
|
Definition at line 321 of file wvbufstore.h. Referenced by alloc(), ensurecontiguous(), get(), mutablepeek(), normalize(), ptr(), reset(), and ~WvCircularBufStore(). |
|
Definition at line 31 of file wvbufstore.h. |
|
Definition at line 323 of file wvbufstore.h. Referenced by ensurecontiguous(), get(), normalize(), optallocable(), optgettable(), setavail(), unget(), and zap(). |
|
Definition at line 325 of file wvbufstore.h. Referenced by alloc(), ensurecontiguous(), mutablepeek(), normalize(), setavail(), unalloc(), unget(), ungettable(), and zap(). |
|
Definition at line 324 of file wvbufstore.h. Referenced by alloc(), ensurecontiguous(), free(), get(), mutablepeek(), normalize(), optallocable(), optgettable(), setavail(), unalloc(), unallocable(), unget(), ungettable(), used(), and zap(). |
|
Definition at line 326 of file wvbufstore.h. Referenced by autofree(), reset(), setautofree(), and ~WvCircularBufStore(). |
|
Definition at line 322 of file wvbufstore.h. Referenced by alloc(), ensurecontiguous(), free(), get(), normalize(), optallocable(), optgettable(), reset(), setavail(), size(), and unget(). |