template <typename T>
struct FieldArenaRep
Defined at line 107 of file ../../third_party/protobuf/src/src/google/protobuf/arena.h
This struct maps field types to the types that we will use to represent them
when allocated on an arena. This is necessary because fields no longer own an
arena pointer, but can be allocated directly on an arena. In this case, we
will use a wrapper class that holds both the arena pointer and the field, and
points the field to the arena pointer.
Additionally, split pointer fields will use this representation when
allocated, regardless of whether they are on an arena or not.
For example:
```
template
<
>
struct FieldArenaRep
<Message
> {
using Type = ArenaMessage;
static Message* Get(ArenaMessage* arena_rep) {
return
&arena
_rep->message();
}
};
```
Public Methods
T * Get (Type * arena_rep)
Returns a pointer to the field from the arena representation. By default,
this is just a no-op, but can be specialized to extract the field from the
wrapper class.
Defined at line 116 of file ../../third_party/protobuf/src/src/google/protobuf/arena.h