ThreadedSmacqModule Class Reference

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

#include <ThreadedSmacqModule.h>

Inheritance diagram for ThreadedSmacqModule:

Inheritance graph
[legend]
Collaboration diagram for ThreadedSmacqModule:

Collaboration graph
[legend]

List of all members.

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 *)

Static Public Member Functions

static void run_thread (int args, ThreadedSmacqModule *ths)

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)


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().


Member Function Documentation

smacq_result ThreadedSmacqModule::consume ( DtsObject  datum,
int &  outchan 
) [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  datum,
int &  outchan 
) [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 Tue Oct 6 14:36:16 2009 for SMACQ by  doxygen 1.5.8