29 #ifndef CORRELATOR_PLUGIN_H 
   30 #define CORRELATOR_PLUGIN_H 
   34 #include <AP_Platform.h> 
   74 #define AP_CORRELATOR_PLUGIN_VERSION      0x00090000 
   82         AP_PLUGIN_SERIALISATION_EXCEPTION
 
  100         struct AP_PluginCorrelatorInterface_Stubs;
 
  101         struct AP_PluginContext_Stubs;
 
  102         struct AP_PluginType_Stubs;
 
  103         struct AP_PluginChunk_Stubs;
 
  104         struct AP_PluginTypeList_Stubs;
 
  106         typedef struct AP_PluginCorrelatorInterface_Stubs AP_PluginCorrelatorInterface;
 
  107         typedef struct AP_PluginContext_Stubs AP_PluginContext;
 
  108         typedef struct AP_PluginType_Stubs AP_PluginType;
 
  109         typedef struct AP_PluginChunk_Stubs AP_PluginChunk;
 
  110         typedef struct AP_PluginTypeList_Stubs AP_PluginTypeList;
 
  131                 void (AP_PLUGIN_CALL* sendEvent)(AP_PluginCorrelatorInterface* _interface, 
const char* event);
 
  142                 void (AP_PLUGIN_CALL* sendEventTo)(AP_PluginCorrelatorInterface* _interface, 
const char* event, AP_uint64 targetCtx, AP_uint64 sourceCtx);
 
  155         struct AP_PluginCorrelatorInterface_Stubs {
 
  159                 void sendEvent(
char* event) {
 
  163                 void sendEvent(
char* event, AP_uint64 targetCtx, AP_uint64 sourceCtx) {
 
  164                         api.
functions->sendEventTo(
this, event, targetCtx, sourceCtx);
 
  175                 AP_uint32 (AP_PLUGIN_CALL* version)(
const AP_PluginContext* ctx);
 
  188                 void (AP_PLUGIN_CALL* deleteChunk)(
const AP_PluginContext* ctx, AP_PluginChunk* chunk);
 
  190                 AP_bool (AP_PLUGIN_CALL* checkException)(
const AP_PluginContext* ctx);
 
  196                 void (AP_PLUGIN_CALL* clearException)(
const AP_PluginContext* ctx);
 
  200                 AP_PluginCorrelatorInterface* (AP_PLUGIN_CALL* 
getCorrelator)(
const AP_PluginContext* ctx);
 
  205                 void (AP_PLUGIN_CALL* 
char8free)(AP_char8* ptr);
 
  210                 AP_uint64 (AP_PLUGIN_CALL* getContextId)(
const AP_PluginContext* ctx);
 
  218                 const void* reserved;
 
  223         struct AP_PluginContext_Stubs {
 
  227                 AP_uint32 version()
 const {
 
  235                 void deleteChunk(AP_PluginChunk* chunk)
 const {
 
  239                 AP_bool checkException()
 const {
 
  240                         return api.
functions->checkException(
this);
 
  244                         return api.
functions->getExceptionType(
this);
 
  247                 const AP_char8* getExceptionMessage()
 const {
 
  251                 void clearException()
 const {
 
  255                 const AP_PluginCorrelatorInterface* getCorrelator()
 const{
 
  263                 AP_uint64 getContextId()
 const{
 
  264                         return api.
functions->getContextId(
this);
 
  274                 void* (AP_PLUGIN_CALL* 
getUserData)(
const AP_PluginChunk* chunk);
 
  280                 void (AP_PLUGIN_CALL* setUserData)(AP_PluginChunk* chunk, 
void* userData);
 
  290                 void (AP_PLUGIN_CALL* freeUserData)(AP_PluginChunk* chunk);
 
  292                 void* (AP_PLUGIN_CALL* 
copyUserData)(
const AP_PluginChunk* chunk);
 
  307         struct AP_PluginChunk_Stubs {
 
  311                 void* getUserData()
 const {
 
  315                 void setUserData(
void* userData) {
 
  316                         api.
functions->setUserData(
this, userData);
 
  319                 void freeUserData() {
 
  323                 void* copyUserData() {
 
  338                 AP_PluginChunk* (AP_PLUGIN_CALL* 
getChunkValue)(
const AP_PluginType* obj);
 
  347                 void (AP_PLUGIN_CALL* setChunkValue)(
const AP_PluginType* obj, AP_PluginChunk* val);
 
  350                 AP_int64 (AP_PLUGIN_CALL* getIntegerValue)(
const AP_PluginType* obj);
 
  352                 void (AP_PLUGIN_CALL* setIntegerValue)(AP_PluginType* obj, 
AP_int64 val);
 
  355                 AP_float64 (AP_PLUGIN_CALL* getFloatValue)(
const AP_PluginType* obj);
 
  357                 void (AP_PLUGIN_CALL* setFloatValue)(AP_PluginType* obj, 
AP_float64 val);
 
  360                 AP_bool (AP_PLUGIN_CALL* getBooleanValue)(
const AP_PluginType* obj);
 
  362                 void (AP_PLUGIN_CALL* setBooleanValue)(AP_PluginType* obj, 
AP_bool val);
 
  365                 const AP_char8* (AP_PLUGIN_CALL* 
getStringValue)(
const AP_PluginType* obj);
 
  370                 void (AP_PLUGIN_CALL* setStringValue)(AP_PluginType* obj, 
const AP_char8* val);
 
  373                 AP_uint32 (AP_PLUGIN_CALL* getSequenceLength)(
const AP_PluginType* obj);
 
  381                 void (AP_PLUGIN_CALL* setSequenceLength)(
const AP_PluginType* obj, 
AP_uint32 len);
 
  402                 void (AP_PLUGIN_CALL *copyFrom)(
const AP_PluginType *obj, 
const AP_PluginType *other);
 
  419                 void (AP_PLUGIN_CALL* releaseSequenceElements)(
const AP_PluginType* obj);
 
  440                 void (AP_PLUGIN_CALL* releaseChunkSequenceElements)(
const AP_PluginType* obj);
 
  457                 void (AP_PLUGIN_CALL* releaseIntegerSequenceElements)(
const AP_PluginType* obj);
 
  474                 void (AP_PLUGIN_CALL* releaseFloatSequenceElements)(
const AP_PluginType* obj);
 
  491                 void (AP_PLUGIN_CALL* releaseBooleanSequenceElements)(
const AP_PluginType* obj);
 
  518                 void (AP_PLUGIN_CALL* releaseStringSequenceElements)(
const AP_PluginType* obj);
 
  531         struct AP_PluginType_Stubs {
 
  536                         return api.
functions->getDiscriminator(
this);
 
  539                 AP_PluginChunk* getChunkValue()
 const {
 
  543                 void setChunkValue(AP_PluginChunk* val)
 const {
 
  547                 AP_int64 getIntegerValue()
 const {
 
  548                         return api.
functions->getIntegerValue(
this);
 
  551                 void setIntegerValue(AP_int64 val) {
 
  552                         api.
functions->setIntegerValue(
this, val);
 
  555                 AP_float64 getFloatValue()
 const {
 
  556                         return api.
functions->getFloatValue(
this);
 
  559                 void setFloatValue(AP_float64 val) {
 
  563                 AP_bool getBooleanValue()
 const {
 
  564                         return api.
functions->getBooleanValue(
this);
 
  567                 void setBooleanValue(AP_bool val) {
 
  568                         api.
functions->setBooleanValue(
this, val);
 
  571                 const AP_char8* getStringValue()
 const {
 
  575                 void setStringValue(
const AP_char8* val) {
 
  576                         api.
functions->setStringValue(
this, val);
 
  579                 AP_uint32 getSequenceLength()
 const {
 
  580                         return api.
functions->getSequenceLength(
this);
 
  584                         return api.
functions->getSequenceType(
this);
 
  587                 AP_PluginType* getSequenceElement(AP_uint32 index)
 const {
 
  591                 void copyFrom(
const AP_PluginType *other) {
 
  592                         return api.
functions->copyFrom(
this, other);
 
  595                 AP_PluginType* 
const *getSequenceElements(AP_uint32 start = 0, AP_uint32 length = ~0U)
 const {
 
  599                 void releaseSequenceElements()
 const {
 
  600                         api.
functions->releaseSequenceElements(
this);
 
  603                 AP_PluginChunk* 
const * getChunkSequenceElements(AP_uint32 start = 0, AP_uint32 length = ~0U)
 const {
 
  607                 void releaseChunkSequenceElements()
 const {
 
  608                         api.
functions->releaseChunkSequenceElements(
this);
 
  611                 AP_int64* getIntegerSequenceElements(AP_uint32 start = 0, AP_uint32 length = ~0U)
 const {
 
  615                 void releaseIntegerSequenceElements()
 const {
 
  616                         api.
functions->releaseIntegerSequenceElements(
this);
 
  619                 AP_float64* getFloatSequenceElements(AP_uint32 start = 0, AP_uint32 length = ~0U)
 const {
 
  623                 void releaseFloatSequenceElements()
 const {
 
  624                         api.
functions->releaseFloatSequenceElements(
this);
 
  627                 AP_bool* getBooleanSequenceElements(AP_uint32 start = 0, AP_uint32 length = ~0U)
 const {
 
  631                 void releaseBooleanSequenceElements()
 const {
 
  632                         api.
functions->releaseBooleanSequenceElements(
this);
 
  635                 const AP_char8** getStringSequenceElements(AP_uint32 start = 0, AP_uint32 length = ~0U)
 const {
 
  639                 void releaseStringSequenceElements()
 const {
 
  640                         api.
functions->releaseStringSequenceElements(
this);
 
  653                 AP_uint32 (AP_PLUGIN_CALL* getSize)(
const AP_PluginTypeList* list);
 
  655                 AP_bool (AP_PLUGIN_CALL* isEmpty)(
const AP_PluginTypeList* list);
 
  657                 const AP_PluginType* (AP_PLUGIN_CALL* 
getElement)(
const AP_PluginTypeList* list, 
AP_uint32 index);
 
  670         struct AP_PluginTypeList_Stubs {
 
  674                 AP_uint32 getSize()
 const {
 
  678                 AP_bool isEmpty()
 const {
 
  682                 const AP_PluginType* getElement(AP_uint32 index)
 const {
 
  814         typedef AP_PLUGIN_DLL_SYM 
AP_ErrorCode (AP_PLUGIN_CALL* AP_PluginThreadEndedFunctionPtr) (
const AP_PluginContext* ctx);
 
AP_TypeList. 
Definition: correlator_plugin.h:663
const AP_char8 *AP_PLUGIN_CALL * getExceptionMessage(const AP_PluginContext *ctx)
Returns the message of the most recent exception. 
void *AP_PLUGIN_CALL * copyUserData(const AP_PluginChunk *chunk)
return a copy of the user data 
AP_PluginCorrelatorInterface *AP_PLUGIN_CALL * getCorrelator(const AP_PluginContext *ctx)
Return the correlator implementation. 
CorrelatorInterface. 
Definition: correlator_plugin.h:148
AP_uint32(AP_PLUGIN_CALL *getSequenceLength)(const AP_PluginType *obj)
Get the number of elements in a sequence object. 
AP_bool(AP_PLUGIN_CALL *checkException)(const AP_PluginContext *ctx)
Returns true if an exception has occurred since the last time that clearException was called...
AP_Capabilities
Plugin capabilities. 
Definition: AP_PluginCommon.h:74
void(AP_PLUGIN_CALL * AP_PluginFunctionPtr)(const AP_PluginContext *ctx, const AP_PluginTypeList *args, AP_PluginType *rval, AP_TypeDiscriminator rtype)
Type of a plugin function. 
Definition: correlator_plugin.h:697
CorrelatorInterface function API. 
Definition: correlator_plugin.h:122
AP_TypeList function API. 
Definition: correlator_plugin.h:650
const struct AP_PluginTypeList_Functions * functions
Pointer to function API. 
Definition: correlator_plugin.h:667
AP_int64 *AP_PLUGIN_CALL * getIntegerSequenceElements(const AP_PluginType *obj, AP_uint32 start, AP_uint32 length)
Generate an array of integers encapsulating elements [start..start+length-1] of the sequence object...
AP_PluginType *const *AP_PLUGIN_CALL * getSequenceElements(const AP_PluginType *obj, AP_uint32 start, AP_uint32 length)
Generate an array of pointers to AP_Type objects, encapsulating elements [start..start+length-1] of t...
AP_PluginType *AP_PLUGIN_CALL * getSequenceElement(const AP_PluginType *obj, AP_uint32 index)
Get a pointer to a single sequence element. 
Incorrect type. 
Definition: correlator_plugin.h:79
Generic exception. 
Definition: correlator_plugin.h:78
AP_uint32(AP_PLUGIN_CALL *getSize)(const AP_PluginTypeList *list)
Return the number of objects in the list. 
const AP_char8 * returnType
Return type. 
Definition: correlator_plugin.h:721
const AP_char8 *AP_PLUGIN_CALL * getStringValue(const AP_PluginType *obj)
Get the string value of the object. 
AP_uint64(AP_PLUGIN_CALL *getContextId)(const AP_PluginContext *ctx)
Return the identifier of the EPL (parallelism) context associated with this plugin execution context...
const struct AP_PluginType_Functions * functions
Pointer to function API. 
Definition: correlator_plugin.h:528
PluginChunk function API. 
Definition: correlator_plugin.h:271
AP_TypeDiscriminator
A typed discriminator for the contents of an AP_Type object. 
Definition: AP_PluginCommon.h:47
PluginContext. 
Definition: correlator_plugin.h:216
AP_PLUGIN_DLL_SYM AP_ErrorCode(AP_PLUGIN_CALL * AP_PluginShutdownFunctionPtr)(const AP_PluginContext *ctx)
Pointer to a plugin library shutdown function. 
Definition: correlator_plugin.h:759
AP_PluginFunctionPtr fptr
Pointer to function implementation. 
Definition: correlator_plugin.h:712
Shared definitions for the C and C++ plugin APIs. 
AP_uint32 nParams
Argument count. 
Definition: correlator_plugin.h:715
AP_float64(AP_PLUGIN_CALL *getFloatValue)(const AP_PluginType *obj)
Get the float value of the object. 
AP_Type function API. 
Definition: correlator_plugin.h:332
const struct AP_PluginChunk_Functions * functions
Pointer to function API. 
Definition: correlator_plugin.h:302
PluginChunk. 
Definition: correlator_plugin.h:298
const struct AP_PluginChunk_Callbacks * callbacks
Pointer to the user callbacks for this chunk. 
Definition: correlator_plugin.h:304
void(AP_PLUGIN_CALL *sendEvent)(AP_PluginCorrelatorInterface *_interface
Send an event to the correlator. 
PluginChunk callback API. 
Definition: correlator_plugin.h:287
const AP_char8 **AP_PLUGIN_CALL * getStringSequenceElements(const AP_PluginType *obj, AP_uint32 start, AP_uint32 length)
Generate an array of string pointers encapsulating elements [start..start+length-1] of the sequence o...
const AP_char8 ** paramTypes
Argument types - nParams elements, unterminated. 
Definition: correlator_plugin.h:718
AP_float64 *AP_PLUGIN_CALL * getFloatSequenceElements(const AP_PluginType *obj, AP_uint32 start, AP_uint32 length)
Generate an array of floats encapsulating elements [start..start+length-1] of the sequence object...
const struct AP_PluginCorrelatorInterface_Functions * functions
Pointer to the function API. 
Definition: correlator_plugin.h:152
const AP_PluginType *AP_PLUGIN_CALL * getElement(const AP_PluginTypeList *list, AP_uint32 index)
Return a pointer to an element of the list. 
AP_TypeDiscriminator(AP_PLUGIN_CALL *getDiscriminator)(const AP_PluginType *obj)
Return the type contained in this object. 
AP_CorrelatorPluginExceptionType
Typed differentiator for different exceptions in the plugin interface. 
Definition: correlator_plugin.h:77
AP_int64(AP_PLUGIN_CALL *getIntegerValue)(const AP_PluginType *obj)
Get the integer value of the object. 
void *AP_PLUGIN_CALL * getUserData(const AP_PluginChunk *chunk)
Return the user data stored in this chunk. 
AP_PluginChunk *AP_PLUGIN_CALL * createChunk(const AP_PluginContext *ctx, const struct AP_PluginChunk_Callbacks *callbacks, void *userData)
Create a chunk. 
AP_CorrelatorPluginExceptionType(AP_PLUGIN_CALL *getExceptionType)(const AP_PluginContext *ctx)
Returns the type of the most recent exception. 
const struct AP_PluginContext_Functions * functions
Pointer to the function API. 
Definition: correlator_plugin.h:220
const AP_char8 * name
Function name. 
Definition: correlator_plugin.h:709
Out of bands. 
Definition: correlator_plugin.h:81
PluginContext function API. 
Definition: correlator_plugin.h:172
AP_bool(AP_PLUGIN_CALL *getBooleanValue)(const AP_PluginType *obj)
Get the boolean value of the object. 
AP_PLUGIN_DLL_SYM AP_ErrorCode(AP_PLUGIN_CALL * AP_PluginVersionFunctionPtr)(const AP_PluginContext *ctx, AP_uint32 *version)
Type of a plugin library version function. 
Definition: correlator_plugin.h:779
AP_PluginChunk *const *AP_PLUGIN_CALL * getChunkSequenceElements(const AP_PluginType *obj, AP_uint32 start, AP_uint32 length)
Generate an array of pointers to chunks encapsulating elements [start..start+length-1] of the sequenc...
void(AP_PLUGIN_CALL *freeUserData)(AP_PluginChunk *chunk)
Free the specified user data. 
AP_PLUGIN_DLL_SYM AP_ErrorCode(AP_PLUGIN_CALL *AP_PluginThreadEndedFunctionPtr)(const AP_PluginContext *ctx)
Type of a plugin library thread ended function. 
Definition: correlator_plugin.h:814
AP_ENGINE_CLIENT_API void char8free(char *string)
Free any char* string returned from the client API. 
AP_PLUGIN_DLL_SYM AP_ErrorCode(AP_PLUGIN_CALL * AP_PluginInitFunctionPtr)(const AP_PluginContext *ctx, AP_uint32 *version, AP_uint32 *nFunctions, AP_PluginFunction **functions)
Type of a plugin library initialisation function. 
Definition: correlator_plugin.h:749
AP_bool *AP_PLUGIN_CALL * getBooleanSequenceElements(const AP_PluginType *obj, AP_uint32 start, AP_uint32 length)
Generate an array of booleans encapsulating elements [start..start+length-1] of the sequence object...
AP_PLUGIN_DLL_SYM AP_Capabilities(AP_PLUGIN_CALL * AP_PluginGetCapabilitiesFunctionPtr)(const AP_PluginContext *ctx)
Type of a plugin capability function. 
Definition: correlator_plugin.h:797
Plugin function descriptor. 
Definition: correlator_plugin.h:706
AP_uint32(AP_PLUGIN_CALL *version)(const AP_PluginContext *ctx)
Return active plugin API version. 
AP_Type. 
Definition: correlator_plugin.h:524
void(AP_PLUGIN_CALL *setChunkValue)(const AP_PluginType *obj
Set the chunk value of the object. 
Unimplemented method. 
Definition: correlator_plugin.h:80
AP_bool(AP_PLUGIN_CALL *isEmpty)(const AP_PluginTypeList *list)
Return true iff size() == 0. 
AP_PluginChunk *AP_PLUGIN_CALL * getChunkValue(const AP_PluginType *obj)
Get the chunk value of the object.