class InternalMetadata
Defined at line 43 of file ../../third_party/protobuf/src/google/protobuf/metadata_lite.h
This is the representation for messages that support arena allocation. It
uses a tagged pointer to either store the owning Arena pointer, if there are
no unknown fields, or a pointer to a block of memory with both the owning
Arena pointer and the UnknownFieldSet, if there are unknown fields. Besides,
it also uses the tag to distinguish whether the owning Arena pointer is also
used by sub-structure allocation. This optimization allows for
"zero-overhead" storage of the Arena pointer, relative to the above baseline
implementation.
The tagged pointer uses the least two significant bits to disambiguate cases.
It uses bit 0 == 0 to indicate an arena pointer and bit 0 == 1 to indicate a
UFS+Arena-container pointer. Besides it uses bit 1 == 0 to indicate arena
allocation and bit 1 == 1 to indicate heap allocation.
Public Methods
void InternalMetadata ()
Defined at line 45 of file ../../third_party/protobuf/src/google/protobuf/metadata_lite.h
void InternalMetadata (Arena * arena)
Defined at line 46 of file ../../third_party/protobuf/src/google/protobuf/metadata_lite.h
template <typename T>
void Delete ()
Delete will delete the unknown fields only if they weren't allocated on an
arena. Then it updates the flags so that if you call
have_unknown_fields(), it will return false.
It is designed to be used as part of a Message class's destructor call, so
that when control eventually gets to ~InternalMetadata(), we don't need to
check for have_unknown_fields() again.
Defined at line 58 of file ../../third_party/protobuf/src/google/protobuf/metadata_lite.h
Arena * arena ()
Defined at line 65 of file ../../third_party/protobuf/src/google/protobuf/metadata_lite.h
bool have_unknown_fields ()
Defined at line 73 of file ../../third_party/protobuf/src/google/protobuf/metadata_lite.h
void * raw_arena_ptr ()
Defined at line 77 of file ../../third_party/protobuf/src/google/protobuf/metadata_lite.h
template <typename T>
const T & unknown_fields (const T &(*)() default_instance)
Defined at line 82 of file ../../third_party/protobuf/src/google/protobuf/metadata_lite.h
template <typename T>
T * mutable_unknown_fields ()
Defined at line 92 of file ../../third_party/protobuf/src/google/protobuf/metadata_lite.h
template <typename T>
void Swap (InternalMetadata * other)
Defined at line 101 of file ../../third_party/protobuf/src/google/protobuf/metadata_lite.h
void InternalSwap (InternalMetadata *__restrict other)
Defined at line 113 of file ../../third_party/protobuf/src/google/protobuf/metadata_lite.h
template <typename T>
void MergeFrom (const InternalMetadata & other)
Defined at line 119 of file ../../third_party/protobuf/src/google/protobuf/metadata_lite.h
template <typename T>
void Clear ()
Defined at line 126 of file ../../third_party/protobuf/src/google/protobuf/metadata_lite.h