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

strmod::strmod::StaticBuffer Class Reference

This class is for pointing at a bunch of data already in memory that will not change or move for the lifetime of the StaticBuffer. More...

#include <StrMod/StaticBuffer.h>

Inheritance diagram for strmod::strmod::StaticBuffer:

Inheritance graph
[legend]
List of all members.

Public Methods

 StaticBuffer (const void *buf, size_t buflen)
 Construct a StaticBuffer pointing at the given buffer area.

virtual ~StaticBuffer ()
 Doesn't do a thing because it doesn't own the storage it's pointing at.

virtual int AreYouA (const lcore::ClassIdent &cid) const
 Asks if a class is of a particular type, or publicly derived from that type.

virtual unsigned int Length () const
 Number of octets this chunk takes up. May be deprecated.

const void * getVoidP ()
 Get a void pointer to the memory pointed at by this chunk.

const U1Byte * getCharP ()
 Get a possibly more convenient character pointer instead.


Static Public Attributes

const STR_ClassIdent identifier
 A unique identifier for this class.


Protected Methods

virtual const lcore::ClassIdent * i_GetIdent () const
 See class Protocol.

virtual void acceptVisitor (ChunkVisitor &visitor) throw (ChunkVisitor::halt_visitation)
 Accept a ChunkVisitor, and maybe lead it through your children.


Detailed Description

This class is for pointing at a bunch of data already in memory that will not change or move for the lifetime of the StaticBuffer.

Oftentimes, these will be things like string constants and such.

Definition at line 41 of file StaticBuffer.h.


Constructor & Destructor Documentation

strmod::strmod::StaticBuffer::StaticBuffer const void *    buf,
size_t    buflen
[inline]
 

Construct a StaticBuffer pointing at the given buffer area.

Parameters:
buf The area to point at.
buflen The size of the area to point at.

Definition at line 84 of file StaticBuffer.h.


Member Function Documentation

virtual int strmod::strmod::StaticBuffer::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::StrChunk.

Definition at line 60 of file StaticBuffer.h.


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