Cuberite
A lightweight, fast and extensible game server for Minecraft
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
cFastNBTWriter Class Reference

#include <FastNBT.h>

Collaboration diagram for cFastNBTWriter:
Collaboration graph
[legend]

Classes

struct  sParent
 

Public Member Functions

void AddByte (const AString &a_Name, unsigned char a_Value)
 
void AddByteArray (const AString &a_Name, const AString &a_Value)
 
void AddByteArray (const AString &a_Name, const char *a_Value, size_t a_NumElements)
 
void AddByteArray (const AString &a_Name, size_t a_NumElements, unsigned char a_Value)
 
void AddDouble (const AString &a_Name, double a_Value)
 
void AddFloat (const AString &a_Name, float a_Value)
 
void AddInt (const AString &a_Name, Int32 a_Value)
 
void AddIntArray (const AString &a_Name, const Int32 *a_Value, size_t a_NumElements)
 
void AddLong (const AString &a_Name, Int64 a_Value)
 
void AddShort (const AString &a_Name, Int16 a_Value)
 
void AddString (const AString &a_Name, std::string_view a_Value)
 
void BeginCompound (const AString &a_Name)
 
void BeginList (const AString &a_Name, eTagType a_ChildrenType)
 
 cFastNBTWriter (const AString &a_RootTagName="")
 
void EndCompound (void)
 
void EndList (void)
 
void Finish (void)
 
ContiguousByteBufferView GetResult (void) const
 

Protected Member Functions

bool IsStackTopCompound (void) const
 
void TagCommon (const AString &a_Name, eTagType a_Type)
 
void WriteString (std::string_view a_Data)
 

Protected Attributes

int m_CurrentStack
 
ContiguousByteBuffer m_Result
 
sParent m_Stack [MAX_STACK]
 

Static Protected Attributes

static const int MAX_STACK = 50
 

Detailed Description

Definition at line 324 of file FastNBT.h.

Constructor & Destructor Documentation

◆ cFastNBTWriter()

cFastNBTWriter::cFastNBTWriter ( const AString a_RootTagName = "")

Definition at line 468 of file FastNBT.cpp.

Member Function Documentation

◆ AddByte()

void cFastNBTWriter::AddByte ( const AString a_Name,
unsigned char  a_Value 
)

Definition at line 551 of file FastNBT.cpp.

◆ AddByteArray() [1/3]

void cFastNBTWriter::AddByteArray ( const AString a_Name,
const AString a_Value 
)
inline

Definition at line 346 of file FastNBT.h.

◆ AddByteArray() [2/3]

void cFastNBTWriter::AddByteArray ( const AString a_Name,
const char *  a_Value,
size_t  a_NumElements 
)

Definition at line 628 of file FastNBT.cpp.

◆ AddByteArray() [3/3]

void cFastNBTWriter::AddByteArray ( const AString a_Name,
size_t  a_NumElements,
unsigned char  a_Value 
)

Definition at line 640 of file FastNBT.cpp.

◆ AddDouble()

void cFastNBTWriter::AddDouble ( const AString a_Name,
double  a_Value 
)

Definition at line 605 of file FastNBT.cpp.

◆ AddFloat()

void cFastNBTWriter::AddFloat ( const AString a_Name,
float  a_Value 
)

Definition at line 594 of file FastNBT.cpp.

◆ AddInt()

void cFastNBTWriter::AddInt ( const AString a_Name,
Int32  a_Value 
)

Definition at line 572 of file FastNBT.cpp.

◆ AddIntArray()

void cFastNBTWriter::AddIntArray ( const AString a_Name,
const Int32 a_Value,
size_t  a_NumElements 
)

Definition at line 652 of file FastNBT.cpp.

◆ AddLong()

void cFastNBTWriter::AddLong ( const AString a_Name,
Int64  a_Value 
)

Definition at line 583 of file FastNBT.cpp.

◆ AddShort()

void cFastNBTWriter::AddShort ( const AString a_Name,
Int16  a_Value 
)

Definition at line 561 of file FastNBT.cpp.

◆ AddString()

void cFastNBTWriter::AddString ( const AString a_Name,
std::string_view  a_Value 
)

Definition at line 616 of file FastNBT.cpp.

◆ BeginCompound()

void cFastNBTWriter::BeginCompound ( const AString a_Name)

Definition at line 481 of file FastNBT.cpp.

◆ BeginList()

void cFastNBTWriter::BeginList ( const AString a_Name,
eTagType  a_ChildrenType 
)

Definition at line 512 of file FastNBT.cpp.

◆ EndCompound()

void cFastNBTWriter::EndCompound ( void  )

Definition at line 499 of file FastNBT.cpp.

◆ EndList()

void cFastNBTWriter::EndList ( void  )

Definition at line 536 of file FastNBT.cpp.

◆ Finish()

void cFastNBTWriter::Finish ( void  )

Definition at line 674 of file FastNBT.cpp.

◆ GetResult()

ContiguousByteBufferView cFastNBTWriter::GetResult ( void  ) const
inline

Definition at line 351 of file FastNBT.h.

◆ IsStackTopCompound()

bool cFastNBTWriter::IsStackTopCompound ( void  ) const
inlineprotected

Definition at line 373 of file FastNBT.h.

◆ TagCommon()

void cFastNBTWriter::TagCommon ( const AString a_Name,
eTagType  a_Type 
)
inlineprotected

Definition at line 377 of file FastNBT.h.

◆ WriteString()

void cFastNBTWriter::WriteString ( std::string_view  a_Data)
protected

Definition at line 684 of file FastNBT.cpp.

Member Data Documentation

◆ m_CurrentStack

int cFastNBTWriter::m_CurrentStack
protected

Definition at line 369 of file FastNBT.h.

◆ m_Result

ContiguousByteBuffer cFastNBTWriter::m_Result
protected

Definition at line 371 of file FastNBT.h.

◆ m_Stack

sParent cFastNBTWriter::m_Stack[MAX_STACK]
protected

Definition at line 368 of file FastNBT.h.

◆ MAX_STACK

const int cFastNBTWriter::MAX_STACK = 50
staticprotected

Definition at line 365 of file FastNBT.h.


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