Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | Private Attributes | List of all members
cIDCountSerializer Class Reference

Utility class used to serialize item ID counts. More...

#include <MapSerializer.h>

Public Member Functions

 cIDCountSerializer (const AString &a_WorldName)
 
unsigned int GetMapCount (void) const
 
bool Load (void)
 Try to load the ID counts. More...
 
bool Save (void)
 Try to save the ID counts. More...
 
void SetMapCount (unsigned int a_MapCount)
 

Private Attributes

unsigned int m_MapCount
 
AString m_Path
 

Detailed Description

Utility class used to serialize item ID counts.

In order to perform bounds checking (while loading), the last registered ID of each item is serialized to an NBT file.

Definition at line 58 of file MapSerializer.h.

Constructor & Destructor Documentation

◆ cIDCountSerializer()

cIDCountSerializer::cIDCountSerializer ( const AString a_WorldName)

Definition at line 169 of file MapSerializer.cpp.

Member Function Documentation

◆ GetMapCount()

unsigned int cIDCountSerializer::GetMapCount ( void  ) const
inline

Definition at line 70 of file MapSerializer.h.

◆ Load()

bool cIDCountSerializer::Load ( void  )

Try to load the ID counts.

Definition at line 180 of file MapSerializer.cpp.

◆ Save()

bool cIDCountSerializer::Save ( void  )

Try to save the ID counts.

Definition at line 215 of file MapSerializer.cpp.

◆ SetMapCount()

void cIDCountSerializer::SetMapCount ( unsigned int  a_MapCount)
inline

Definition at line 72 of file MapSerializer.h.

Member Data Documentation

◆ m_MapCount

unsigned int cIDCountSerializer::m_MapCount
private

Definition at line 79 of file MapSerializer.h.

◆ m_Path

AString cIDCountSerializer::m_Path
private

Definition at line 77 of file MapSerializer.h.


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