WvStreams
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
WvConstInPlaceBufStore Class Reference

The WvConstInPlaceBuf storage class. More...

#include <wvbufstore.h>

Inheritance diagram for WvConstInPlaceBufStore:
Inheritance graph
[legend]

Public Member Functions

 WvConstInPlaceBufStore (int _granularity, const void *_data, size_t _avail)
 
const void * ptr () const
 
void reset (const void *_data, size_t _avail)
 
void setavail (size_t _avail)
 
virtual size_t used () const
 
virtual const void * get (size_t count)
 
virtual void unget (size_t count)
 
virtual size_t ungettable () const
 
virtual const void * peek (int offset, size_t count)
 
virtual void zap ()
 
virtual bool iswritable () const
 
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 void merge (WvBufStore &instore, size_t count)
 
virtual bool isreadable () const
 
virtual size_t optgettable () const
 
virtual void skip (size_t count)
 
virtual size_t peekable (int offset) const
 
virtual size_t optpeekable (int offset) const
 
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

const void * data
 
size_t avail
 
size_t readidx
 
int granularity
 

Detailed Description

The WvConstInPlaceBuf storage class.

Definition at line 292 of file wvbufstore.h.

Constructor & Destructor Documentation

◆ WvConstInPlaceBufStore()

WvConstInPlaceBufStore::WvConstInPlaceBufStore ( int  _granularity,
const void *  _data,
size_t  _avail 
)

Definition at line 411 of file wvbufferstore.cc.

Member Function Documentation

◆ ptr()

const void * WvConstInPlaceBufStore::ptr ( ) const
inline

Definition at line 303 of file wvbufstore.h.

◆ reset()

void WvConstInPlaceBufStore::reset ( const void *  _data,
size_t  _avail 
)

Definition at line 419 of file wvbufferstore.cc.

◆ setavail()

void WvConstInPlaceBufStore::setavail ( size_t  _avail)

Definition at line 433 of file wvbufferstore.cc.

◆ used()

size_t WvConstInPlaceBufStore::used ( ) const
virtual

Implements WvBufStore.

Definition at line 427 of file wvbufferstore.cc.

◆ get()

const void * WvConstInPlaceBufStore::get ( size_t  count)
virtual

Implements WvBufStore.

Definition at line 440 of file wvbufferstore.cc.

◆ unget()

void WvConstInPlaceBufStore::unget ( size_t  count)
virtual

Implements WvBufStore.

Definition at line 450 of file wvbufferstore.cc.

◆ ungettable()

size_t WvConstInPlaceBufStore::ungettable ( ) const
virtual

Implements WvBufStore.

Definition at line 458 of file wvbufferstore.cc.

◆ peek()

const void * WvConstInPlaceBufStore::peek ( int  offset,
size_t  count 
)
virtual

Reimplemented from WvBufStore.

Definition at line 464 of file wvbufferstore.cc.

◆ zap()

void WvConstInPlaceBufStore::zap ( )
virtual

Implements WvBufStore.

Definition at line 476 of file wvbufferstore.cc.

◆ iswritable()

virtual bool WvReadOnlyBufferStoreMixin< WvBufStore >::iswritable ( ) const
inlinevirtualinherited

Reimplemented from WvBufStore.

Definition at line 144 of file wvbufstore.h.

◆ free()

virtual size_t WvReadOnlyBufferStoreMixin< WvBufStore >::free ( ) const
inlinevirtualinherited

Implements WvBufStore.

Definition at line 148 of file wvbufstore.h.

◆ optallocable()

virtual size_t WvReadOnlyBufferStoreMixin< WvBufStore >::optallocable ( ) const
inlinevirtualinherited

Reimplemented from WvBufStore.

Definition at line 152 of file wvbufstore.h.

◆ alloc()

virtual void * WvReadOnlyBufferStoreMixin< WvBufStore >::alloc ( size_t  count)
inlinevirtualinherited

Implements WvBufStore.

Definition at line 156 of file wvbufstore.h.

◆ unalloc()

virtual void WvReadOnlyBufferStoreMixin< WvBufStore >::unalloc ( size_t  count)
inlinevirtualinherited

Implements WvBufStore.

Definition at line 162 of file wvbufstore.h.

◆ unallocable()

virtual size_t WvReadOnlyBufferStoreMixin< WvBufStore >::unallocable ( ) const
inlinevirtualinherited

Implements WvBufStore.

Definition at line 167 of file wvbufstore.h.

◆ mutablepeek()

virtual void * WvReadOnlyBufferStoreMixin< WvBufStore >::mutablepeek ( int  offset,
size_t  count 
)
inlinevirtualinherited

