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

strmod::strmod::ApplyVisitor_Base Class Reference

A base class for the ApplyVisitor template that factors out the common code so there aren't tons of duplicates all over creation. More...

#include <StrMod/ApplyVisitor.h>

Inheritance diagram for strmod::strmod::ApplyVisitor_Base:

Inheritance graph
[legend]
List of all members.

Public Methods

 ApplyVisitor_Base (const StrChunkPtr &chunk)
 This constructor will set up apply to visit the given chunk.

 ApplyVisitor_Base (const StrChunkPtr &chunk, LinearExtent &extent)
 This constructor will set up apply to visit the section of the given chunk described by extent.

virtual ~ApplyVisitor_Base ()
 Whee, its a destructor, and since this class has no state that won't destruct itself, it doesn't do much.

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

void apply ()
 Visits every data block according to the parameters given in the constructor.


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.

virtual void use_visitStrChunk (const StrChunkPtr &chunk, const LinearExtent &used) throw (halt_visitation)
 This is the Template Method function to visit a StrChunk. Called by the UseTracking machinery.

virtual void use_visitDataBlock (const void *start, size_t len, const void *realstart, size_t reallen)=0 throw (halt_visitation)
 This is the Template Method function to visit an actual chunk of data. Called by the UseTracking machinery.


Detailed Description

A base class for the ApplyVisitor template that factors out the common code so there aren't tons of duplicates all over creation.

This defines functions that don't vary at all no matter what type you give to ApplyVisitor. This will result in less redundant code being duplicated for instances of ApplyVisitor<T> with different T.

Definition at line 46 of file ApplyVisitor.h.


Constructor & Destructor Documentation

strmod::strmod::ApplyVisitor_Base::ApplyVisitor_Base const StrChunkPtr   chunk
 

This constructor will set up apply to visit the given chunk.

Parameters:
chunk The chunk to go through.

Definition at line 35 of file ApplyVisitor.cxx.

strmod::strmod::ApplyVisitor_Base::ApplyVisitor_Base const StrChunkPtr   chunk,
LinearExtent   extent
 

This constructor will set up apply to visit the section of the given chunk described by extent.

Parameters:
chunk The chunk to go through.
extent Which part of the chunk to go through.

Definition at line 40 of file ApplyVisitor.cxx.


Member Function Documentation

virtual int strmod::strmod::ApplyVisitor_Base::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::UseTrackingVisitor.

Definition at line 67 of file ApplyVisitor.h.

virtual const lcore::ClassIdent* strmod::strmod::ApplyVisitor_Base::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::UseTrackingVisitor.

Definition at line 77 of file ApplyVisitor.h.

virtual void strmod::strmod::ApplyVisitor_Base::use_visitDataBlock const void *    start,
size_t    len,
const void *    realstart,
size_t    reallen
throw (halt_visitation) [protected, pure virtual]
 

This is the Template Method function to visit an actual chunk of data. Called by the UseTracking machinery.

Parameters:
start Start of the portion of the data area that's used.
len Length of the used part of the data area.
realstart Start of the actual data area, including the unused portions.
reallen Length of the actual data area, including the unsused portions.

Implements strmod::strmod::UseTrackingVisitor.

Implemented in strmod::strmod::ApplyVisitor< _Function >.

virtual void strmod::strmod::ApplyVisitor_Base::use_visitStrChunk const StrChunkPtr   chunk,
const LinearExtent   used
throw (halt_visitation) [inline, protected, virtual]
 

This is the Template Method function to visit a StrChunk. Called by the UseTracking machinery.

Parameters:
chunk The chunk being visited.
extent Which extent of the chunk is used.

Implements strmod::strmod::UseTrackingVisitor.

Definition at line 79 of file ApplyVisitor.h.


Member Data Documentation

const STR_ClassIdent strmod::strmod::ApplyVisitor_Base::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::UseTrackingVisitor.


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