Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 2.47 KB

File metadata and controls

21 lines (15 loc) · 2.47 KB

class SafetyEvent

Member values

Member name Data type Description
safety_handle SafetyHandle Safety that caused the event to occur

Member functions

Function name Return type Input type Description
has_safety_handle() const bool void Returns true if safety_handle is set.
safety_handle() const SafetyHandle& void Returns the current value of safety_handle. If safety_handle is not set, returns a SafetyHandle with none of its fields set (possibly safety_handle::default_instance()).
mutable_safety_handle() SafetyHandle * void Returns a pointer to the mutable SafetyHandle object that stores the field's value. If the field was not set prior to the call, then the returned SafetyHandle will have none of its fields set (i.e. it will be identical to a newly-allocated SafetyHandle). After calling this, has_safety_handle() will return true and safety_handle() will return a reference to the same instance of SafetyHandle.
clear_safety_handle() void void Clears the value of the field. After calling this, has_safety_handle() will return false and safety_handle() will return the default value.
set_allocated_safety_handle() void SafetyHandle * Sets the SafetyHandle object to the field and frees the previous field value if it exists. If the SafetyHandle pointer is not NULL, the message takes ownership of the allocated SafetyHandle object and has_ SafetyHandle() will return true. Otherwise, if the safety_handle is NULL, the behavior is the same as calling clear_safety_handle().
release_safety_handle() SafetyHandle * void Releases the ownership of the field and returns the pointer of the SafetyHandle object. After calling this, caller takes the ownership of the allocated SafetyHandle object, has_safety_handle() will return false, and safety_handle() will return the default value.

Parent topic: Base (C++)