Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

strmod::strmod::PreAllocBuffer< TInitialAlloc > Class Template Reference

A template class for buffers that contain a certain fixed amount of storage that's not dynamically allocated. More...

#include <StrMod/PreAllocBuffer.h>

Inheritance diagram for strmod::strmod::PreAllocBuffer< TInitialAlloc >:

Inheritance graph
[legend]
List of all members.

Public Methods

virtual bool invariant () const
 This should ALWAYS return true. It says whether the class invariant holds or not.

virtual void printState (std::ostream &os) const
virtual void resize (unsigned int newsize) throw (std::bad_alloc)
 Change the size of the chunk to newsize.


Detailed Description

template<unsigned int TInitialAlloc>
class strmod::strmod::PreAllocBuffer< TInitialAlloc >

A template class for buffers that contain a certain fixed amount of storage that's not dynamically allocated.

Definition at line 83 of file PreAllocBuffer.h.


Member Function Documentation

template<unsigned int TInitialAlloc>
bool strmod::strmod::PreAllocBuffer< TInitialAlloc >::invariant   const [inline, virtual]
 

This should ALWAYS return true. It says whether the class invariant holds or not.

Your class invariant should be as strict as possible. The class invariant is used to detect when the class goes into a bad state, so all possible bad states should be caught by the invariant.

Implements strmod::strmod::PreAllocBufferBase.

Definition at line 124 of file PreAllocBuffer.h.

template<unsigned int TInitialAlloc>
void strmod::strmod::PreAllocBuffer< TInitialAlloc >::resize unsigned int    newsize throw (std::bad_alloc) [inline, virtual]
 

Change the size of the chunk to newsize.

Throws bad_alloc if the allocation fails, just like operator new.

Implements strmod::strmod::PreAllocBufferBase.

Definition at line 137 of file PreAllocBuffer.h.


The documentation for this class was generated from the following file:
Generated on Wed Jan 29 00:32:54 2003 for libNet by doxygen1.3-rc1