template <typename Key, typename Value, WireFormatLite::FieldType kKeyFieldType, WireFormatLite::FieldType kValueFieldType>
class MapEntry
Defined at line 67 of file ../../third_party/protobuf/src/google/protobuf/map_entry.h
MapEntry is the returned google::protobuf::Message when calling AddMessage of
google::protobuf::Reflection. In order to let it work with generated message
reflection, its in-memory type is the same as generated message with the same
fields. However, in order to decide the in-memory type of key/value, we need
to know both their cpp type in generated api and proto type. In
implementation, all in-memory types have related wire format functions to
support except ArenaStringPtr. Therefore, we need to define another type with
supporting wire format functions. Since this type is only used as return type
of MapEntry accessors, it's named MapEntry accessor type.
cpp type: the type visible to users in public API.
proto type: WireFormatLite::FieldType of the field.
in-memory type: type of the data member used to stored this field.
MapEntry accessor type: type used in MapEntry getters/mutators to access the
field.
cpp type | proto type | in-memory type | MapEntry accessor type
int32_t TYPE_INT32 int32_t int32_t
int32_t TYPE_FIXED32 int32_t int32_t
string TYPE_STRING ArenaStringPtr string
FooEnum TYPE_ENUM int int
FooMessage TYPE_MESSAGE FooMessage* FooMessage
The in-memory types of primitive types can be inferred from its proto type,
while we need to explicitly specify the cpp type if proto type is
TYPE_MESSAGE to infer the in-memory type.
Protected Members
_impl_
Public Methods
void MapEntry<Key, Value, kKeyFieldType, kValueFieldType> ()
Defined at line 80 of file ../../third_party/protobuf/src/google/protobuf/map_entry.h
void MapEntry<Key, Value, kKeyFieldType, kValueFieldType> (const MapEntry<Key, Value, kKeyFieldType, kValueFieldType> & )
Defined at line 84 of file ../../third_party/protobuf/src/google/protobuf/map_entry.h
MapEntry<Key, Value, kKeyFieldType, kValueFieldType> & operator= (const MapEntry<Key, Value, kKeyFieldType, kValueFieldType> & )
Defined at line 85 of file ../../third_party/protobuf/src/google/protobuf/map_entry.h
void ~MapEntry<Key, Value, kKeyFieldType, kValueFieldType> ()
Defined at line 87 of file ../../third_party/protobuf/src/google/protobuf/map_entry.h
Protected Methods
void SharedDtor (MessageLite & msg)
Defined at line 108 of file ../../third_party/protobuf/src/google/protobuf/map_entry.h
Records
Friends
template <typename Keytypename ValueWireFormatLite::FieldType kKeyFieldTypeWireFormatLite::FieldType kValueFieldType>
class Arena