Developing Apama Applications > Writing Correlator Plug-ins > Writing a Plug-in in C and C++
Writing a Plug-in in C and C++
The Apama EPL Plug-in APIs for C and a C++ make it possible for developers to write event correlator plug-ins either in C or in C++.
As long as certain conventions are followed, writing a plug-in is very straightforward. In essence, a plug-in consists of a set of static C or C++ functions (representing the functionality that the developer wishes to invoke from within EPL code) and some necessary initialization functions.
C++ compilers vary extensively in their support for the ISO C++ standard and in how they support linking. For this reason Apama supports the writing of C++ plug-ins only with specific compilers. For a list of the supported C++ compilers, see Software AG's Knowledge Center in Empower at https://empower.softwareag.com.
On the other-hand, C has been standardized for several years, and for this reason the C API should work with the majority of modern C/C++ compilers on all platforms.
The EPL Plug-in APIs are versioned. For a correlator plug-in to be compatible with an event correlator they both need to support the same plug-in interface version. Plug-ins built with earlier versions of the APIs need to be re-compiled and re-linked. Beginning with release 4.2, the plug-in interface is more accurate with respect to the use of const, so minor code changes may be required. Note that the API version number is separate from the product version number and only increases when the plug-in ABI is changed.
The APIs comprise the relevant header files, correlator_plugin.hpp and correlator_plugin.h, and are accompanied by a set of sample applications.
Copyright © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.