Apama  10.3.1.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
com::apama::epl::MethodData< DERIVED > Class Template Reference

Data structure used for declaring methods in the initialize function (EPLPlugin) to be exported to EPL. More...

#include <epl_plugin.hpp>

Public Member Functions

size_t getNumMethods ()
 Return the number of declared methods. More...
 
template<typename FN_T , FN_T fn>
void registerMethod (const char *name, bool blocking=true)
 Declare a method using the default signature. More...
 
template<typename FN_T , FN_T fn>
void registerMethod (const char *name, const char *signature, bool blocking=true)
 Declare a method using a custom signature. More...
 

Detailed Description

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

Data structure used for declaring methods in the initialize function (EPLPlugin) to be exported to EPL.

Member Function Documentation

template<typename DERIVED >
size_t com::apama::epl::MethodData< DERIVED >::getNumMethods ( )
inline

Return the number of declared methods.

template<typename DERIVED >
template<typename FN_T , FN_T fn>
void com::apama::epl::MethodData< DERIVED >::registerMethod ( const char *  name,
bool  blocking = true 
)

Declare a method using the default signature.

Use this method if your arguments and return values are only:

  • int64_t
  • double
  • const char *
  • bool
  • decimal_t
  • custom_t<T>
Parameters
nameThe name of the function to expose in EPL. This must be unique for a plug-in - there is no method overloading.
blockingTrue if the function may block. False if it will never block. Default is true. May be overridden later with CorrelatorInterface::pluginMethodBlocking(). WARNING: blocking when declared as non-blocking can cause the correlator to deadlock
template<typename DERIVED >
template<typename FN_T , FN_T fn>
void com::apama::epl::MethodData< DERIVED >::registerMethod ( const char *  name,
const char *  signature,
bool  blocking = true 
)

Declare a method using a custom signature.

Use this method if your arguments or return values contain:

  • list_t
  • map_t (either as an event type or a dictionary type)
  • int64_t (for passing context objects)
Parameters
nameThe name of the function to expose in EPL. This must be unique for a plug-in - there is no method overloading.
signatureThe epl function type (in action variable signature form) of this function.

An example signature would be:

action<integer, sequence<float> > returns boolean
Parameters
blockingTrue if the function may block. False if it will never block. Default is true. May be overridden later with CorrelatorInterface::pluginMethodBlocking(). WARNING: blocking when declared as non-blocking can cause the correlator to deadlock

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