Member values
Member name | Data type | Description |
---|---|---|
handle | ControllerElementHandle | Controller element handle |
event_type | uint32 | Type of controller element event that occured |
axis_value | float32 | Axis value (set between -1.0 and 1.0); only set if 'axis' controller element, otherwise set to zero |
Member functions
Function name | Return type | Input type | Description |
---|---|---|---|
has_handle() const | bool | void | Returns true if handle is set. |
handle() | const ControllerElementHandle& | void | Returns the current value of handle. If handle is not set, returns a ControllerElementHandle with none of its fields set (possibly handle::default_instance()). |
mutable_handle() | ControllerElementHandle * | void | Returns a pointer to the mutable ControllerElementHandle object that stores the field's value. If the field was not set prior to the call, then the returned ControllerElementHandle will have none of its fields set (i.e. it will be identical to a newly-allocated ControllerElementHandle). After calling this, has_handle() will return true and handle() will return a reference to the same instance of ControllerElementHandle. |
clear_handle() | void | void | Clears the value of the field. After calling this, has_handle() will return false and handle() will return the default value. |
set_allocated_handle() | void | ControllerElementHandle * | Sets the ControllerElementHandle object to the field and frees the previous field value if it exists. If the ControllerElementHandle pointer is not NULL, the message takes ownership of the allocated ControllerElementHandle object and has_ ControllerElementHandle() will return true. Otherwise, if the handle is NULL, the behavior is the same as calling clear_handle(). |
release_handle() | ControllerElementHandle * | void | Releases the ownership of the field and returns the pointer of the ControllerElementHandle object. After calling this, caller takes the ownership of the allocated ControllerElementHandle object, has_handle() will return false, and handle() will return the default value. |
event_type() const | uint32 | void | Returns the current value of event_type. If the event_type is not set, returns 0. |
set_event_type() | void | uint32 | Sets the value of event_type. After calling this, event_type() will return value. |
clear_event_type() | void | void | Clears the value of event_type. After calling this, event_type() will return the empty string/empty bytes. |
axis_value() | float32 | void | Returns the current value of axis_value. If the axis_value is not set, returns 0. |
set_axis_value() | void | float32 | Sets the value of axis_value. After calling this, axis_value() will return value. |
clear_axis_value() | void | void | Clears the value of axis_value. After calling this, axis_value() will return 0. |
Parent topic: Base (C++)