Arcane  4.1.11.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
Référence du modèle de la structure GenericMemoryBuffer< Allocator >

Represents an in-memory output byte stream. Plus de détails...

#include </__w/arcaneframework.github.io/arcaneframework.github.io/framework/arccore/src/common/arccore/common/internal/json/rapidjson/memorybuffer.h>

Graphe de collaboration de GenericMemoryBuffer< Allocator >:

Types publics

typedef char Ch

Fonctions membres publiques

 GenericMemoryBuffer (Allocator *allocator=0, size_t capacity=kDefaultCapacity)
void Put (Ch c)
void Flush ()
void Clear ()
void ShrinkToFit ()
Ch * Push (size_t count)
void Pop (size_t count)
const Ch * GetBuffer () const
size_t GetSize () const

Attributs publics

internal::Stack< Allocatorstack_

Attributs publics statiques

static const size_t kDefaultCapacity = 256

Description détaillée

template<typename Allocator = CrtAllocator>
struct GenericMemoryBuffer< Allocator >

Represents an in-memory output byte stream.

This class is mainly for being wrapped by EncodedOutputStream or AutoUTFOutputStream.

It is similar to FileWriteBuffer but the destination is an in-memory buffer instead of a file.

Differences between MemoryBuffer and StringBuffer:

  1. StringBuffer has Encoding but MemoryBuffer is only a byte buffer.
  2. StringBuffer::GetString() returns a null-terminated string. MemoryBuffer::GetBuffer() returns a buffer without terminator.
Paramètres du template
Allocatortype for allocating memory buffer.
Note
implements Stream concept

Définition à la ligne 38 du fichier memorybuffer.h.

Documentation des définitions de type membres

◆ Ch

template<typename Allocator = CrtAllocator>
typedef char GenericMemoryBuffer< Allocator >::Ch

Définition à la ligne 39 du fichier memorybuffer.h.

Documentation des constructeurs et destructeur

◆ GenericMemoryBuffer()

template<typename Allocator = CrtAllocator>
GenericMemoryBuffer< Allocator >::GenericMemoryBuffer ( Allocator * allocator = 0,
size_t capacity = kDefaultCapacity )
inline

Définition à la ligne 41 du fichier memorybuffer.h.

Documentation des fonctions membres

◆ Clear()

template<typename Allocator = CrtAllocator>
void GenericMemoryBuffer< Allocator >::Clear ( )
inline

Définition à la ligne 46 du fichier memorybuffer.h.

◆ Flush()

template<typename Allocator = CrtAllocator>
void GenericMemoryBuffer< Allocator >::Flush ( )
inline

Définition à la ligne 44 du fichier memorybuffer.h.

◆ GetBuffer()

template<typename Allocator = CrtAllocator>
const Ch * GenericMemoryBuffer< Allocator >::GetBuffer ( ) const
inline

Définition à la ligne 51 du fichier memorybuffer.h.

◆ GetSize()

template<typename Allocator = CrtAllocator>
size_t GenericMemoryBuffer< Allocator >::GetSize ( ) const
inline

Définition à la ligne 55 du fichier memorybuffer.h.

◆ Pop()

template<typename Allocator = CrtAllocator>
void GenericMemoryBuffer< Allocator >::Pop ( size_t count)
inline

Définition à la ligne 49 du fichier memorybuffer.h.

◆ Push()

template<typename Allocator = CrtAllocator>
Ch * GenericMemoryBuffer< Allocator >::Push ( size_t count)
inline

Définition à la ligne 48 du fichier memorybuffer.h.

◆ Put()

template<typename Allocator = CrtAllocator>
void GenericMemoryBuffer< Allocator >::Put ( Ch c)
inline

Définition à la ligne 43 du fichier memorybuffer.h.

◆ ShrinkToFit()

template<typename Allocator = CrtAllocator>
void GenericMemoryBuffer< Allocator >::ShrinkToFit ( )
inline

Définition à la ligne 47 du fichier memorybuffer.h.

Documentation des données membres

◆ kDefaultCapacity

template<typename Allocator = CrtAllocator>
const size_t GenericMemoryBuffer< Allocator >::kDefaultCapacity = 256
static

Définition à la ligne 57 du fichier memorybuffer.h.

◆ stack_

template<typename Allocator = CrtAllocator>
internal::Stack<Allocator> GenericMemoryBuffer< Allocator >::stack_
mutable

Définition à la ligne 58 du fichier memorybuffer.h.


La documentation de cette structure a été générée à partir des fichiers suivants :