Implements WvBufStore.

Definition at line 171 of file wvbufstore.h.

◆ merge()

virtual void WvReadOnlyBufferStoreMixin< WvBufStore >::merge ( WvBufStore instore,
size_t  count 
)
inlinevirtualinherited

Reimplemented from WvBufStore.

Definition at line 177 of file wvbufstore.h.

◆ isreadable()

virtual bool WvBufStore::isreadable ( ) const
inlinevirtualinherited

Definition at line 47 of file wvbufstore.h.

◆ optgettable()

virtual size_t WvBufStore::optgettable ( ) const
inlinevirtualinherited

Definition at line 50 of file wvbufstore.h.

◆ skip()

virtual void WvBufStore::skip ( size_t  count)
inlinevirtualinherited

Definition at line 53 of file wvbufstore.h.

◆ peekable()

size_t WvBufStore::peekable ( int  offset) const
virtualinherited

Definition at line 90 of file wvbufferstore.cc.

◆ optpeekable()

virtual size_t WvBufStore::optpeekable ( int  offset) const
inlinevirtualinherited

Definition at line 58 of file wvbufstore.h.

◆ move()

void WvBufStore::move ( void *  buf,
size_t  count 
)
inherited

Definition at line 111 of file wvbufferstore.cc.

◆ copy()

void WvBufStore::copy ( void *  buf,
int  offset,
size_t  count 
)
inherited

Definition at line 128 of file wvbufferstore.cc.

◆ put()

void WvBufStore::put ( const void *  data,
size_t  count 
)
inherited

Definition at line 146 of file wvbufferstore.cc.

◆ fastput()

void WvBufStore::fastput ( const void *  data,
size_t  count 
)
inherited

Definition at line 163 of file wvbufferstore.cc.

◆ poke()

void WvBufStore::poke ( const void *  data,
int  offset,
size_t  count 
)
inherited

Definition at line 170 of file wvbufferstore.cc.

◆ basicmerge()

void WvBufStore::basicmerge ( WvBufStore instore,
size_t  count 
)
inherited

Definition at line 229 of file wvbufferstore.cc.

◆ usessubbuffers()

virtual bool WvBufStore::usessubbuffers ( ) const
inlineprotectedvirtualinherited

Returns true if the buffer uses subbuffers for storage.

Reimplemented in WvLinkedBufferStore.

Definition at line 96 of file wvbufstore.h.

◆ numsubbuffers()

virtual size_t WvBufStore::numsubbuffers ( ) const
inlineprotectedvirtualinherited

Returns the number of subbuffers in the buffer.

Reimplemented in WvLinkedBufferStore.

Definition at line 100 of file wvbufstore.h.

◆ firstsubbuffer()

virtual WvBufStore * WvBufStore::firstsubbuffer ( ) const
inlineprotectedvirtualinherited

Returns the first subbuffer.

Returns: the buffer or NULL if none or not supported

Reimplemented in WvLinkedBufferStore.

Definition at line 107 of file wvbufstore.h.

◆ appendsubbuffer()

virtual void WvBufStore::appendsubbuffer ( WvBufStore buffer,
bool  autofree 
)
inlineprotectedvirtualinherited

Appends a subbuffer to the buffer.

Reimplemented in WvLinkedBufferStore.

Definition at line 111 of file wvbufstore.h.

◆ prependsubbuffer()

virtual void WvBufStore::prependsubbuffer ( WvBufStore buffer,
bool  autofree 
)
inlineprotectedvirtualinherited

Prepends a subbuffer to the buffer.

Reimplemented in WvLinkedBufferStore.

Definition at line 115 of file wvbufstore.h.

◆ unlinksubbuffer()

virtual bool WvBufStore::unlinksubbuffer ( WvBufStore buffer,
bool  allowautofree 
)
inlineprotectedvirtualinherited

Unlinks the specified subbuffer.

Only autofrees the buffer if allowautofree == true. Returns: the autofree flag for the buffer

Reimplemented in WvLinkedBufferStore.

Definition at line 123 of file wvbufstore.h.

Member Data Documentation

◆ data

const void* WvConstInPlaceBufStore::data
protected

Definition at line 296 of file wvbufstore.h.

◆ avail

size_t WvConstInPlaceBufStore::avail
protected

Definition at line 297 of file wvbufstore.h.

◆ readidx

size_t WvConstInPlaceBufStore::readidx
protected

Definition at line 298 of file wvbufstore.h.

◆ granularity

int WvBufStore::granularity
protectedinherited

Definition at line 33 of file wvbufstore.h.


The documentation for this class was generated from the following files: