Apama  10.15.0.2
com::apama::event::Event Class Referenceabstract

An Event object represents an event instance. More...

#include <engine_client_cpp.hpp>

Public Member Functions

virtual const char * getText () const =0
 Retrieve the event's type and its contents as a string. More...
 
virtual const char * getChannel () const =0
 Retrieve the event's channel. More...
 
virtual double getTime () const =0
 Retrieve the event's timestamp. More...
 

Friends

AP_ENGINE_CLIENT_API EventcreateEvent (const char *eventString, const char *channelString)
 This function allows creation of an Event object. More...
 
AP_ENGINE_CLIENT_API void deleteEvent (Event *ev)
 This function allows deletion of an Event object. More...
 
std::ostream & operator<< (std::ostream &stream, const Event &obj)
 Output to an ostream from a reference. More...
 
std::ostream & operator<< (std::ostream &stream, const Event *obj)
 Output to an ostream from a pointer. More...
 

Detailed Description

An Event object represents an event instance.

Must be created using com::apama::event::createEvent Must be destroyed using com::apama::event::deleteEvent

Event is not copiable

Member Function Documentation

◆ getChannel()

virtual const char* com::apama::event::Event::getChannel ( ) const
pure virtual

Retrieve the event's channel.

This currently only has meaning for events which have been sourced from the correlator, in which case it is set to the name of the channel the event was emitted from, or "" (the empty string) for the wildcard channel.

Returns
The channel of the event, encoded in UTF-8.

◆ getText()

virtual const char* com::apama::event::Event::getText ( ) const
pure virtual

Retrieve the event's type and its contents as a string.

Returns
C style string with the event's textual representation. Note that these strings should be encoded in UTF-8.

◆ getTime()

virtual double com::apama::event::Event::getTime ( ) const
pure virtual

Retrieve the event's timestamp.

This timestamp currently only has meaning for events which have been sourced from the correlator, in which case it is set to the correlator time at which it was created, or the value it was set to explicitly by code running within the correlator.

Returns
the timestamp of the event, in floating point seconds since the Unix epoch.

Friends And Related Function Documentation

◆ createEvent

AP_ENGINE_CLIENT_API Event* createEvent ( const char *  eventString,
const char *  channelString 
)
friend

This function allows creation of an Event object.

Parameters
eventStringC style string representing the event instance in EPL. Note that this string should be encoded in UTF-8.
channelStringC style string representing the channel
Returns
A reference to an Event object.

◆ deleteEvent

AP_ENGINE_CLIENT_API void deleteEvent ( Event ev)
friend

This function allows deletion of an Event object.

Parameters
evA reference to an Event object.

◆ operator<< [1/2]

std::ostream& operator<< ( std::ostream &  stream,
const Event obj 
)
friend

Output to an ostream from a reference.

◆ operator<< [2/2]

std::ostream& operator<< ( std::ostream &  stream,
const Event obj 
)
friend

Output to an ostream from a pointer.


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