Cuberite
A lightweight, fast and extensible game server for Minecraft
FastNBT.h
Go to the documentation of this file.
1 
2 // FastNBT.h
3 
4 // Interfaces to the fast NBT parser and writer
5 
6 /*
7 The fast parser parses the data into a vector of cFastNBTTag structures. These structures describe the NBT tree,
8 but themselves are allocated in a vector, thus minimizing reallocation.
9 The structures have a minimal constructor, setting all member "pointers" to "invalid".
10 
11 The fast writer doesn't need a NBT tree structure built beforehand, it is commanded to open, append and close tags
12 (just like XML); it keeps the internal tag stack and reports errors in usage.
13 It directly outputs a string containing the serialized NBT data.
14 */
15 
16 
17 
18 
19 
20 #pragma once
21 
22 #include <system_error>
23 #include "../Endianness.h"
24 
25 
26 
27 
28 
30 {
31  TAG_Min = 0, // The minimum value for a tag type
32  TAG_End = 0,
33  TAG_Byte = 1,
34  TAG_Short = 2,
35  TAG_Int = 3,
36  TAG_Long = 4,
37  TAG_Float = 5,
41  TAG_List = 9,
44  TAG_Max = 11, // The maximum value for a tag type
45 } ;
46 
47 
48 
49 
50 
58 {
59 public:
60 
62 
63  // The following members are indices into the data stream. m_DataLength == 0 if no data available
64  // They must not be pointers, because the datastream may be copied into another AString object in the meantime.
65  size_t m_NameStart;
66  size_t m_NameLength;
67  size_t m_DataStart;
68  size_t m_DataLength;
69 
70  // The following members are indices into the array returned; -1 if not valid
71  // They must not be pointers, because pointers would not survive std::vector reallocation
72  int m_Parent;
77 
78  cFastNBTTag(eTagType a_Type, int a_Parent) :
79  m_Type(a_Type),
80  m_NameStart(0),
81  m_NameLength(0),
82  m_DataStart(0),
83  m_DataLength(0),
84  m_Parent(a_Parent),
85  m_PrevSibling(-1),
86  m_NextSibling(-1),
87  m_FirstChild(-1),
88  m_LastChild(-1)
89  {
90  }
91 
92  cFastNBTTag(eTagType a_Type, int a_Parent, int a_PrevSibling) :
93  m_Type(a_Type),
94  m_NameStart(0),
95  m_NameLength(0),
96  m_DataStart(0),
97  m_DataLength(0),
98  m_Parent(a_Parent),
99  m_PrevSibling(a_PrevSibling),
100  m_NextSibling(-1),
101  m_FirstChild(-1),
102  m_LastChild(-1)
103  {
104  }
105 } ;
106 
107 
108 
109 
110 
111 enum class eNBTParseError
112 {
113  npSuccess = 0,
114  npNeedBytes,
125  npUnknownTag,
126 };
127 
128 // The following is required to make an error_code constructible from an eNBTParseError
129 std::error_code make_error_code(eNBTParseError a_Err) noexcept;
130 
131 namespace std
132 {
133  template <>
134  struct is_error_code_enum<eNBTParseError>:
135  public std::true_type
136  {
137  };
138 }
139 
140 
141 
142 
143 
153 {
154 public:
156 
157  bool IsValid(void) const { return (m_Error == eNBTParseError::npSuccess); }
158 
160  std::error_code GetErrorCode() const { return m_Error; }
161 
163  size_t GetErrorPos() const { return m_Pos; }
164 
166  int GetRoot(void) const { return 0; }
167 
169  int GetFirstChild (int a_Tag) const { return m_Tags[static_cast<size_t>(a_Tag)].m_FirstChild; }
170 
172  int GetLastChild (int a_Tag) const { return m_Tags[static_cast<size_t>(a_Tag)].m_LastChild; }
173 
175  int GetNextSibling(int a_Tag) const { return m_Tags[static_cast<size_t>(a_Tag)].m_NextSibling; }
176 
178  int GetPrevSibling(int a_Tag) const { return m_Tags[static_cast<size_t>(a_Tag)].m_PrevSibling; }
179 
182  size_t GetDataLength(int a_Tag) const
183  {
184  ASSERT(m_Tags[static_cast<size_t>(a_Tag)].m_Type != TAG_List);
185  ASSERT(m_Tags[static_cast<size_t>(a_Tag)].m_Type != TAG_Compound);
186  return m_Tags[static_cast<size_t>(a_Tag)].m_DataLength;
187  }
188 
191  const std::byte * GetData(int a_Tag) const
192  {
193  ASSERT(m_Tags[static_cast<size_t>(a_Tag)].m_Type != TAG_List);
194  ASSERT(m_Tags[static_cast<size_t>(a_Tag)].m_Type != TAG_Compound);
195  return m_Data.data() + m_Tags[static_cast<size_t>(a_Tag)].m_DataStart;
196  }
197 
199  int FindChildByName(int a_Tag, const AString & a_Name) const
200  {
201  return FindChildByName(a_Tag, a_Name.c_str(), a_Name.length());
202  }
203 
205  int FindChildByName(int a_Tag, const char * a_Name, size_t a_NameLength = 0) const;
206 
208  int FindTagByPath(int a_Tag, const AString & a_Path) const;
209 
210  eTagType GetType(int a_Tag) const { return m_Tags[static_cast<size_t>(a_Tag)].m_Type; }
211 
213  eTagType GetChildrenType(int a_Tag) const
214  {
215  ASSERT(m_Tags[static_cast<size_t>(a_Tag)].m_Type == TAG_List);
216  return (m_Tags[static_cast<size_t>(a_Tag)].m_FirstChild < 0) ? TAG_End : m_Tags[static_cast<size_t>(m_Tags[static_cast<size_t>(a_Tag)].m_FirstChild)].m_Type;
217  }
218 
220  inline unsigned char GetByte(int a_Tag) const
221  {
222  ASSERT(m_Tags[static_cast<size_t>(a_Tag)].m_Type == TAG_Byte);
223  return static_cast<unsigned char>(m_Data[static_cast<size_t>(m_Tags[static_cast<size_t>(a_Tag)].m_DataStart)]);
224  }
225 
227  inline Int16 GetShort(int a_Tag) const
228  {
229  ASSERT(m_Tags[static_cast<size_t>(a_Tag)].m_Type == TAG_Short);
230  return GetBEShort(GetData(a_Tag));
231  }
232 
234  inline Int32 GetInt(int a_Tag) const
235  {
236  ASSERT(m_Tags[static_cast<size_t>(a_Tag)].m_Type == TAG_Int);
237  return GetBEInt(GetData(a_Tag));
238  }
239 
241  inline Int64 GetLong(int a_Tag) const
242  {
243  ASSERT(m_Tags[static_cast<size_t>(a_Tag)].m_Type == TAG_Long);
244  return NetworkToHostLong8(GetData(a_Tag));
245  }
246 
248  inline float GetFloat(int a_Tag) const
249  {
250  ASSERT(m_Tags[static_cast<size_t>(a_Tag)].m_Type == TAG_Float);
251 
252  // Cause a compile-time error if sizeof(float) != 4
253  // If your platform produces a compiler error here, you'll need to add code that manually decodes 32-bit floats
254  char Check1[5 - sizeof(float)]; // Fails if sizeof(float) > 4
255  char Check2[sizeof(float) - 3]; // Fails if sizeof(float) < 4
256  UNUSED_VAR(Check1);
257  UNUSED_VAR(Check2);
258 
259  Int32 i = GetBEInt(GetData(a_Tag));
260  float f;
261  memcpy(&f, &i, sizeof(f));
262  return f;
263  }
264 
266  inline double GetDouble(int a_Tag) const
267  {
268  // Cause a compile-time error if sizeof(double) != 8
269  // If your platform produces a compiler error here, you'll need to add code that manually decodes 64-bit doubles
270  char Check1[9 - sizeof(double)]; // Fails if sizeof(double) > 8
271  char Check2[sizeof(double) - 7]; // Fails if sizeof(double) < 8
272  UNUSED_VAR(Check1);
273  UNUSED_VAR(Check2);
274 
275  ASSERT(m_Tags[static_cast<size_t>(a_Tag)].m_Type == TAG_Double);
276  return NetworkToHostDouble8(GetData(a_Tag));
277  }
278 
280  inline AString GetString(int a_Tag) const
281  {
282  return AString(GetStringView(a_Tag));
283  }
284 
286  inline std::string_view GetStringView(int a_Tag) const
287  {
288  ASSERT(m_Tags[static_cast<size_t>(a_Tag)].m_Type == TAG_String);
289  return { reinterpret_cast<const char *>(GetData(a_Tag)), GetDataLength(a_Tag) };
290  }
291 
293  inline AString GetName(int a_Tag) const
294  {
295  AString res;
296  res.assign(reinterpret_cast<const char *>(m_Data.data()) + m_Tags[static_cast<size_t>(a_Tag)].m_NameStart, static_cast<size_t>(m_Tags[static_cast<size_t>(a_Tag)].m_NameLength));
297  return res;
298  }
299 
300 protected:
301 
303  std::vector<cFastNBTTag> m_Tags;
304  eNBTParseError m_Error; // npSuccess if parsing succeeded
305 
306  // Used while parsing:
307  size_t m_Pos;
308 
309  eNBTParseError Parse(void);
310  eNBTParseError ReadString(size_t & a_StringStart, size_t & a_StringLen); // Reads a simple string (2 bytes length + data), sets the string descriptors
311  eNBTParseError ReadCompound(void); // Reads the latest tag as a compound
312  eNBTParseError ReadList(eTagType a_ChildrenType); // Reads the latest tag as a list of items of type a_ChildrenType
313  eNBTParseError ReadTag(void); // Reads the latest tag, depending on its m_Type setting
314 
317  static size_t GetMinTagSize(eTagType a_TagType);
318 } ;
319 
320 
321 
322 
323 
325 {
326 public:
327  cFastNBTWriter(const AString & a_RootTagName = "");
328 
329  void BeginCompound(const AString & a_Name);
330  void EndCompound(void);
331 
332  void BeginList(const AString & a_Name, eTagType a_ChildrenType);
333  void EndList(void);
334 
335  void AddByte (const AString & a_Name, unsigned char a_Value);
336  void AddShort (const AString & a_Name, Int16 a_Value);
337  void AddInt (const AString & a_Name, Int32 a_Value);
338  void AddLong (const AString & a_Name, Int64 a_Value);
339  void AddFloat (const AString & a_Name, float a_Value);
340  void AddDouble (const AString & a_Name, double a_Value);
341  void AddString (const AString & a_Name, std::string_view a_Value);
342  void AddByteArray(const AString & a_Name, const char * a_Value, size_t a_NumElements);
343  void AddByteArray(const AString & a_Name, size_t a_NumElements, unsigned char a_Value);
344  void AddIntArray (const AString & a_Name, const Int32 * a_Value, size_t a_NumElements);
345 
346  void AddByteArray(const AString & a_Name, const AString & a_Value)
347  {
348  AddByteArray(a_Name, a_Value.data(), a_Value.size());
349  }
350 
352 
353  void Finish(void);
354 
355 protected:
356 
357  struct sParent
358  {
359  int m_Type; // TAG_Compound or TAG_List
360  int m_Pos; // for TAG_List, the position of the list count
361  int m_Count; // for TAG_List, the element count
362  eTagType m_ItemType; // for TAG_List, the element type
363  } ;
364 
365  static const int MAX_STACK = 50; // Highly doubtful that an NBT would be constructed this many levels deep
366 
367  // These two fields emulate a stack. A raw array is used due to speed issues - no reallocations are allowed.
370 
372 
373  bool IsStackTopCompound(void) const { return (m_Stack[m_CurrentStack].m_Type == TAG_Compound); }
374 
375  void WriteString(std::string_view a_Data);
376 
377  inline void TagCommon(const AString & a_Name, eTagType a_Type)
378  {
379  // If we're directly inside a list, check that the list is of the correct type:
380  ASSERT((m_Stack[m_CurrentStack].m_Type != TAG_List) || (m_Stack[m_CurrentStack].m_ItemType == a_Type));
381 
382  if (IsStackTopCompound())
383  {
384  // Compound: add the type and name:
385  m_Result.push_back(std::byte(a_Type));
386  WriteString(a_Name);
387  }
388  else
389  {
390  // List: add to the counter
392  }
393  }
394 } ;
cFastNBTWriter::AddIntArray
void AddIntArray(const AString &a_Name, const Int32 *a_Value, size_t a_NumElements)
Definition: FastNBT.cpp:652
cFastNBTWriter::sParent
Definition: FastNBT.h:357
cFastNBTTag::m_NameLength
size_t m_NameLength
Definition: FastNBT.h:66
cParsedNBT::GetType
eTagType GetType(int a_Tag) const
Definition: FastNBT.h:210
cParsedNBT::GetInt
Int32 GetInt(int a_Tag) const
Returns the value stored in an Int tag.
Definition: FastNBT.h:234
cFastNBTWriter::AddByteArray
void AddByteArray(const AString &a_Name, const AString &a_Value)
Definition: FastNBT.h:346
GetBEInt
int GetBEInt(const std::byte *const a_Mem)
Reads four bytes from the specified memory location and interprets them as BigEndian int.
Definition: StringUtils.cpp:1007
cParsedNBT::GetChildrenType
eTagType GetChildrenType(int a_Tag) const
Returns the children type for a List tag; undefined on other tags.
Definition: FastNBT.h:213
cFastNBTTag::m_Type
eTagType m_Type
Definition: FastNBT.h:61
cParsedNBT::GetString
AString GetString(int a_Tag) const
Returns the value stored in a String tag.
Definition: FastNBT.h:280
cFastNBTWriter::BeginList
void BeginList(const AString &a_Name, eTagType a_ChildrenType)
Definition: FastNBT.cpp:512
ContiguousByteBuffer
std::basic_string< std::byte > ContiguousByteBuffer
Definition: Globals.h:372
cParsedNBT::GetErrorPos
size_t GetErrorPos() const
Returns the position where an error occurred while parsing.
Definition: FastNBT.h:163
cParsedNBT::GetLong
Int64 GetLong(int a_Tag) const
Returns the value stored in a Long tag.
Definition: FastNBT.h:241
TAG_Compound
@ TAG_Compound
Definition: FastNBT.h:42
cFastNBTWriter::TagCommon
void TagCommon(const AString &a_Name, eTagType a_Type)
Definition: FastNBT.h:377
TAG_IntArray
@ TAG_IntArray
Definition: FastNBT.h:43
cFastNBTWriter::AddInt
void AddInt(const AString &a_Name, Int32 a_Value)
Definition: FastNBT.cpp:572
NetworkToHostDouble8
double NetworkToHostDouble8(const void *a_Value)
Definition: Endianness.h:36
eNBTParseError::npSuccess
@ npSuccess
cFastNBTWriter::AddDouble
void AddDouble(const AString &a_Name, double a_Value)
Definition: FastNBT.cpp:605
eNBTParseError::npNoTopLevelCompound
@ npNoTopLevelCompound
TAG_Long
@ TAG_Long
Definition: FastNBT.h:36
cFastNBTWriter
Definition: FastNBT.h:324
cFastNBTWriter::BeginCompound
void BeginCompound(const AString &a_Name)
Definition: FastNBT.cpp:481
eNBTParseError
eNBTParseError
Definition: FastNBT.h:111
cFastNBTWriter::GetResult
ContiguousByteBufferView GetResult(void) const
Definition: FastNBT.h:351
eNBTParseError::npStringInvalidLength
@ npStringInvalidLength
cFastNBTWriter::AddByteArray
void AddByteArray(const AString &a_Name, const char *a_Value, size_t a_NumElements)
Definition: FastNBT.cpp:628
eNBTParseError::npListMissingType
@ npListMissingType
NetworkToHostLong8
Int64 NetworkToHostLong8(const void *a_Value)
Definition: Endianness.h:50
cParsedNBT::GetPrevSibling
int GetPrevSibling(int a_Tag) const
Returns the previous sibling of the specified tag, or -1 if none.
Definition: FastNBT.h:178
cFastNBTTag::m_Parent
int m_Parent
Definition: FastNBT.h:72
cParsedNBT::GetDataLength
size_t GetDataLength(int a_Tag) const
Returns the length of the tag's data, in bytes.
Definition: FastNBT.h:182
TAG_Byte
@ TAG_Byte
Definition: FastNBT.h:33
cFastNBTWriter::IsStackTopCompound
bool IsStackTopCompound(void) const
Definition: FastNBT.h:373
cParsedNBT::GetErrorCode
std::error_code GetErrorCode() const
Returns the error code for the parsing of the NBT data.
Definition: FastNBT.h:160
cFastNBTWriter::m_Stack
sParent m_Stack[MAX_STACK]
Definition: FastNBT.h:368
eNBTParseError::npArrayInvalidLength
@ npArrayInvalidLength
cFastNBTTag::m_PrevSibling
int m_PrevSibling
Definition: FastNBT.h:73
cFastNBTTag::m_NextSibling
int m_NextSibling
Definition: FastNBT.h:74
cParsedNBT::GetNextSibling
int GetNextSibling(int a_Tag) const
Returns the next sibling of the specified tag, or -1 if none.
Definition: FastNBT.h:175
cFastNBTWriter::sParent::m_Type
int m_Type
Definition: FastNBT.h:359
cParsedNBT::FindChildByName
int FindChildByName(int a_Tag, const AString &a_Name) const
Returns the direct child tag of the specified name, or -1 if no such tag.
Definition: FastNBT.h:199
cParsedNBT::GetLastChild
int GetLastChild(int a_Tag) const
Returns the last child of the specified tag, or -1 if none / not applicable.
Definition: FastNBT.h:172
ASSERT
#define ASSERT(x)
Definition: Globals.h:273
cFastNBTWriter::WriteString
void WriteString(std::string_view a_Data)
Definition: FastNBT.cpp:684
cParsedNBT::ReadCompound
eNBTParseError ReadCompound(void)
Definition: FastNBT.cpp:202
TAG_Int
@ TAG_Int
Definition: FastNBT.h:35
cParsedNBT::cParsedNBT
cParsedNBT(ContiguousByteBufferView a_Data)
Definition: FastNBT.cpp:150
cParsedNBT::FindTagByPath
int FindTagByPath(int a_Tag, const AString &a_Path) const
Returns the child tag of the specified path (Name1 / Name2 / Name3...), or -1 if no such tag.
Definition: FastNBT.cpp:407
cFastNBTWriter::Finish
void Finish(void)
Definition: FastNBT.cpp:674
cFastNBTWriter::cFastNBTWriter
cFastNBTWriter(const AString &a_RootTagName="")
Definition: FastNBT.cpp:468
std
Definition: FastNBT.h:131
cFastNBTWriter::sParent::m_Pos
int m_Pos
Definition: FastNBT.h:360
cFastNBTTag::cFastNBTTag
cFastNBTTag(eTagType a_Type, int a_Parent)
Definition: FastNBT.h:78
cParsedNBT::GetByte
unsigned char GetByte(int a_Tag) const
Returns the value stored in a Byte tag.
Definition: FastNBT.h:220
cFastNBTTag::cFastNBTTag
cFastNBTTag(eTagType a_Type, int a_Parent, int a_PrevSibling)
Definition: FastNBT.h:92
cParsedNBT::GetFirstChild
int GetFirstChild(int a_Tag) const
Returns the first child of the specified tag, or -1 if none / not applicable.
Definition: FastNBT.h:169
cParsedNBT::IsValid
bool IsValid(void) const
Definition: FastNBT.h:157
cParsedNBT::ReadString
eNBTParseError ReadString(size_t &a_StringStart, size_t &a_StringLen)
Definition: FastNBT.cpp:188
cFastNBTWriter::EndList
void EndList(void)
Definition: FastNBT.cpp:536
GetBEShort
short GetBEShort(const std::byte *const a_Mem)
Reads two bytes from the specified memory location and interprets them as BigEndian short.
Definition: StringUtils.cpp:985
TAG_Max
@ TAG_Max
Definition: FastNBT.h:44
eNBTParseError::npListMissingLength
@ npListMissingLength
cParsedNBT::GetData
const std::byte * GetData(int a_Tag) const
Returns the data stored in this tag.
Definition: FastNBT.h:191
cParsedNBT::m_Pos
size_t m_Pos
Definition: FastNBT.h:307
cFastNBTWriter::sParent::m_Count
int m_Count
Definition: FastNBT.h:361
cFastNBTWriter::m_Result
ContiguousByteBuffer m_Result
Definition: FastNBT.h:371
cFastNBTTag::m_NameStart
size_t m_NameStart
Definition: FastNBT.h:65
ContiguousByteBufferView
std::basic_string_view< std::byte > ContiguousByteBufferView
Definition: Globals.h:373
cParsedNBT::GetName
AString GetName(int a_Tag) const
Returns the tag's name.
Definition: FastNBT.h:293
cParsedNBT::m_Data
ContiguousByteBufferView m_Data
Definition: FastNBT.h:302
TAG_Float
@ TAG_Float
Definition: FastNBT.h:37
eNBTParseError::npListInvalidLength
@ npListInvalidLength
Int32
signed int Int32
Definition: Globals.h:149
cParsedNBT::m_Tags
std::vector< cFastNBTTag > m_Tags
Definition: FastNBT.h:303
eNBTParseError::npStringMissingLength
@ npStringMissingLength
eNBTParseError::npNeedBytes
@ npNeedBytes
cFastNBTWriter::AddShort
void AddShort(const AString &a_Name, Int16 a_Value)
Definition: FastNBT.cpp:561
cFastNBTWriter::sParent::m_ItemType
eTagType m_ItemType
Definition: FastNBT.h:362
cParsedNBT::ReadList
eNBTParseError ReadList(eTagType a_ChildrenType)
Definition: FastNBT.cpp:244
cParsedNBT::GetDouble
double GetDouble(int a_Tag) const
Returns the value stored in a Double tag.
Definition: FastNBT.h:266
cFastNBTTag
This structure is used for all NBT tags.
Definition: FastNBT.h:57
TAG_ByteArray
@ TAG_ByteArray
Definition: FastNBT.h:39
eNBTParseError::npArrayMissingLength
@ npArrayMissingLength
cParsedNBT::GetMinTagSize
static size_t GetMinTagSize(eTagType a_TagType)
Returns the minimum size, in bytes, of the specified tag type.
Definition: FastNBT.cpp:441
cFastNBTTag::m_LastChild
int m_LastChild
Definition: FastNBT.h:76
cParsedNBT::GetStringView
std::string_view GetStringView(int a_Tag) const
Returns the value stored in a String tag.
Definition: FastNBT.h:286
TAG_End
@ TAG_End
Definition: FastNBT.h:32
TAG_List
@ TAG_List
Definition: FastNBT.h:41
cFastNBTTag::m_FirstChild
int m_FirstChild
Definition: FastNBT.h:75
eNBTParseError::npSimpleMissing
@ npSimpleMissing
Int64
signed long long Int64
Definition: Globals.h:148
cFastNBTWriter::AddString
void AddString(const AString &a_Name, std::string_view a_Value)
Definition: FastNBT.cpp:616
cParsedNBT::Parse
eNBTParseError Parse(void)
Definition: FastNBT.cpp:161
m_Type
eMonsterType m_Type
Definition: Monster.cpp:35
cParsedNBT::GetShort
Int16 GetShort(int a_Tag) const
Returns the value stored in a Short tag.
Definition: FastNBT.h:227
eNBTParseError::npCompoundImbalancedTag
@ npCompoundImbalancedTag
cFastNBTWriter::MAX_STACK
static const int MAX_STACK
Definition: FastNBT.h:365
cParsedNBT::m_Error
eNBTParseError m_Error
Definition: FastNBT.h:304
cParsedNBT::GetFloat
float GetFloat(int a_Tag) const
Returns the value stored in a Float tag.
Definition: FastNBT.h:248
cFastNBTWriter::EndCompound
void EndCompound(void)
Definition: FastNBT.cpp:499
eTagType
eTagType
Definition: FastNBT.h:29
TAG_Double
@ TAG_Double
Definition: FastNBT.h:38
cFastNBTWriter::AddLong
void AddLong(const AString &a_Name, Int64 a_Value)
Definition: FastNBT.cpp:583
cFastNBTWriter::AddFloat
void AddFloat(const AString &a_Name, float a_Value)
Definition: FastNBT.cpp:594
eNBTParseError::npUnknownTag
@ npUnknownTag
UNUSED_VAR
#define UNUSED_VAR(X)
Definition: Globals.h:65
cParsedNBT::GetRoot
int GetRoot(void) const
Returns the root tag of the hierarchy.
Definition: FastNBT.h:166
make_error_code
std::error_code make_error_code(eNBTParseError a_Err) noexcept
Definition: FastNBT.cpp:126
TAG_String
@ TAG_String
Definition: FastNBT.h:40
cParsedNBT
Parses and contains the parsed data Also implements data accessor functions for tree traversal and va...
Definition: FastNBT.h:152
AString
std::string AString
Definition: StringUtils.h:11
TAG_Min
@ TAG_Min
Definition: FastNBT.h:31
cFastNBTWriter::AddByte
void AddByte(const AString &a_Name, unsigned char a_Value)
Definition: FastNBT.cpp:551
cFastNBTTag::m_DataStart
size_t m_DataStart
Definition: FastNBT.h:67
cFastNBTTag::m_DataLength
size_t m_DataLength
Definition: FastNBT.h:68
Int16
signed short Int16
Definition: Globals.h:150
TAG_Short
@ TAG_Short
Definition: FastNBT.h:34
cFastNBTWriter::m_CurrentStack
int m_CurrentStack
Definition: FastNBT.h:369
cParsedNBT::ReadTag
eNBTParseError ReadTag(void)
Definition: FastNBT.cpp:294