PrivMX DOCS
API Reference/PrivMX Endpoint/Core

EventHolder

EventHolder is an helper class containing functions to operate on Event objects.

Constructors

EventHolder

EventHolder constructor

Params

event

const std::shared_ptr<Event> &

pointer to the Event object to use in the EventHolder

EventHolder(
const std::shared_ptr<Event> &event
)

Methods

type

Extracts Event type

const std::string & type() const

Returns

const std::string & · type of the Event

channel

Extracts Event channel

const std::string & channel() const

Returns

const std::string & · channel that the Event arrived

toJSON

Serializes an Event to the JSON string

std::string toJSON() const

Returns

std::string · JSON string representation of the Event object

get

Gets Event object

const std::shared_ptr< Event > & get() const

Returns

conststd::shared_ptr<[Event](/reference/cpp/endpoint/core/event)> · pointer to the underlying Event object