neuray Services API Programmer's Manual

mi::nservices::IEvent Class Reference

[Events]

Description

Used to specify and send an event. Create an IEvent using IFactory::create("Event",1,uuid_arg). uuid_arg will be an array of length 1 containing an mi::IUuid which is the UUID of the event. Trigger the event with IEvent_context::send_event

Public Member Functions

virtual base::IInterfaceget_event_data( Size idx) const =0
Returns data registered with this event. More...
template< class T>T* get_event_data( Size idx) const
Returns data registered with this event. More...
virtual base::Uuid get_event_type() const =0
Returns the type of event to trigger. More...
virtual Size push_event_data( base::IInterface* data) =0
Adds data to be passed to the event hander. More...

Member Functions

virtual base::IInterface* mi::​nservices::​IEvent::get_event_data( Size idx) const [pure virtual]

Returns data registered with this event. The number and type of data varies per event.

See also:

Events.

Parameters

idx
the index of the data

Returns

the data or NULL if no data exists at that index

template< class T>

T* mi::​nservices::​IEvent::get_event_data( Size idx) const [inline]

Returns data registered with this event. The number and type of data varies per event.

See also:

Events.

Parameters

idx
the index of the data

Returns

the data or NULL if no data exists at that index

virtual base::Uuid mi::​nservices::​IEvent::get_event_type() const [pure virtual]

Returns the type of event to trigger.

Returns

event type

virtual Size mi::​nservices::​IEvent::push_event_data( base::IInterface* data) [pure virtual]

Adds data to be passed to the event hander.

Parameters

data
the data

Returns

the number of data objects added