Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

WvBufCursorStore Class Reference

#include <wvbufstore.h>

Inherits WvReadOnlyBufferStoreMixin< WvBufStore >.

Collaboration diagram for WvBufCursorStore:

[legend]
List of all members.

Detailed Description

The WvBufCursor storage class.

Definition at line 509 of file wvbufstore.h.

Public Member Functions

 WvBufCursorStore (size_t _granularity, WvBufStore *_buf, int _start, size_t _length)
virtual bool isreadable () const
virtual size_t used () const
virtual size_t optgettable () const
virtual const void * get (size_t count)
virtual void skip (size_t count)
virtual void unget (size_t count)
virtual size_t ungettable () const
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 ()
virtual bool iswritable () const
virtual void * mutablepeek (int offset, size_t count)
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 merge (WvBufStore &instore, size_t count)
void move (void *buf, size_t count)
void copy (void *buf, int offset, size_t count)
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)
void basicmerge (WvBufStore &instore, size_t count)

Protected Member Functions

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 WvBufStorefirstsubbuffer () 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

WvBufStorebuf
int start
size_t length
size_t shift
int granularity


Constructor & Destructor Documentation

WvBufCursorStore::WvBufCursorStore size_t  _granularity,
WvBufStore _buf,
int  _start,
size_t  _length
 

Definition at line 1188 of file wvbufferstore.cc.


Member Function Documentation

virtual void* WvReadOnlyBufferStoreMixin< WvBufStore >::alloc size_t  count  )  [inline, virtual, inherited]
 

Implements WvBufStore.

Definition at line 154 of file wvbufstore.h.

virtual void WvBufStore::appendsubbuffer WvBufStore buffer,
bool  autofree
[inline, protected, virtual, inherited]
 

Appends a subbuffer to the buffer.

Reimplemented in WvLinkedBufferStore.

Definition at line 109 of file wvbufstore.h.

Referenced by WvBufStore::merge().

void WvBufStore::basicmerge WvBufStore instore,
size_t  count
[inherited]
 

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().

void WvBufStore::copy void *  buf,
int  offset,
size_t  count
[inherited]
 

Definition at line 128 of file wvbufferstore.cc.

References memops, WvBufStore::optpeekable(), and WvBufStore::peek().

Referenced by WvBufBaseCommonImpl< unsigned >::copy().

void WvBufStore::fastput const void *  data,
size_t  count
[inherited]
 

Definition at line 163 of file wvbufferstore.cc.

References WvBufStore::alloc(), and memops.

Referenced by WvBufBaseCommonImpl< unsigned >::put().

virtual WvBufStore* WvBufStore::firstsubbuffer  )  const [inline, protected, virtual, inherited]
 

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().

virtual size_t WvReadOnlyBufferStoreMixin< WvBufStore >::free  )  const [inline, virtual, inherited]
 

Implements WvBufStore.

Definition at line 146 of file wvbufstore.h.

const void * WvBufCursorStore::get size_t  count  )  [virtual]
 

Implements WvBufStore.

Definition at line 1219 of file wvbufferstore.cc.

References buf, length, WvBufStore::peek(), shift, and start.

bool WvBufCursorStore::isreadable  )  const [virtual]
 

Reimplemented from WvBufStore.

Definition at line 1196 of file wvbufferstore.cc.

References buf, and WvBufStore::isreadable().

bool WvBufCursorStore::iswritable  )  const [virtual]
 

Reimplemented from WvReadOnlyBufferStoreMixin< WvBufStore >.

Definition at line 1288 of file wvbufferstore.cc.

References buf, and WvBufStore::iswritable().

virtual void WvReadOnlyBufferStoreMixin< WvBufStore >::merge WvBufStore instore,
size_t  count
[inline, virtual, inherited]
 

Reimplemented from WvBufStore.

Definition at line 175 of file wvbufstore.h.

void WvBufStore::move void *  buf,
size_t  count
[inherited]
 

Definition at line 111 of file wvbufferstore.cc.

References WvBufStore::get(), memops, and WvBufStore::optgettable().

Referenced by WvBufBaseCommonImpl< unsigned >::move().

void * WvBufCursorStore::mutablepeek int  offset,
size_t  count
[virtual]
 

Reimplemented from WvReadOnlyBufferStoreMixin< WvBufStore >.

Definition at line 1295 of file wvbufferstore.cc.

References buf, length, WvBufStore::mutablepeek(), shift, and start.

virtual size_t WvBufStore::numsubbuffers  )  const [inline, protected, virtual, inherited]
 

Returns the number of subbuffers in the buffer.

Reimplemented in WvLinkedBufferStore.

Definition at line 98 of file wvbufstore.h.

virtual size_t WvReadOnlyBufferStoreMixin< WvBufStore >::optallocable  )  const [inline, virtual, inherited]
 

Reimplemented from WvBufStore.

Definition at line 150 of file wvbufstore.h.

