class Mapping

August 13, 2019 ยท View on GitHub

Member values

Member nameData typeDescription
handleMappingHandleMapping handle (do not set on createMapping() call)
namestringMapping friendly name
controller_identifieruint32Associated controller identifier
active_map_group_handleMapGroupHandleCurrently active map group (not implemented yet)
map_group_handlesMapGroupHandleArray of associated map groups (not implemented yet)
active_map_handleMapHandleCurrently active map
map_handlesMapHandleArray of associated maps
application_datastringApplication data (reserved for use by Web App)

Member functions

Function nameReturn typeInput typeDescription
has_handle() constboolvoidReturns true if handle is set.
handle()const MappingHandle&voidReturns the current value of handle. If handle is not set, returns a MappingHandle with none of its fields set (possibly handle::default_instance()).
mutable_handle()MappingHandle *voidReturns a pointer to the mutable MappingHandle object that stores the field's value. If the field was not set prior to the call, then the returned MappingHandle will have none of its fields set (i.e. it will be identical to a newly-allocated MappingHandle). After calling this, has_handle() will return true and handle() will return a reference to the same instance of MappingHandle.
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()voidMappingHandle *Sets the MappingHandle object to the field and frees the previous field value if it exists. If the MappingHandle pointer is not NULL, the message takes ownership of the allocated MappingHandle object and has_ MappingHandle() will return true. Otherwise, if the handle is NULL, the behavior is the same as calling clear_handle().
release_handle()MappingHandle *voidReleases the ownership of the field and returns the pointer of the MappingHandle object. After calling this, caller takes the ownership of the allocated MappingHandle object, has_handle() will return false, and handle() will return the default value.
name()const string&voidReturns the current value of name. If name is not set, returns the empty string/empty bytes.
set_name()voidconst string&Sets the value of name. After calling this, name() will return a copy of value.
set_name()voidstring&&(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()voidconst 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 *voidReturns 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()voidvoidClears the value of name. After calling this, name() will return the empty string/empty bytes.
set_allocated_name()voidstring*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 *voidReleases 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.
controller_identifier()uint32voidReturns the current value of controller_identifier. If the controller_identifier is not set, returns 0.
set_controller_identifier()voiduint32Sets the value of controller_identifier. After calling this, controller_identifier() will return value.
clear_controller_identifier()voidvoidClears the value of controller_identifier. After calling this, controller_identifier() will return 0.
has_active_map_group_handle() constboolvoidReturns true if active_map_group_handle is set.
active_map_group_handle()const MapGroupHandle&voidReturns the current value of active_map_group_handle. If active_map_group_handle is not set, returns a MapGroupHandle with none of its fields set (possibly active_map_group_handle::default_instance()).
mutable_active_map_group_handle()MapGroupHandle *voidReturns a pointer to the mutable MapGroupHandle object that stores the field's value. If the field was not set prior to the call, then the returned MapGroupHandle will have none of its fields set (i.e. it will be identical to a newly-allocated MapGroupHandle). After calling this, has_active_map_group_handle() will return true and active_map_group_handle() will return a reference to the same instance of MapGroupHandle.
clear_active_map_group_handle()voidvoidClears the value of the field. After calling this, has_active_map_group_handle() will return false and active_map_group_handle() will return the default value.
set_allocated_active_map_group_handle()voidMapGroupHandle *Sets the MapGroupHandle object to the field and frees the previous field value if it exists. If the MapGroupHandle pointer is not NULL, the message takes ownership of the allocated MapGroupHandle object and has_ MapGroupHandle() will return true. Otherwise, if the active_map_group_handle is NULL, the behavior is the same as calling clear_active_map_group_handle().
release_active_map_group_handle()MapGroupHandle *voidReleases the ownership of the field and returns the pointer of the MapGroupHandle object. After calling this, caller takes the ownership of the allocated MapGroupHandle object, has_active_map_group_handle() will return false, and active_map_group_handle() will return the default value.
map_group_handles_size() constintvoidReturns the number of elements currently in the field.
map_group_handles() constconst MapGroupHandleint indexReturns the element at the given zero-based index. Calling this method with index outside of [0, map_group_handles_size()) yields undefined behavior.
mutable_map_group_handles()MapGroupHandle*int indexReturns a pointer to the mutable MapGroupHandle object that stores the value of the element at the given zero-based index. Calling this method with index outside of [0, map_group_handles_size()) yields undefined behavior.
add_map_group_handles()MapGroupHandle*voidAdds a new element and returns a pointer to it. The returned MapGroupHandle is mutable and will have none of its fields set (i.e. it will be identical to a newly-allocated MapGroupHandle).
clear_map_group_handles()voidvoidRemoves all elements from the field. After calling this, map_group_handles_size() will return zero.
map_group_handles() constconst RepeatedPtrField< MapGroupHandle>&voidReturns the underlying RepeatedPtrField that stores the field's elements. This container class provides STL-like iterators and other methods.
mutable_map_group_handles()RepeatedPtrField< MapGroupHandle>*voidReturns a pointer to the underlying mutable RepeatedPtrField that stores the field's elements. This container class provides STL-like iterators and other methods.
has_active_map_handle() constboolvoidReturns true if active_map_handle is set.
active_map_handle()const MapHandle&voidReturns the current value of active_map_handle. If active_map_handle is not set, returns a MapHandle with none of its fields set (possibly active_map_handle::default_instance()).
mutable_active_map_handle()MapHandle *voidReturns a pointer to the mutable MapHandle object that stores the field's value. If the field was not set prior to the call, then the returned MapHandle will have none of its fields set (i.e. it will be identical to a newly-allocated MapHandle). After calling this, has_active_map_handle() will return true and active_map_handle() will return a reference to the same instance of MapHandle.
clear_active_map_handle()voidvoidClears the value of the field. After calling this, has_active_map_handle() will return false and active_map_handle() will return the default value.
set_allocated_active_map_handle()voidMapHandle *Sets the MapHandle object to the field and frees the previous field value if it exists. If the MapHandle pointer is not NULL, the message takes ownership of the allocated MapHandle object and has_ MapHandle() will return true. Otherwise, if the active_map_handle is NULL, the behavior is the same as calling clear_active_map_handle().
release_active_map_handle()MapHandle *voidReleases the ownership of the field and returns the pointer of the MapHandle object. After calling this, caller takes the ownership of the allocated MapHandle object, has_active_map_handle() will return false, and active_map_handle() will return the default value.
map_handles_size() constintvoidReturns the number of elements currently in the field.
map_handles() constconst MapHandleint indexReturns the element at the given zero-based index. Calling this method with index outside of [0, map_handles_size()) yields undefined behavior.
mutable_map_handles()MapHandle*int indexReturns a pointer to the mutable MapHandle object that stores the value of the element at the given zero-based index. Calling this method with index outside of [0, map_handles_size()) yields undefined behavior.
add_map_handles()MapHandle*voidAdds a new element and returns a pointer to it. The returned MapHandle is mutable and will have none of its fields set (i.e. it will be identical to a newly-allocated MapHandle).
clear_map_handles()voidvoidRemoves all elements from the field. After calling this, map_handles_size() will return zero.
map_handles() constconst RepeatedPtrField< MapHandle>&voidReturns the underlying RepeatedPtrField that stores the field's elements. This container class provides STL-like iterators and other methods.
mutable_map_handles()RepeatedPtrField< MapHandle>*voidReturns a pointer to the underlying mutable RepeatedPtrField that stores the field's elements. This container class provides STL-like iterators and other methods.
application_data()const string&voidReturns the current value of application_data. If application_data is not set, returns the empty string/empty bytes.
set_application_data()voidconst string&Sets the value of application_data. After calling this, application_data() will return a copy of value.
set_application_data()voidstring&&(C++11 and beyond): Sets the value of application_data, moving from the passed string. After calling this, application_data() will return a copy of value.
set_application_data()voidconst char*Sets the value of application_data using a C-style null-terminated string. After calling this, application_data() will return a copy of value.
mutable_application_data()string *voidReturns a pointer to the mutable string object that stores application_data's value. If the field was not set prior to the call, then the returned string will be empty. After calling this, application_data() will return whatever value is written into the given string.
clear_application_data()voidvoidClears the value of application_data. After calling this, application_data() will return the empty string/empty bytes.
set_allocated_application_data()voidstring*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_application_data().
release_application_data()string *voidReleases the ownership of application_data and returns the pointer of the string object. After calling this, caller takes the ownership of the allocated string object and application_data() will return the empty string/empty bytes.

Parent topic: Base (C++)