Goby3  3.1.5a
2024.05.23
google::protobuf::Arena Class Reference

#include <google/protobuf/arena.h>

Classes

class  InternalHelper
 
struct  is_arena_constructable
 
struct  is_destructor_skippable
 

Public Member Functions

 Arena (const ArenaOptions &options)
 
 Arena ()
 
 ~Arena ()
 
void Init (const ArenaOptions &options)
 
uint64 SpaceAllocated () const
 
uint64 SpaceUsed () const
 
 PROTOBUF_RUNTIME_DEPRECATED ("Please use SpaceAllocated() and SpaceUsed()") std
 
template<typename T >
GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE void Own (T *object)
 
template<typename T >
GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE void OwnDestructor (T *object)
 
GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE void OwnCustomDestructor (void *object, void(*destruct)(void *))
 

Static Public Member Functions

template<typename T , typename... Args>
static GOOGLE_PROTOBUF_ATTRIBUTE_ALWAYS_INLINE T * CreateMessage (Arena *arena, Args &&... args)
 
template<typename T , typename... Args>
static GOOGLE_PROTOBUF_ATTRIBUTE_ALWAYS_INLINE T * Create (Arena *arena, Args &&... args)
 
template<typename T >
static GOOGLE_PROTOBUF_ATTRIBUTE_ALWAYS_INLINE T * CreateArray (Arena *arena, size_t num_elements)
 
template<typename T >
static GOOGLE_PROTOBUF_ATTRIBUTE_ALWAYS_INLINE ArenaGetArena (const T *value)
 

Static Public Attributes

static const size_t kBlockOverhead
 

Friends

template<typename Type >
class internal::GenericTypeHandler
 
struct internal::ArenaStringPtr
 
class internal::LazyField
 
class MessageLite
 
template<typename Key , typename T >
class Map
 

Detailed Description

Definition at line 244 of file arena.h.

Constructor & Destructor Documentation

◆ Arena() [1/2]

google::protobuf::Arena::Arena ( const ArenaOptions options)
inlineexplicit

Definition at line 248 of file arena.h.

◆ Arena() [2/2]

google::protobuf::Arena::Arena ( )
inline

Definition at line 263 of file arena.h.

◆ ~Arena()

google::protobuf::Arena::~Arena ( )
inline

Definition at line 265 of file arena.h.

Member Function Documentation

◆ Create()

template<typename T , typename... Args>
static GOOGLE_PROTOBUF_ATTRIBUTE_ALWAYS_INLINE T* google::protobuf::Arena::Create ( Arena arena,
Args &&...  args 
)
inlinestatic

Definition at line 321 of file arena.h.

◆ CreateArray()

template<typename T >
static GOOGLE_PROTOBUF_ATTRIBUTE_ALWAYS_INLINE T* google::protobuf::Arena::CreateArray ( Arena arena,
size_t  num_elements 
)
inlinestatic

Definition at line 334 of file arena.h.

◆ CreateMessage()

template<typename T , typename... Args>
static GOOGLE_PROTOBUF_ATTRIBUTE_ALWAYS_INLINE T* google::protobuf::Arena::CreateMessage ( Arena arena,
Args &&...  args 
)
inlinestatic

Definition at line 294 of file arena.h.

◆ GetArena()

template<typename T >
static GOOGLE_PROTOBUF_ATTRIBUTE_ALWAYS_INLINE Arena* google::protobuf::Arena::GetArena ( const T *  value)
inlinestatic

Definition at line 413 of file arena.h.

◆ Init()

void google::protobuf::Arena::Init ( const ArenaOptions options)
inline

Definition at line 271 of file arena.h.

◆ Own()

template<typename T >
GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE void google::protobuf::Arena::Own ( T *  object)
inline

Definition at line 383 of file arena.h.

◆ OwnCustomDestructor()

GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE void google::protobuf::Arena::OwnCustomDestructor ( void *  object,
void(*)(void *)  destruct 
)
inline

Definition at line 403 of file arena.h.

◆ OwnDestructor()

template<typename T >
GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE void google::protobuf::Arena::OwnDestructor ( T *  object)
inline

Definition at line 393 of file arena.h.

◆ PROTOBUF_RUNTIME_DEPRECATED()

google::protobuf::Arena::PROTOBUF_RUNTIME_DEPRECATED ( "Please use SpaceAllocated() and SpaceUsed()"  )
inline

Definition at line 362 of file arena.h.

◆ SpaceAllocated()

uint64 google::protobuf::Arena::SpaceAllocated ( ) const
inline

Definition at line 352 of file arena.h.

◆ SpaceUsed()

uint64 google::protobuf::Arena::SpaceUsed ( ) const
inline

Definition at line 357 of file arena.h.

Friends And Related Function Documentation

◆ internal::ArenaStringPtr

friend struct internal::ArenaStringPtr
friend

Definition at line 690 of file arena.h.

◆ internal::GenericTypeHandler

template<typename Type >
friend class internal::GenericTypeHandler
friend

Definition at line 689 of file arena.h.

◆ internal::LazyField

friend class internal::LazyField
friend

Definition at line 691 of file arena.h.

◆ Map

template<typename Key , typename T >
friend class Map
friend

Definition at line 694 of file arena.h.

◆ MessageLite

friend class MessageLite
friend

Definition at line 692 of file arena.h.

Member Data Documentation

◆ kBlockOverhead

const size_t google::protobuf::Arena::kBlockOverhead
static
Initial value:
= internal::ArenaImpl::kBlockHeaderSize +
internal::ArenaImpl::kSerialArenaSize

Definition at line 258 of file arena.h.


The documentation for this class was generated from the following files: