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

strmod::strmod::ApplyVisitor< _Function > Class Template Reference

A template class that applies a functor (can be a function pointer) to each chunk of bytes in a StrChunk containment hierarchy. More...

#include <StrMod/ApplyVisitor.h>

Inheritance diagram for strmod::strmod::ApplyVisitor< _Function >:

Inheritance graph
[legend]
List of all members.

Public Methods

 ApplyVisitor (const StrChunkPtr &chunk, _Function &func)
 Does what ApplyVisitor_Base::ApplyVisitor_Base(const StrChunkPtr &) does.

 ApplyVisitor (const StrChunkPtr &chunk, const LinearExtent &extent, _Function &func)
 Does what ApplyVisitor_Base::ApplyVisitor_Base(const StrChunkPtr &, LinearExtent &) does.

virtual ~ApplyVisitor ()
 Whee, its a destructor, and since this class has no state it 'owns', it doesn't do much.


Protected Methods

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


Detailed Description

template<class _Function>
class strmod::strmod::ApplyVisitor< _Function >

A template class that applies a functor (can be a function pointer) to each chunk of bytes in a StrChunk containment hierarchy.

The functor must accept this signature any functor(const void *, size_t).

Definition at line 105 of file ApplyVisitor.h.


Constructor & Destructor Documentation

template<class _Function>
strmod::strmod::ApplyVisitor< _Function >::ApplyVisitor const StrChunkPtr   chunk,
_Function &    func
[inline]
 

Does what ApplyVisitor_Base::ApplyVisitor_Base(const StrChunkPtr &) does.

Parameters:
chunk The chunk to go through.
func The functor to run on every data extent.

Definition at line 142 of file ApplyVisitor.h.

template<class _Function>
strmod::strmod::ApplyVisitor< _Function >::ApplyVisitor const StrChunkPtr   chunk,
const LinearExtent   extent,
_Function &    func
[inline]
 

Does what ApplyVisitor_Base::ApplyVisitor_Base(const StrChunkPtr &, LinearExtent &) does.

Parameters:
chunk The chunk to go through.
extent The portion of the chunk to go through.
func The functor to run on every data extent.

Definition at line 148 of file ApplyVisitor.h.


Member Function Documentation

template<class _Function>
void strmod::strmod::ApplyVisitor< _Function >::use_visitDataBlock const void *    start,
size_t    len,
const void *    realstart,
size_t    reallen
throw (halt_visitation) [inline, protected, 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::ApplyVisitor_Base.

Definition at line 161 of file ApplyVisitor.h.


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