class ControllerState

August 13, 2019 ยท View on GitHub

Member values

Member nameData typeDescription
handleControllerHandleController identifier
event_typeuint32Type of controller event that occured

Member functions

Function nameReturn typeInput typeDescription
has_handle() constboolvoidReturns true if handle is set.
handle()const ControllerHandle&voidReturns the current value of handle. If handle is not set, returns a ControllerHandle with none of its fields set (possibly handle::default_instance()).
mutable_handle()ControllerHandle *voidReturns a pointer to the mutable ControllerHandle object that stores the field's value. If the field was not set prior to the call, then the returned ControllerHandle will have none of its fields set (i.e. it will be identical to a newly-allocated ControllerHandle). After calling this, has_handle() will return true and handle() will return a reference to the same instance of ControllerHandle.
clear_handle()voidvoidClears the value of the field. After calling this, has_handle() will return false and handle() will return the default value.
set_allocated_handle()voidControllerHandle *Sets the ControllerHandle object to the field and frees the previous field value if it exists. If the ControllerHandle pointer is not NULL, the message takes ownership of the allocated ControllerHandle object and has_ ControllerHandle() will return true. Otherwise, if the handle is NULL, the behavior is the same as calling clear_handle().
release_handle()ControllerHandle *voidReleases the ownership of the field and returns the pointer of the ControllerHandle object. After calling this, caller takes the ownership of the allocated ControllerHandle object, has_handle() will return false, and handle() will return the default value.
event_type() constuint32voidReturns the current value of event_type. If the event_type is not set, returns 0.
set_event_type()voiduint32Sets the value of event_type. After calling this, event_type() will return value.
clear_event_type()voidvoidClears the value of event_type. After calling this, event_type() will return the empty string/empty bytes.

Parent topic: Base (C++)