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

strmod::strmod::DynamicBuffer Class Reference

A completely dyamically allocated bag of bytes. More...

#include <StrMod/DynamicBuffer.h>

Inheritance diagram for strmod::strmod::DynamicBuffer:

Inheritance graph
[legend]
List of all members.

Public Methods

 DynamicBuffer (unsigned int len) throw (std::bad_alloc)
 DynamicBuffer (const void *data, unsigned int len) throw (std::bad_alloc)
virtual int AreYouA (const lcore::ClassIdent &cid) const
 Asks if a class is of a particular type, or publicly derived from that type.

virtual void resize (unsigned int newsize) throw (std::bad_alloc)
 Change the size of the chunk to newsize.


Static Public Attributes

const STR_ClassIdent identifier
 Globally unique identifier for this class.


Protected Methods

virtual const lcore::ClassIdent * i_GetIdent () const
 Returns the class identifier for the class the object actually is.


Detailed Description

A completely dyamically allocated bag of bytes.

Definition at line 38 of file DynamicBuffer.h.


Member Function Documentation

int strmod::strmod::DynamicBuffer::AreYouA const lcore::ClassIdent &    cid const [inline, virtual]
 

Asks if a class is of a particular type, or publicly derived from that type.

Overriden in every derived class (with a static identifier member) to compare against the identifier, then call the AreYouA methods of all the superclasses.

Parameters:
cid Usually <class>::identifier for the class you want to ask if the object is an instance of.

Reimplemented from strmod::strmod::BufferChunk.

Definition at line 58 of file DynamicBuffer.h.

virtual const lcore::ClassIdent* strmod::strmod::DynamicBuffer::i_GetIdent   const [inline, protected, virtual]
 

Returns the class identifier for the class the object actually is.

Should always be overridden in any class that has a static identifier member.

Reimplemented from strmod::strmod::BufferChunk.

Definition at line 53 of file DynamicBuffer.h.

void strmod::strmod::DynamicBuffer::resize unsigned int    newsize throw (std::bad_alloc) [virtual]
 

Change the size of the chunk to newsize.

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

Implements strmod::strmod::BufferChunk.

Definition at line 60 of file DynamicBuffer.cxx.


Member Data Documentation

const STR_ClassIdent strmod::strmod::DynamicBuffer::identifier [static]
 

Globally unique identifier for this class.

Every class that might need to be identified should have a public static const identifier object in it.

Reimplemented from strmod::strmod::BufferChunk.


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