class ControllerNotification

February 26, 2020 ยท View on GitHub

Member values

Member nameData typeDescription
controller_stateoneof:state ControllerStateUsed to indicate if a controller connection or disconnection event occured
controller_elementoneof:state ControllerElementStateUsed to indicate if a specific button (or axis) was pressed (or moved)
timestampTimestampEvent timestamp
user_handleUserProfileHandleUser that caused the controller event
connectionConnectionConnection that caused the controller event

Member functions

Function nameReturn typeInput typeDescription
has_controller_state() constvoidvoidReturns the current value of the field if oneof case is kController_state. Otherwise, returns oneof:state ControllerState::default_instance()
controller_state() constconst oneof:state ControllerState&voidReturns the current value of the field if oneof case is kController_state
mutable_controller_state()oneof:state ControllerState*voidIf any other oneof field in the same oneof is set, calls clear_state(). Sets the oneof case to kController_state and returns a pointer to the mutable oneof:state ControllerState object that stores the field's value. If the oneof case was not kController_state prior to the call, then the returned oneof:state ControllerState will have none of its fields set (i.e. it will be identical to a newly-allocated oneof:state ControllerState). After calling this, has_controller_state() will return true, controller_state() will return a reference to the same instance of oneof:state ControllerState and state_case() will return kController_state
clear_controller_state()voidvoidNothing will be changed if the oneof case is not kController_state. If the oneof case equals kController_state, frees the field and clears the oneof case. has_controller_state() will return false, controller_state() will return the default value and state_case() will return STATE_NOT_SET.
set_allocated_controller_state()voidoneof:state ControllerState*Calls clear_state(). If the oneof:state ControllerState pointer is not NULL: Sets the oneof:state ControllerState object to the field and sets the oneof case to kController_state. The message takes ownership of the allocated oneof:state ControllerState object, has_controller_state() will return true and state_case() will return kController_state. If the pointer is NULL, has_controller_state() will return false and state_case() will return STATE_NOT_SET. (The behavior is like calling clear_state())
release_controller_state()oneof:state ControllerState*voidReturns NULL if oneof case is not kController_state. If the oneof case is kController_state, clears the oneof case, releases the ownership of the field and returns the pointer of the state object. After calling this, caller takes the ownership of the allocated state object, has_controller_state() will return false, controller_state() will return the default value and state_case() will return STATE_NOT_SET.
has_controller_element() constvoidvoidReturns the current value of the field if oneof case is kController_element. Otherwise, returns oneof:state ControllerElementState::default_instance()
controller_element() constconst oneof:state ControllerElementState&voidReturns the current value of the field if oneof case is kController_element
mutable_controller_element()oneof:state ControllerElementState*voidIf any other oneof field in the same oneof is set, calls clear_state(). Sets the oneof case to kController_element and returns a pointer to the mutable oneof:state ControllerElementState object that stores the field's value. If the oneof case was not kController_element prior to the call, then the returned oneof:state ControllerElementState will have none of its fields set (i.e. it will be identical to a newly-allocated oneof:state ControllerElementState). After calling this, has_controller_element() will return true, controller_element() will return a reference to the same instance of oneof:state ControllerElementState and state_case() will return kController_element
clear_controller_element()voidvoidNothing will be changed if the oneof case is not kController_element. If the oneof case equals kController_element, frees the field and clears the oneof case. has_controller_element() will return false, controller_element() will return the default value and state_case() will return STATE_NOT_SET.
set_allocated_controller_element()voidoneof:state ControllerElementState*Calls clear_state(). If the oneof:state ControllerElementState pointer is not NULL: Sets the oneof:state ControllerElementState object to the field and sets the oneof case to kController_element. The message takes ownership of the allocated oneof:state ControllerElementState object, has_controller_element() will return true and state_case() will return kController_element. If the pointer is NULL, has_controller_element() will return false and state_case() will return STATE_NOT_SET. (The behavior is like calling clear_state())
release_controller_element()oneof:state ControllerElementState*voidReturns NULL if oneof case is not kController_element. If the oneof case is kController_element, clears the oneof case, releases the ownership of the field and returns the pointer of the state object. After calling this, caller takes the ownership of the allocated state object, has_controller_element() will return false, controller_element() will return the default value and state_case() will return STATE_NOT_SET.
has_timestamp() constboolvoidReturns true if timestamp is set.
timestamp()const Timestamp&voidReturns the current value of timestamp. If timestamp is not set, returns a Timestamp with none of its fields set (possibly timestamp::default_instance()).
mutable_timestamp()Timestamp *voidReturns a pointer to the mutable Timestamp object that stores the field's value. If the field was not set prior to the call, then the returned Timestamp will have none of its fields set (i.e. it will be identical to a newly-allocated Timestamp). After calling this, has_timestamp() will return true and timestamp() will return a reference to the same instance of Timestamp.
clear_timestamp()voidvoidClears the value of the field. After calling this, has_timestamp() will return false and timestamp() will return the default value.
set_allocated_timestamp()voidTimestamp *Sets the Timestamp object to the field and frees the previous field value if it exists. If the Timestamp pointer is not NULL, the message takes ownership of the allocated Timestamp object and has_ Timestamp() will return true. Otherwise, if the timestamp is NULL, the behavior is the same as calling clear_timestamp().
release_timestamp()Timestamp *voidReleases the ownership of the field and returns the pointer of the Timestamp object. After calling this, caller takes the ownership of the allocated Timestamp object, has_timestamp() will return false, and timestamp() will return the default value.
has_user_handle() constboolvoidReturns true if user_handle is set.
user_handle()const UserProfileHandle&voidReturns the current value of user_handle. If user_handle is not set, returns a UserProfileHandle with none of its fields set (possibly user_handle::default_instance()).
mutable_user_handle()UserProfileHandle *voidReturns a pointer to the mutable UserProfileHandle object that stores the field's value. If the field was not set prior to the call, then the returned UserProfileHandle will have none of its fields set (i.e. it will be identical to a newly-allocated UserProfileHandle). After calling this, has_user_handle() will return true and user_handle() will return a reference to the same instance of UserProfileHandle.
clear_user_handle()voidvoidClears the value of the field. After calling this, has_user_handle() will return false and user_handle() will return the default value.
set_allocated_user_handle()voidUserProfileHandle *Sets the UserProfileHandle object to the field and frees the previous field value if it exists. If the UserProfileHandle pointer is not NULL, the message takes ownership of the allocated UserProfileHandle object and has_ UserProfileHandle() will return true. Otherwise, if the user_handle is NULL, the behavior is the same as calling clear_user_handle().
release_user_handle()UserProfileHandle *voidReleases the ownership of the field and returns the pointer of the UserProfileHandle object. After calling this, caller takes the ownership of the allocated UserProfileHandle object, has_user_handle() will return false, and user_handle() will return the default value.
has_connection() constboolvoidReturns true if connection is set.
connection()const Connection&voidReturns the current value of connection. If connection is not set, returns a Connection with none of its fields set (possibly connection::default_instance()).
mutable_connection()Connection *voidReturns a pointer to the mutable Connection object that stores the field's value. If the field was not set prior to the call, then the returned Connection will have none of its fields set (i.e. it will be identical to a newly-allocated Connection). After calling this, has_connection() will return true and connection() will return a reference to the same instance of Connection.
clear_connection()voidvoidClears the value of the field. After calling this, has_connection() will return false and connection() will return the default value.
set_allocated_connection()voidConnection *Sets the Connection object to the field and frees the previous field value if it exists. If the Connection pointer is not NULL, the message takes ownership of the allocated Connection object and has_ Connection() will return true. Otherwise, if the connection is NULL, the behavior is the same as calling clear_connection().
release_connection()Connection *voidReleases the ownership of the field and returns the pointer of the Connection object. After calling this, caller takes the ownership of the allocated Connection object, has_connection() will return false, and connection() will return the default value.

Parent topic: Base (C++)