Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

AxPipe::CNoThread Class Reference

Dummy non-threaded base-class for all CSource, CSink and CPipe derived classes. More...

#include <CThread.h>

Inheritance diagram for AxPipe::CNoThread:

Inheritance graph
List of all members.

Public Member Functions

void WaitForIdle ()
 Wait for the Work() thread to finish if it's processing.

virtual void * RTClassId ()
 Run-Time version of our type identification.

Static Public Member Functions

void * ClassId ()
 Run-time type identifcation.

Protected Member Functions

virtual void WorkStart ()
 Initalize one Work-cycle, processing one CSeg.

virtual void WorkSignal ()
 Start Work() on one CSeg.

virtual void WorkEnd ()
 End one Work-cycle.

virtual void WorkWait ()
 Wait for a new CSeg to arrive to work on.

virtual void WorkExitWait ()
 Wait for the Work()-thread, if any, to terminate.

virtual void Work ()=0
 Actually process one CSeg.

Protected Attributes

bool m_fExit
 Set to true when the derived object is to exit.

bool m_fAutoDeleteSink
 Set to true if the derived object's sink is to self-destruct with the pipe-line.

Detailed Description

Dummy non-threaded base-class for all CSource, CSink and CPipe derived classes.

See also:




Mostly placeholders in the case we later derive from CThread, in which case the virtuals here get overridden with real thread-handling and synchronizating functionality. Some basic code that is common is defined here.

Definition at line 52 of file CThread.h.

Member Function Documentation

void* AxPipe::CNoThread::ClassId  )  [inline, static]

Run-time type identifcation.

We're not using the built in RTTI because we sometimes want to be able to forego most of the run time library, as well as exceptions and RTTI.

The point here is to create a guaranteed unique value that is the same for all instances of a class, while not requiring any inits outside of the class declaration, and also to 'fool' optimizing compilers, so that they cannot perform global optimization and figure out that it can fold identical functions into one. It happened in a previous version... That's why we include the static int, it can't be optimized away, at least not easily. You need to override ClassId() and RTClassId() in all derived clases you want to distinguish, this is most easily done by simply copying and pasting exactly these definitions. There is also the Run-Time version, accessible through a pointer to a polymorphic base-class for example, RTClassId().

Definition at line 105 of file CThread.h.

virtual void* AxPipe::CNoThread::RTClassId  )  [inline, virtual]

Run-Time version of our type identification.

See also:

Definition at line 112 of file CThread.h.

void AxPipe::CNoThread::WaitForIdle  )  [inline]

Wait for the Work() thread to finish if it's processing.

Defined here, but only has function in threaded version. Start and End one Work cycle, thereby ensuring that the previous one has finished.

Definition at line 84 of file CThread.h.

Referenced by AxPipe::CPipe::DestructSink(), AxPipe::CPipe::Signal(), AxPipe::CSplit::Sync(), AxPipe::CSink::Sync(), and AxPipe::CPipe::Sync().

The documentation for this class was generated from the following file:
Generated on Mon Feb 2 13:19:27 2004 for AxPipe by doxygen 1.3.5