size_t WvBufCursorStore::optgettable  )  const [virtual]
 

Reimplemented from WvBufStore.

Definition at line 1208 of file wvbufferstore.cc.

References buf, length, WvBufStore::optpeekable(), shift, and start.

size_t WvBufCursorStore::optpeekable int  offset  )  const [virtual]
 

Reimplemented from WvBufStore.

Definition at line 1267 of file wvbufferstore.cc.

References buf, length, WvBufStore::optpeekable(), peekable(), shift, and start.

const void * WvBufCursorStore::peek int  offset,
size_t  count
[virtual]
 

Reimplemented from WvBufStore.

Definition at line 1279 of file wvbufferstore.cc.

References buf, length, WvBufStore::peek(), shift, and start.

size_t WvBufCursorStore::peekable int  offset  )  const [virtual]
 

Reimplemented from WvBufStore.

Definition at line 1257 of file wvbufferstore.cc.

References length, shift, and start.

Referenced by optpeekable().

void WvBufStore::poke const void *  data,
int  offset,
size_t  count
[inherited]
 

Definition at line 170 of file wvbufferstore.cc.

References memops, WvBufStore::mutablepeek(), WvBufStore::optpeekable(), WvBufStore::put(), and WvBufStore::used().

Referenced by WvBufBaseCommonImpl< unsigned >::poke().

virtual void WvBufStore::prependsubbuffer WvBufStore buffer,
bool  autofree
[inline, protected, virtual, inherited]
 

Prepends a subbuffer to the buffer.

Reimplemented in WvLinkedBufferStore.

Definition at line 113 of file wvbufstore.h.

void WvBufStore::put const void *  data,
size_t  count
[inherited]
 

Definition at line 146 of file wvbufferstore.cc.

References WvBufStore::alloc(), memops, and WvBufStore::optallocable().

Referenced by WvBufStore::poke(), and WvBufBaseCommonImpl< unsigned >::put().

void WvBufCursorStore::skip size_t  count  )  [virtual]
 

Reimplemented from WvBufStore.

Definition at line 1229 of file wvbufferstore.cc.

References length, and shift.

virtual void WvReadOnlyBufferStoreMixin< WvBufStore >::unalloc size_t  count  )  [inline, virtual, inherited]
 

Implements WvBufStore.

Definition at line 160 of file wvbufstore.h.

virtual size_t WvReadOnlyBufferStoreMixin< WvBufStore >::unallocable  )  const [inline, virtual, inherited]
 

Implements WvBufStore.

Definition at line 165 of file wvbufstore.h.

void WvBufCursorStore::unget size_t  count  )  [virtual]
 

Implements WvBufStore.

Definition at line 1237 of file wvbufferstore.cc.

References shift.

size_t WvBufCursorStore::ungettable  )  const [virtual]
 

Implements WvBufStore.

Definition at line 1245 of file wvbufferstore.cc.

References shift.

virtual bool WvBufStore::unlinksubbuffer WvBufStore buffer,
bool  allowautofree
[inline, protected, virtual, inherited]
 

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().

size_t WvBufCursorStore::used  )  const [virtual]
 

Implements WvBufStore.

Definition at line 1202 of file wvbufferstore.cc.

References length, and shift.

virtual bool WvBufStore::usessubbuffers  )  const [inline, protected, virtual, inherited]
 

Returns true if the buffer uses subbuffers for storage.

Reimplemented in WvLinkedBufferStore.

Definition at line 94 of file wvbufstore.h.

Referenced by WvBufStore::merge().

void WvBufCursorStore::zap  )  [virtual]
 

Implements WvBufStore.

Definition at line 1251 of file wvbufferstore.cc.

References length, and shift.


Member Data Documentation

WvBufStore* WvBufCursorStore::buf [protected]
 

Definition at line 513 of file wvbufstore.h.

Referenced by get(), isreadable(), iswritable(), mutablepeek(), optgettable(), optpeekable(), and peek().

int WvBufStore::granularity [protected, inherited]
 

Definition at line 31 of file wvbufstore.h.

size_t WvBufCursorStore::length [protected]
 

Definition at line 515 of file wvbufstore.h.

Referenced by get(), mutablepeek(), optgettable(), optpeekable(), peek(), peekable(), skip(), used(), and zap().

size_t WvBufCursorStore::shift [protected]
 

Definition at line 516 of file wvbufstore.h.

Referenced by get(), mutablepeek(), optgettable(), optpeekable(), peek(), peekable(), skip(), unget(), ungettable(), used(), and zap().

int WvBufCursorStore::start [protected]
 

Definition at line 514 of file wvbufstore.h.

Referenced by get(), mutablepeek(), optgettable(), optpeekable(), peek(), and peekable().


The documentation for this class was generated from the following files:
Generated on Sat Feb 21 21:06:00 2004 for WvStreams by doxygen 1.3.5