neuray Services API Programmer's Manual

mi::nservices::IEvent_handler_context Class Reference

[Events]

Description

The event handler context. This is passed to event handlers when they are triggered,.

Public Member Functions

virtual IConverterget_converter() const =0
Returns a type converter. More...
virtual IEvent_contextget_event_context() const =0
returns the event context
virtual neuraylib::ITransactionget_execution_transaction() =0
Retrieves the current transaction that commands are being executed in. More...
virtual const char* get_name() const =0
Retrieves the name that this handler was registered as.
virtual neuraylib::IPlugin_apiget_plugin_api() const =0
Get the IPlugin_api. More...
virtual neuraylib::ITransactionget_user_state_transaction() =0
Retrieves a transaction into the user state this handler is executed in. More...

Member Functions

virtual IConverter* mi::​nservices::​IEvent_handler_context::get_converter() const [pure virtual]

Returns a type converter. This can be used to convert mi::IData derived event data to other types

Returns

the type converter

virtual IEvent_context* mi::​nservices::​IEvent_handler_context::get_event_context() const [pure virtual]

returns the event context

virtual neuraylib::ITransaction* mi::​nservices::​IEvent_handler_context::get_execution_transaction() [pure virtual]

Retrieves the current transaction that commands are being executed in.

Note:

The execution transaction is only valid while commands are being executed. If an event is triggered outside of command execution this method will return NULL. SCENE_EXPIRED is the only system event which can occur outside of command execution.

Returns

the transaction or NULL if not currently executing commands.

virtual const char* mi::​nservices::​IEvent_handler_context::get_name() const [pure virtual]

Retrieves the name that this handler was registered as.

virtual neuraylib::IPlugin_api* mi::​nservices::​IEvent_handler_context::get_plugin_api() const [pure virtual]

Get the IPlugin_api.

Returns

the plugin api

virtual neuraylib::ITransaction* mi::​nservices::​IEvent_handler_context::get_user_state_transaction() [pure virtual]

Retrieves a transaction into the user state this handler is executed in.

Returns

the transaction