Apama  10.7.2.2
correlator_plugin.hpp File Reference
#include <ApamaTypes.h>
#include <AP_Platform.h>
#include <AP_PluginCommon.h>
#include <exception>
#include <stdexcept>
#include <string>
#include <vector>
#include <iostream>
#include <memory>

Go to the source code of this file.

Classes

class  AP_PluginException
 [DEPRECATED]
Base class of all exceptions thrown across the correlator/plugin boundary. More...
 
class  AP_TypeException
 [DEPRECATED]
Type error. More...
 
class  AP_UnimplementedException
 [DEPRECATED]
Thrown by an attempt to use a function that is defined but not implemented in this version of the API. More...
 
class  AP_BoundsException
 [DEPRRECATED]
Boundary checking error. More...
 
class  AP_UserPluginException
 [DEPRECATED]
Thrown by plugin authors to signal an error to any EPL calling this plugin. More...
 
class  AP_Context
 [DEPRECATED]
Execution context for a library function call. More...
 
class  AP_Context
 [DEPRECATED]
Execution context for a library function call. More...
 
class  AP_EventHandlerInterface
 [DEPRECATED]
An interface class that should be implemented by event handlers which are registered via AP_CorrelatorInterface::subscribe. More...
 
class  AP_CorrelatorInterface
 [DEPRECATED]
Asynchronous interface to the correlator. More...
 
class  AP_Chunk
 [DEPRRECATED]
Base class for all 'chunk' classes. More...
 
class  AP_Type
 [DEPRECATED]
Type-safe encapsulation of an EPL object, for passing arguments and return values into and out of plugin functions. More...
 
class  AP_Type::ElementFn
 [DEPRECATED]
More...
 
class  AP_TypeList
 [DEPRECATED]
Container class for an ordered list of AP_Type objects, typically used to hold the argument list for a plugin function call. More...
 
struct  AP_Function
 [DEPRECATED]
Plugin function descriptor. More...
 

Macros

#define AP_PLUGIN_VERSION   0x00090000
 

Typedefs

typedef void(AP_PLUGIN_CALL * AP_FunctionPtr) (const AP_Context &ctx, const AP_TypeList &args, AP_Type &rval, AP_TypeDiscriminator rtype)
 
typedef AP_PLUGIN_DLL_SYM AP_ErrorCode(AP_PLUGIN_CALL * AP_InitFunctionPtr) (const AP_Context &ctx, uint32 &version, uint32 &nFunctions, AP_Function *&functions)
 
typedef AP_PLUGIN_DLL_SYM AP_ErrorCode(AP_PLUGIN_CALL * AP_ShutdownFunctionPtr) (const AP_Context &ctx)
 
typedef AP_PLUGIN_DLL_SYM AP_ErrorCode(AP_PLUGIN_CALL * AP_LibraryVersionFunctionPtr) (const AP_Context &ctx, uint32 &version)
 
typedef AP_PLUGIN_DLL_SYM AP_Capabilities(AP_PLUGIN_CALL * AP_GetCapabilitiesFunctionPtr) (const AP_Context &ctx)
 
typedef AP_PLUGIN_DLL_SYM AP_ErrorCode(AP_PLUGIN_CALL * AP_ThreadEndedFunctionPtr) (const AP_Context &ctx)
 

Detailed Description

Deprecated:
This API is deprecated in favour of the C++ API defined in epl_plugin.hpp

Contains the C++ API for writing EPL plugins.

Macro Definition Documentation

◆ AP_PLUGIN_VERSION

#define AP_PLUGIN_VERSION   0x00090000
Deprecated:
Plugin API version.

The upper 16 bits identify the major release of the API; the lower 16 bits indicate minor versions within that release. No changes that break backward binary compatibility will be made within a given major release of the API. That is, minor releases may add functionality and fix bugs, but will not change or remove any documented behaviour. AP_PluginCommon.h provides two _VERSION_MASK symbols for convenience in performing fine-grained version checks.

Typedef Documentation

◆ AP_FunctionPtr

typedef void(AP_PLUGIN_CALL* AP_FunctionPtr) (const AP_Context &ctx, const AP_TypeList &args, AP_Type &rval, AP_TypeDiscriminator rtype)
Deprecated:
Type of a plugin function.

All functions exported by a plugin library must follow this interface.

