Skip to content

Latest commit

 

History

History
37 lines (31 loc) · 8.26 KB

File metadata and controls

37 lines (31 loc) · 8.26 KB

class Waypoint

Member values

Member name Data type Description
name string Waypoint friendly name
angular_waypoint oneof:type_of_waypoint AngularWaypoint  
cartesian_waypoint oneof:type_of_waypoint CartesianWaypoint  

Member functions

Function name Return type Input type Description
name() const string& void Returns the current value of name. If name is not set, returns the empty string/empty bytes.
set_name() void const string& Sets the value of name. After calling this, name() will return a copy of value.
set_name() void string&& (C++11 and beyond): Sets the value of name, moving from the passed string. After calling this, name() will return a copy of value.
set_name() void const char* Sets the value of name using a C-style null-terminated string. After calling this, name() will return a copy of value.
mutable_name() string * void Returns a pointer to the mutable string object that stores name's value. If the field was not set prior to the call, then the returned string will be empty. After calling this, name() will return whatever value is written into the given string.
clear_name() void void Clears the value of name. After calling this, name() will return the empty string/empty bytes.
set_allocated_name() void string* Sets the string object to the field and frees the previous field value if it exists. If the string pointer is not NULL, the message takes ownership of the allocated string object. The message is free to delete the allocated string object at any time, so references to the object may be invalidated. Otherwise, if the value is NULL, the behavior is the same as calling clear_name().
release_name() string * void Releases the ownership of name and returns the pointer of the string object. After calling this, caller takes the ownership of the allocated string object and name() will return the empty string/empty bytes.
has_angular_waypoint() const void void Returns the current value of the field if oneof case is kAngular_waypoint. Otherwise, returns oneof:type_of_waypoint AngularWaypoint::default_instance()
angular_waypoint() const const oneof:type_of_waypoint AngularWaypoint& void Returns the current value of the field if oneof case is kAngular_waypoint
mutable_angular_waypoint() oneof:type_of_waypoint AngularWaypoint* void If any other oneof field in the same oneof is set, calls clear_type_of_waypoint(). Sets the oneof case to kAngular_waypoint and returns a pointer to the mutable oneof:type_of_waypoint AngularWaypoint object that stores the field's value. If the oneof case was not kAngular_waypoint prior to the call, then the returned oneof:type_of_waypoint AngularWaypoint will have none of its fields set (i.e. it will be identical to a newly-allocated oneof:type_of_waypoint AngularWaypoint). After calling this, has_angular_waypoint() will return true, angular_waypoint() will return a reference to the same instance of oneof:type_of_waypoint AngularWaypoint and type_of_waypoint_case() will return kAngular_waypoint
clear_angular_waypoint() void void Nothing will be changed if the oneof case is not kAngular_waypoint. If the oneof case equals kAngular_waypoint, frees the field and clears the oneof case. has_angular_waypoint() will return false, angular_waypoint() will return the default value and type_of_waypoint_case() will return TYPE_OF_WAYPOINT_NOT_SET.
set_allocated_angular_waypoint() void oneof:type_of_waypoint AngularWaypoint* Calls clear_type_of_waypoint(). If the oneof:type_of_waypoint AngularWaypoint pointer is not NULL: Sets the oneof:type_of_waypoint AngularWaypoint object to the field and sets the oneof case to kAngular_waypoint. The message takes ownership of the allocated oneof:type_of_waypoint AngularWaypoint object, has_angular_waypoint() will return true and type_of_waypoint_case() will return kAngular_waypoint. If the pointer is NULL, has_angular_waypoint() will return false and type_of_waypoint_case() will return TYPE_OF_WAYPOINT_NOT_SET. (The behavior is like calling clear_type_of_waypoint())
release_angular_waypoint() oneof:type_of_waypoint AngularWaypoint* void Returns NULL if oneof case is not kAngular_waypoint. If the oneof case is kAngular_waypoint, clears the oneof case, releases the ownership of the field and returns the pointer of the type_of_waypoint object. After calling this, caller takes the ownership of the allocated type_of_waypoint object, has_angular_waypoint() will return false, angular_waypoint() will return the default value and type_of_waypoint_case() will return TYPE_OF_WAYPOINT_NOT_SET.
has_cartesian_waypoint() const void void Returns the current value of the field if oneof case is kCartesian_waypoint. Otherwise, returns oneof:type_of_waypoint CartesianWaypoint::default_instance()
cartesian_waypoint() const const oneof:type_of_waypoint CartesianWaypoint& void Returns the current value of the field if oneof case is kCartesian_waypoint
mutable_cartesian_waypoint() oneof:type_of_waypoint CartesianWaypoint* void If any other oneof field in the same oneof is set, calls clear_type_of_waypoint(). Sets the oneof case to kCartesian_waypoint and returns a pointer to the mutable oneof:type_of_waypoint CartesianWaypoint object that stores the field's value. If the oneof case was not kCartesian_waypoint prior to the call, then the returned oneof:type_of_waypoint CartesianWaypoint will have none of its fields set (i.e. it will be identical to a newly-allocated oneof:type_of_waypoint CartesianWaypoint). After calling this, has_cartesian_waypoint() will return true, cartesian_waypoint() will return a reference to the same instance of oneof:type_of_waypoint CartesianWaypoint and type_of_waypoint_case() will return kCartesian_waypoint
clear_cartesian_waypoint() void void Nothing will be changed if the oneof case is not kCartesian_waypoint. If the oneof case equals kCartesian_waypoint, frees the field and clears the oneof case. has_cartesian_waypoint() will return false, cartesian_waypoint() will return the default value and type_of_waypoint_case() will return TYPE_OF_WAYPOINT_NOT_SET.
set_allocated_cartesian_waypoint() void oneof:type_of_waypoint CartesianWaypoint* Calls clear_type_of_waypoint(). If the oneof:type_of_waypoint CartesianWaypoint pointer is not NULL: Sets the oneof:type_of_waypoint CartesianWaypoint object to the field and sets the oneof case to kCartesian_waypoint. The message takes ownership of the allocated oneof:type_of_waypoint CartesianWaypoint object, has_cartesian_waypoint() will return true and type_of_waypoint_case() will return kCartesian_waypoint. If the pointer is NULL, has_cartesian_waypoint() will return false and type_of_waypoint_case() will return TYPE_OF_WAYPOINT_NOT_SET. (The behavior is like calling clear_type_of_waypoint())
release_cartesian_waypoint() oneof:type_of_waypoint CartesianWaypoint* void Returns NULL if oneof case is not kCartesian_waypoint. If the oneof case is kCartesian_waypoint, clears the oneof case, releases the ownership of the field and returns the pointer of the type_of_waypoint object. After calling this, caller takes the ownership of the allocated type_of_waypoint object, has_cartesian_waypoint() will return false, cartesian_waypoint() will return the default value and type_of_waypoint_case() will return TYPE_OF_WAYPOINT_NOT_SET.

Parent topic: Base (C++)