Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Class Members

ThreadedSmacqModule Class Reference

#include <AsyncSmacqModule.h>

Inheritance diagram for ThreadedSmacqModule:

Inheritance graph
[legend]
Collaboration diagram for ThreadedSmacqModule:

Collaboration graph
[legend]
List of all members.

Detailed Description

A virtual base clase for SMACQ modules that are executed with in their own "thread" instead of being event-driven.

This is typically easier to program, but less efficient than a regular SmacqModule. The only method that should be implemented by a subclass of ThreadedSmacqModule is thread().


Public Member Functions

smacq_result produce (DtsObject, int &)
smacq_result consume (DtsObject, int &)
 The consume() method is called when there is new data for a module to process.

 ThreadedSmacqModule (smacq_init *)
smacq_result produce (DtsObject, int &)
smacq_result consume (DtsObject, int &)
 The consume() method is called when there is new data for a module to process.

 ThreadedSmacqModule (smacq_init *)

Protected Member Functions

virtual smacq_result thread (smacq_init *context)=0
 This is the only method that subclasses should (and must) implement.

virtual smacq_result thread (smacq_init *context)=0
 This is the only method that subclasses should (and must) implement.

Methods used by the thread() implementation
DtsObject smacq_read ()
 Read a new data object to process.

int smacq_flush ()
void smacq_decision (DtsObject datum, smacq_result result)
 Register a decision regarding an input object.

void smacq_write (DtsObject datum, int outchan)
 Produce a new object.

Methods used by the thread() implementation
DtsObject smacq_read ()
 Read a new data object to process.

int smacq_flush ()
void smacq_decision (DtsObject datum, smacq_result result)
 Register a decision regarding an input object.

void smacq_write (DtsObject datum, int outchan)
 Produce a new object.


Friends

void run_thread (int args, ThreadedSmacqModule *ths)
void run_thread (int args, ThreadedSmacqModule *ths)


Member Function Documentation

smacq_result ThreadedSmacqModule::consume DtsObject  ,
int & 
[virtual]
 

The consume() method is called when there is new data for a module to process.

It is passed a pointer to a data object and a reference to an output channel descriptor. The return code should be SMACQ_PASS if the object is not filtered out and SMACQ_FREE if it is. In addition, the return code can be OR'd with the following flags: SMACQ_ERROR specifies that there was a fatel error in the module. SMACQ_END signifies that the module wishes to never be called again.

Reimplemented from SmacqModule.

smacq_result ThreadedSmacqModule::consume DtsObject  ,
int & 
[virtual]
 

The consume() method is called when there is new data for a module to process.

It is passed a pointer to a data object and a reference to an output channel descriptor. The return code should be SMACQ_PASS if the object is not filtered out and SMACQ_FREE if it is. In addition, the return code can be OR'd with the following flags: SMACQ_ERROR specifies that there was a fatel error in the module. SMACQ_END signifies that the module wishes to never be called again.

Reimplemented from SmacqModule.

virtual smacq_result ThreadedSmacqModule::thread smacq_init *  context  )  [protected, pure virtual]
 

This is the only method that subclasses should (and must) implement.

It performs all of the work of the module and uses the following methods to produce and consume data. This function should not return until the module is completely finished. Return SMACQ_END or SMACQ_ERROR.

virtual smacq_result ThreadedSmacqModule::thread smacq_init *  context  )  [protected, pure virtual]
 

This is the only method that subclasses should (and must) implement.

It performs all of the work of the module and uses the following methods to produce and consume data. This function should not return until the module is completely finished. Return SMACQ_END or SMACQ_ERROR.


The documentation for this class was generated from the following files:
Generated on Mon Aug 28 23:37:16 2006 for SMACQ by doxygen 1.3.5