Parameters
ctxExecution context for this invocation of the function.
argsFunction parameters, passed by reference.
rvalFunction return value, to be filled in by plugin.
Exceptions
AP_PluginExceptionIf anything goes wrong.

◆ AP_GetCapabilitiesFunctionPtr

typedef AP_PLUGIN_DLL_SYM AP_Capabilities(AP_PLUGIN_CALL* AP_GetCapabilitiesFunctionPtr) (const AP_Context &ctx)
Deprecated:
Type of a plugin capability function.

Each plugin must export a single function with this signature, named using the AP_PLUGIN_GET_CAPABILITIES_FUNCTION_NAME macro, with "C" linkage. The get capabilities function is called after the version function and before the library initialisation function to determine the capabilities/ features of the plugin API supported by the library without triggering any side-effects that the initialisation function might have. If the function is not present, the plugin API will assume that the library conforms to an earlier version of the API and proceed accordingly.

Parameters
ctxExecution context for the function call.
Returns
An AP_Capabilities indicating the capabilities/ properties of the plugin (multiple values are bitwise-OR'd together)

◆ AP_InitFunctionPtr

typedef AP_PLUGIN_DLL_SYM AP_ErrorCode(AP_PLUGIN_CALL* AP_InitFunctionPtr) (const AP_Context &ctx, uint32 &version, uint32 &nFunctions, AP_Function *&functions)
Deprecated:
Type of a plugin library initialisation function.

Each plugin must export a single function with this signature, named using the AP_INIT_FUNCTION_NAME macro, with "C" linkage. The initialisation function will be called immediately after the library is loaded by the Engine.

Parameters
ctxExecution context for the function call.
versionActive plugin API version. The plugin should verify it is compatible with this version (and return AP_VERSION_MISMATCH_ERROR if not) and update version to indicate the API version the plugin was compiled against.
nFunctionsThe plugin should set this to the number of functions it exports.
functionsThe plugin should set this to the address of an array of AP_Functions structures, of length nFunctions, describing the functions exported by the plugin. This data will be read and copied by the plugin API.
Returns
An AP_ErrorCode indicating the success or otherwise of the library initialisation.

◆ AP_LibraryVersionFunctionPtr

typedef AP_PLUGIN_DLL_SYM AP_ErrorCode(AP_PLUGIN_CALL* AP_LibraryVersionFunctionPtr) (const AP_Context &ctx, uint32 &version)
Deprecated:
Type of a plugin library version function.

Each plugin must export a single function with this signature, named using the AP_LIBRARY_VERSION_FUNCTION_NAME macro, with "C" linkage. The version function is called before the library initialisation function to determine the version of the plugin API supported by the library without triggering any side-effects that the initialisation function might have. If the function is not present, the plugin API will assume that the library conforms to an earlier version of the API and proceed accordingly.

Parameters
ctxExecution context for the function call.
versionThe plugin should fill this in with the version of the API it was compiled against.
Returns
An AP_ErrorCode indicating the success or otherwise of the function call.

◆ AP_ShutdownFunctionPtr

typedef AP_PLUGIN_DLL_SYM AP_ErrorCode(AP_PLUGIN_CALL* AP_ShutdownFunctionPtr) (const AP_Context &ctx)
Deprecated:
Type of a plugin library shutdown function.

Each plugin must export a single function with this signature, named using the AP_SHUTDOWN_FUNCTION_NAME macro, with "C" linkage. The shutdown function will be called immediately before the library is unloaded by the Engine, either when the last import of the plugin is deleted or the correlator is shut down.

Parameters
ctxExecution context for the function call.
Returns
An AP_ErrorCode indicating the success or otherwise of the function call.

◆ AP_ThreadEndedFunctionPtr

typedef AP_PLUGIN_DLL_SYM AP_ErrorCode(AP_PLUGIN_CALL* AP_ThreadEndedFunctionPtr) (const AP_Context &ctx)
Deprecated:
Type of a plugin library thread ended function.

The function is called by the correlator when a thread ends. The function is optional, but not implementing it may lead to leaks as the plugin will not be told if a thread has ended.

This function pointer is not guaranteed to be called before AP_ShutdownFunctionPtr Any plugin using this will have to free resources in AP_ShutdownFunctionPtr as if AP_ThreadEndedFunctionPtr may have not been called.

Parameters
ctxExecution context for the function call.
Returns
An AP_ErrorCode indicating the success or otherwise of the function call.