class MapList

August 13, 2019 ยท View on GitHub

Member values

Member nameData typeDescription
map_listMapmap

Member functions

Function nameReturn typeInput typeDescription
map_list_size() constintvoidReturns the number of elements currently in the field.
map_list() constconst Mapint indexReturns 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 indexReturns 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*voidAdds 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()voidvoidRemoves all elements from the field. After calling this, map_list_size() will return zero.
map_list() constconst RepeatedPtrField< Map>&voidReturns the underlying RepeatedPtrField that stores the field's elements. This container class provides STL-like iterators and other methods.
mutable_map_list()RepeatedPtrField< Map>*voidReturns 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++)