Filter Classes

This section describes information that is specific to the C++ API. See User-Defined Filter for general information about implementing the UDFilter and FilterFactory classes.

UDFilter API

The API provides the following methods for extension by subclasses:

virtual void setup(ServerInterface & srvInterface);
				
virtual StreamState process(ServerInterface & srvInterface, DataBuffer &input, 
				InputState input_state, DataBuffer &output)=0;
				
virtual void cancel(ServerInterface &srvInterface);
				
virtual void destroy(ServerInterface &srvInterface);

ContinuousUDFilter API

The ContinuousUDFilter class extends UDFilter and adds the following methods for extension by subclasses:

virtual void initialize(ServerInterface &srvInterface);
 
virtual void run();
 
virtual void deinitialize(ServerInterface &srvInterface);

FilterFactory API

The API provides the following methods for extension by subclasses:

virtual void plan(ServerInterface &srvInterface, PlanContext &planCtxt);
				
virtual UDFilter * prepare(ServerInterface &srvInterface, PlanContext &planCtxt)=0;
				
virtual void getParameterType(ServerInterface &srvInterface, SizedColumnTypes &parameterTypes);		

After creating your FilterFactory, you must register it with the RegisterFactory macro.