Apama  10.15.3.4
com::apama::epl::EPLPlugin< DERIVED > Class Template Reference

Derive from this class to define a Correlator EPL plug-in. More...

#include <epl_plugin.hpp>

Public Types

typedef EPLPlugin base_plugin_t
 Convenience typedef for the base type. More...
 
typedef MethodData< DERIVED > method_data_t
 Convenience typedef for the method data type. More...
 

Public Member Functions

 EPLPlugin (const std::string &name)
 Construct an EPL plug-in with a name (for logging) More...
 

Static Public Member Functions

static CorrelatorInterfacegetCorrelator ()
 Return a reference to the correlator host interface. More...
 

Public Attributes

Logger logger
 A Logger object which can be used to log to the correlator log file. More...
 

Detailed Description

template<typename DERIVED>
class com::apama::epl::EPLPlugin< DERIVED >

Derive from this class to define a Correlator EPL plug-in.

When you inherit from EPLPlugin you must template it over the derived class. Eg:

class MyPlugin: public EPLPlugin<MyPlugin> { ... };

Your class must implement zero-args constructor

Your class must provide a static initialization method of this form:

static void initialize(base_plugin_t::method_data_t &md)

This method must export each of the methods which are to be visible to EPL using the MethodData<DERIVED>::registerMethod() function on method_data_t. Eg:

md.registerMethod<decltype(&MyPlugin::method), &MyPlugin::method>("eplMethodName");

This class provides the following members to its derived classes:

  • logger: a Logger object which can be used to log to the system log file.
  • static getCorrelator(): a method which returns a CorrelatorInterface object which you can use to make callbacks into the correlator

To export a class for use in the correlator you must use the following macro:

APAMA_DECLARE_EPL_PLUGIN(Class)

Member Typedef Documentation

◆ base_plugin_t

template<typename DERIVED >
typedef EPLPlugin com::apama::epl::EPLPlugin< DERIVED >::base_plugin_t

Convenience typedef for the base type.

◆ method_data_t

template<typename DERIVED >
typedef MethodData<DERIVED> com::apama::epl::EPLPlugin< DERIVED >::method_data_t

Convenience typedef for the method data type.

Constructor & Destructor Documentation

◆ EPLPlugin()

template<typename DERIVED >
com::apama::epl::EPLPlugin< DERIVED >::EPLPlugin ( const std::string &  name)
inline

Construct an EPL plug-in with a name (for logging)

Parameters
nameThe name of the plug-in

Member Function Documentation

◆ getCorrelator()

template<typename DERIVED >
static CorrelatorInterface& com::apama::epl::EPLPlugin< DERIVED >::getCorrelator ( )
inlinestatic

Return a reference to the correlator host interface.

Member Data Documentation

◆ logger

template<typename DERIVED >
Logger com::apama::epl::EPLPlugin< DERIVED >::logger

A Logger object which can be used to log to the correlator log file.

All log lines include the plug-in name specified in the EPLPlugin constructor.


The documentation for this class was generated from the following file: