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

SmacqModule Class Reference

#include <SmacqModule-interface.h>

Inheritance diagram for SmacqModule:

Inheritance graph
[legend]
Collaboration diagram for SmacqModule:

Collaboration graph
[legend]
List of all members.

Detailed Description

A virtual base class for SMACQ modules.

This document describes the programming interface used by authors of dataflow modules. These modules are dynamically loaded and may be instantiated multiple times. Global and static variables are therefore deprecated for most cases.


Public Types

typedef SmacqModuleconstructor_fn (struct smacq_init *)
 SMACQ modules are object files that can be statically or dynamically loaded into a program. Each module should use the SMACQ_MODULE() macro to make sure that the module defines a constructor function that instantiates the class.


Public Member Functions

 SmacqModule (struct smacq_init *context)
 Most subclasses will define their own constructor which will initialize the instance based on the given context.

virtual ~SmacqModule ()
 A subclass can have its own destructor.

virtual smacq_result consume (DtsObject datum, int &outchan)
 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.

virtual smacq_result produce (DtsObject &datump, int &outchan)
 The produce() method is called when SMACQ expects an object to produce new data.

virtual bool usesOtherFields (DtsField f)
 This method is called by the join optimizer.


Protected Member Functions

void comp_uses (dts_comparison *c)
dts_comparison * parse_tests (int argc, char **argv)
 Return a newly constructed dts_comparison datastructure from the given arguments.

virtual DtsField usesfield (char *name)
 This method wraps DTS::usesfield() but keeps track of what this module uses.

void enqueue (DtsObject &, int outchan=0)
 Enqueue an object for output to the specified output channel.


Protected Attributes

UsesArray usesFields
DTSdts
 Each module instance runs in the context of a DTS instance.

SmacqSchedulerscheduler
 Each module instance is run by a scheduler.

SmacqGraphself
 A pointer to ourself in the current dataflow graph.


The documentation for this class was generated from the following files:
Generated on Thu May 4 10:32:19 2006 for SMACQ by doxygen 1.3.5