Apama Documentation : Developing Apama Applications : Developing EPL Plug-ins : Writing EPL Plug-ins in C++ : Creating a plug-in using C++ : Method signatures
Method signatures
Only methods which have arguments and return values which can be converted into EPL types may be exported. For some of the types, the equivalent EPL signature can automatically be deduced. For methods which only take and return those types, you do not need to supply the explicit type. For other types, you must provide the EPL signature when registering the function.
EPL method signatures take the following forms:
action<integer>
action<sequence<string>, integer>
action<> returns integer
action<dictionary<string, string>, string> returns string
The following tables lists the EPL types and their equivalent C++ types.
Automatically deducible types
EPL type
C++ argument type
C++ return type
Notes
integer
int64_t
int64_t
string
const char *
const char *
You must only use const char * as a return type if it refers to a static string or a string whose lifetime is controlled outside of the function being returned from, such as one owned by a chunk.
If you are constructing the string in the function, you must use std::string as the return type of the function instead.
string
std::string
std::string
Use std::string as the return type for your function unless you are certain that the lifetime of the string will outlast the function returning it.
float
double
double
boolean
bool
bool
decimal
decimal_t
decimal_t
chunk
const custom_t<T> &
custom_t<T>
Works for any class as the template parameter T.
Types requiring explicit signatures
EPL type
C++ argument type
C++ return type
Notes
context
int64_t
int64_t
int64_t will be deduced to integer, can be explicitly changed to context.
sequence<A>
const list_t &
list_t
Works for any sequence contents type.
dictionary<A, B>
const map_t &
map_t
Works for any dictionary contents type.
EventType
const map_t &
map_t
Works for any event type. The event is converted to a map_t where the key is of type string and the value is of type data_t. Keys are the names of the fields in the event.
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback