template <typename>
class RepeatedField
Defined at line 264 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
RepeatedField is used to represent repeated fields of a primitive type (in
other words, everything except strings and nested Messages). Most users will
not ever use a RepeatedField directly; they will use the get-by-index,
set-by-index, and add accessors that are generated for all repeated fields.
Actually, in addition to primitive types, we use RepeatedField for repeated
Cords, because the Cord class is in fact just a reference-counted pointer.
We have to specialize several methods in the Cord case to get the memory
management right; e.g. swapping when appropriate, etc.
Public Methods
void RepeatedField<type-parameter-0-0> (const RepeatedField<Element> & rhs)
Defined at line 303 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
void RepeatedField<type-parameter-0-0> (internal::InternalVisibility , internal::InternalMetadataOffset offset)
Arena enabled constructors: for internal use only.
Defined at line 312 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
void RepeatedField<type-parameter-0-0> (internal::InternalVisibility,internal::InternalMetadataOffsetoffset,const RepeatedField<Element> &rhs)
Defined at line 315 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
void RepeatedField<type-parameter-0-0> (RepeatedField<Element> && rhs)
Defined at line 323 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
const_reference operator[] (int index)
Defined at line 338 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
reference operator[] (int index)
Defined at line 342 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
reverse_iterator rbegin ()
Reverse iterator support
Defined at line 445 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
const_reverse_iterator rbegin ()
Defined at line 449 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
reverse_iterator rend ()
Defined at line 453 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
const_reverse_iterator rend ()
Defined at line 457 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
int SpaceUsedExcludingSelf ()
Defined at line 466 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
Arena * GetArena ()
Gets the Arena on which this RepeatedField stores its elements.
Defined at line 487 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
void RepeatedField<type-parameter-0-0> ()
implementation ====================================================
Defined at line 764 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
template <typename Iter, typename = typename std::enable_if<std::is_constructible< Element, decltype(*std::declval<Iter>())>::value>::type>
void RepeatedField<type-parameter-0-0> (Iter begin, Iter end)
Defined at line 804 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
RepeatedField<Element> & operator= (const RepeatedField<Element> & other)
Defined at line 834 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
RepeatedField<Element> & operator= (RepeatedField<Element> && other)
Defined at line 855 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
void ~RepeatedField<type-parameter-0-0> ()
Defined at line 812 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
bool empty ()
Defined at line 870 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
int size ()
Defined at line 875 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
const_reference Get (int index)
Defined at line 966 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
pointer Mutable (int index)
Defined at line 989 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
const_reference at (int index)
Defined at line 973 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
reference at (int index)
Defined at line 981 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
void Set (int index, const Element & value)
Defined at line 996 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
void Add (Element value)
Defined at line 1016 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
pointer Add ()
Appends a new element and returns a pointer to it.
The new element is uninitialized if |Element| is a POD type.
Defined at line 1062 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
template <typename Iter>
void Add (Iter begin, Iter end)
Appends elements in the range [begin, end) after reserving
the appropriate number of elements.
Defined at line 1155 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
template <typename ArenaProvider>
void InternalAddWithArena (internal::InternalVisibility,ArenaProviderarena_provider,Elementvalue)
The following APIs are for internal use only.
Defined at line 1021 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
template <typename ArenaProvider>
pointer InternalAddWithArena (internal::InternalVisibility , ArenaProvider arena_provider)
Defined at line 1067 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
void RemoveLast ()
Removes the last element in the array.
Defined at line 1182 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
void ExtractSubrange (intstart,intnum,Element *elements)
Extracts elements with indices in "[start .. start+num-1]".
Copies them into "elements[0 .. num-1]" if "elements" is not nullptr.
Caution: also moves elements with indices [start+num ..].
Calling this routine inside a loop can cause quadratic behavior.
Defined at line 1191 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
void Clear ()
Defined at line 1214 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
void MergeFrom (const RepeatedField<Element> & other)
Appends the elements from `other` after this instance.
The end result length will be `other.size() + this->size()`.
Defined at line 1222 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
void CopyFrom (const RepeatedField<Element> & other)
Replaces the contents with a copy of the elements from `other`.
Defined at line 1236 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
template <typename Iter>
void Assign (Iter begin, Iter end)
Replaces the contents with RepeatedField(begin, end).
Defined at line 1243 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
void Reserve (int new_size)
Reserves space to expand the field to at least the given size. If the
array is grown, it will always be at least doubled in size.
Defined at line 1500 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
void Truncate (int new_size)
Resizes the RepeatedField to a new, smaller size. This is O(1).
Except for RepeatedField
<Cord
>, for which it is O(size-new_size).
Defined at line 1589 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
void AddAlreadyReserved (Element value)
Defined at line 885 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
int Capacity ()
Defined at line 880 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
pointer AddAlreadyReserved ()
Adds `n` elements to this instance asserting there is enough capacity.
The added elements are uninitialized if `Element` is trivial.
Defined at line 894 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
pointer AddNAlreadyReserved (int n)
Defined at line 906 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
void Resize (size_type new_size, const Element & value)
Defined at line 924 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
void resize (size_type new_size)
Like STL resize. Uses value to fill appended elements.
Like Truncate() if new_size
<
= size(), otherwise this is
O(new_size - size()).
Defined at line 959 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
void resize (size_type new_size, const Element & value)
Defined at line 951 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
pointer mutable_data ()
Gets the underlying array. This pointer is possibly invalidated by
any add or remove operation.
Defined at line 1266 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
const_pointer data ()
Defined at line 1272 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
void Swap (RepeatedField<Element> * other)
Swaps entire contents with "other". If they are separate arenas, then
copies data between each other.
Defined at line 1304 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
void SwapElements (int index1, int index2)
Swaps two elements.
Defined at line 1338 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
iterator begin ()
Defined at line 1347 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
const_iterator begin ()
Defined at line 1352 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
const_iterator cbegin ()
Defined at line 1357 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
iterator end ()
Defined at line 1362 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
const_iterator end ()
Defined at line 1368 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
const_iterator cend ()
Defined at line 1374 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
size_t SpaceUsedExcludingSelfLong ()
Returns the number of bytes used by the repeated field, excluding
sizeof(*this)
Defined at line 1381 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
iterator erase (const_iterator position)
Removes the element referenced by position.
Returns an iterator to the element immediately following the removed
element.
Invalidates all iterators at or after the removed element, including end().
Defined at line 1250 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
iterator erase (const_iterator first, const_iterator last)
Removes the elements in the range [first, last).
Returns an iterator to the element immediately following the removed range.
Invalidates all iterators at or after the removed range, including end().
Defined at line 1256 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
void InternalSwap (RepeatedField<Element> * other)
For internal use only.
This is public due to it being called by generated code.
Defined at line 1278 of file ../../third_party/protobuf/src/src/google/protobuf/repeated_field.h
Friends
template <typename>
class UnknownFieldSet
template <typename>
class WireFormat
template <typename>
class TcParser
template <typename>
class EpsCopyInputStream
template <typename>
class Reflection
template <typename>
class DynamicMessage
template <typename>
class Arena
template <typename T>
class InternalHelper