|The algebra element is optional and is used only by the dataflow optimizer. More...|
|This context structure is passed to SmacqModule constructors. More...|
Public Member Functions
|typedef SmacqModule *||constructor_fn (struct smacq_init *)|
|SMACQ modules are object files that can be statically or dynamically loaded into a program. |
|SmacqModule (struct smacq_init *context)|
|Most subclasses will define their own constructor which will initialize the instance based on the given context. |
|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. |
|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 (std::string)|
|Return a newly constructed dts_comparison datastructure from the given arguments. |
|virtual DtsField||usesfield (const 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. |
|Each module instance runs in the context of a DTS instance. |
|Each module instance is run by a scheduler. |
|A pointer to ourself in the current dataflow graph. |
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.
|SmacqModule::SmacqModule||(||struct smacq_init *||context||)||
Most subclasses will define their own constructor which will initialize the instance based on the given context.
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.
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.
|smacq_result SmacqModule::produce||(||DtsObject &||datump,|
The produce() method is called when SMACQ expects an object to produce new data.
|DtsField SmacqModule::usesfield||(||const char *||name||)||
This method wraps DTS::usesfield() but keeps track of what this module uses.