Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 1.66 KB

File metadata and controls

22 lines (16 loc) · 1.66 KB

class MapList

Member values

Member name Data type Description
map_list Map map

Member functions

Function name Return type Input type Description
map_list_size() const int void Returns the number of elements currently in the field.
map_list() const const Map int index Returns the element at the given zero-based index. Calling this method with index outside of [0, map_list_size()) yields undefined behavior.
mutable_map_list() Map* int index Returns a pointer to the mutable Map object that stores the value of the element at the given zero-based index. Calling this method with index outside of [0, map_list_size()) yields undefined behavior.
add_map_list() Map* void Adds a new element and returns a pointer to it. The returned Map is mutable and will have none of its fields set (i.e. it will be identical to a newly-allocated Map).
clear_map_list() void void Removes all elements from the field. After calling this, map_list_size() will return zero.
map_list() const const RepeatedPtrField< Map>& void Returns the underlying RepeatedPtrField that stores the field's elements. This container class provides STL-like iterators and other methods.
mutable_map_list() RepeatedPtrField< Map>* void Returns a pointer to the underlying mutable RepeatedPtrField that stores the field's elements. This container class provides STL-like iterators and other methods.

Parent topic: Base (C++)