#include <wvbufstore.h>
Inherited by WvCircularBufStore, WvInPlaceBufStore, WvLinkedBufferStore, and WvReadOnlyBufferStoreMixin< WvBufStore >.
Collaboration diagram for WvBufStore:
Definition at line 24 of file wvbufstore.h.
Public Member Functions | |
virtual | ~WvBufStore () |
virtual bool | isreadable () const |
virtual size_t | used () const=0 |
virtual size_t | optgettable () const |
virtual const void * | get (size_t count)=0 |
virtual void | skip (size_t count) |
virtual void | unget (size_t count)=0 |
virtual size_t | ungettable () const=0 |
virtual size_t | peekable (int offset) const |
virtual size_t | optpeekable (int offset) const |
virtual const void * | peek (int offset, size_t count) |
virtual void | zap ()=0 |
void | move (void *buf, size_t count) |
void | copy (void *buf, int offset, size_t count) |
virtual bool | iswritable () const |
virtual size_t | free () const=0 |
virtual size_t | optallocable () const |
virtual void * | alloc (size_t count)=0 |
virtual void | unalloc (size_t count)=0 |
virtual size_t | unallocable () const=0 |
virtual void * | mutablepeek (int offset, size_t count)=0 |
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 | |
WvBufStore (int _granularity) | |
Creates a new buffer. | |
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. | |
Protected Attributes | |
int | granularity |
|
Creates a new buffer. "_granularity" is the suggested granularity for data allocation and alignment purposes Definition at line 84 of file wvbufferstore.cc. |
|
Definition at line 41 of file wvbufstore.h. |
|
Implemented in WvInPlaceBufStore, WvCircularBufStore, WvLinkedBufferStore, WvDynBufStore, and WvReadOnlyBufferStoreMixin< WvBufStore >. Referenced by WvBufBaseCommonImpl< unsigned >::alloc(), basicmerge(), WvLinkedBufferStore::coalesce(), fastput(), and put(). |
|
Appends a subbuffer to the buffer.
Reimplemented in WvLinkedBufferStore. Definition at line 109 of file wvbufstore.h. Referenced by merge(). |
|
Definition at line 229 of file wvbufferstore.cc. References alloc(), get(), memops, optallocable(), optgettable(), and unalloc(). Referenced by merge(). |
|
Definition at line 128 of file wvbufferstore.cc. References memops, optpeekable(), and peek(). Referenced by WvBufBaseCommonImpl< unsigned >::copy(). |
|
Definition at line 163 of file wvbufferstore.cc. References 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 merge(). |
|
|
|
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 appendsubbuffer(), basicmerge(), firstsubbuffer(), unlinksubbuffer(), used(), and usessubbuffers(). Referenced by WvLinkedBufferStore::coalesce(), and WvBufBaseCommonImpl< unsigned >::merge(). |
|
Definition at line 111 of file wvbufferstore.cc. References get(), memops, and optgettable(). Referenced by WvBufBaseCommonImpl< unsigned >::move(). |
|
|
Returns the number of subbuffers in the buffer.
Reimplemented in WvLinkedBufferStore. Definition at line 98 of file wvbufstore.h. |
|
Reimplemented in WvCircularBufStore, WvLinkedBufferStore, WvDynBufStore, and WvReadOnlyBufferStoreMixin< WvBufStore >. Definition at line 71 of file wvbufstore.h. References free(). Referenced by basicmerge(), WvBufBaseCommonImpl< unsigned >::optallocable(), and put(). |
|
Reimplemented in WvCircularBufStore, WvLinkedBufferStore, WvBufCursorStore, and WvWriteOnlyBufferStoreMixin< WvReadOnlyBufferStoreMixin< WvBufStore > >. Definition at line 48 of file wvbufstore.h. References used(). Referenced by basicmerge(), move(), and WvBufBaseCommonImpl< unsigned >::optgettable(). |
|
Reimplemented in WvLinkedBufferStore, WvBufCursorStore, and WvWriteOnlyBufferStoreMixin< WvReadOnlyBufferStoreMixin< WvBufStore > >. Definition at line 56 of file wvbufstore.h. References peekable(). Referenced by copy(), WvBufCursorStore::optgettable(), WvBufCursorStore::optpeekable(), WvLinkedBufferStore::optpeekable(), WvBufBaseCommonImpl< unsigned >::optpeekable(), and poke(). |
|
Reimplemented in WvConstInPlaceBufStore, WvBufCursorStore, and WvWriteOnlyBufferStoreMixin< WvReadOnlyBufferStoreMixin< WvBufStore > >. Definition at line 58 of file wvbufstore.h. References mutablepeek(). Referenced by 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 ungettable(), and used(). Referenced by WvLinkedBufferStore::mutablepeek(), optpeekable(), WvBufBaseCommonImpl< unsigned >::optpeekable(), and WvBufBaseCommonImpl< unsigned >::peekable(). |
|
Definition at line 170 of file wvbufferstore.cc. References memops, mutablepeek(), optpeekable(), put(), and 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 146 of file wvbufferstore.cc. References alloc(), memops, and optallocable(). Referenced by poke(), and WvBufBaseCommonImpl< unsigned >::put(). |
|
Reimplemented in WvBufCursorStore, and WvWriteOnlyBufferStoreMixin< WvReadOnlyBufferStoreMixin< WvBufStore > >. Definition at line 51 of file wvbufstore.h. References get(). Referenced by WvLinkedBufferStore::coalesce(), and WvBufBaseCommonImpl< unsigned >::skip(). |
|
Implemented in WvInPlaceBufStore, WvCircularBufStore, WvLinkedBufferStore, and WvReadOnlyBufferStoreMixin< WvBufStore >. Referenced by basicmerge(), WvLinkedBufferStore::unalloc(), and WvBufBaseCommonImpl< unsigned >::unalloc(). |
|
Implemented in WvInPlaceBufStore, WvCircularBufStore, WvLinkedBufferStore, and WvReadOnlyBufferStoreMixin< WvBufStore >. Referenced by WvLinkedBufferStore::unalloc(), and WvBufBaseCommonImpl< unsigned >::unallocable(). |
|
|
|
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 merge(). |
|
|
Returns true if the buffer uses subbuffers for storage.
Reimplemented in WvLinkedBufferStore. Definition at line 94 of file wvbufstore.h. Referenced by merge(). |
|
|
Definition at line 31 of file wvbufstore.h. |