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

Utility class used to serialize maps. More...

#include <MapSerializer.h>

Collaboration diagram for cMapSerializer:
Collaboration graph
[legend]

Public Member Functions

 cMapSerializer (const AString &a_WorldName, cMap *a_Map)
 
bool Load (void)
 Try to load the map. More...
 
bool Save (void)
 Try to save the map. More...
 

Private Member Functions

bool LoadMapFromNBT (const cParsedNBT &a_NBT)
 
void SaveMapToNBT (cFastNBTWriter &a_Writer)
 

Private Attributes

cMapm_Map
 
AString m_Path
 

Detailed Description

Utility class used to serialize maps.

Definition at line 25 of file MapSerializer.h.

Constructor & Destructor Documentation

◆ cMapSerializer()

cMapSerializer::cMapSerializer ( const AString a_WorldName,
cMap a_Map 
)

Definition at line 17 of file MapSerializer.cpp.

Member Function Documentation

◆ Load()

bool cMapSerializer::Load ( void  )

Try to load the map.

Definition at line 29 of file MapSerializer.cpp.

◆ LoadMapFromNBT()

bool cMapSerializer::LoadMapFromNBT ( const cParsedNBT a_NBT)
private

Definition at line 90 of file MapSerializer.cpp.

◆ Save()

bool cMapSerializer::Save ( void  )

Try to save the map.

Definition at line 47 of file MapSerializer.cpp.

◆ SaveMapToNBT()

void cMapSerializer::SaveMapToNBT ( cFastNBTWriter a_Writer)
private

Definition at line 67 of file MapSerializer.cpp.

Member Data Documentation

◆ m_Map

cMap* cMapSerializer::m_Map
private

Definition at line 44 of file MapSerializer.h.

◆ m_Path

AString cMapSerializer::m_Path
private

Definition at line 46 of file MapSerializer.h.


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