HPC_Voxel_Engine 0.2.0
High-Performance C++ Voxel Engine
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
RegionManager Class Reference

#include <src/world/RegionManager.h>

Collaboration diagram for RegionManager:
Collaboration graph

Public Member Functions

 RegionManager (const std::string &strWorldDir)
 
 ~RegionManager ()
 
bool SaveChunk (const Chunk &objChunk)
 
bool LoadChunk (Chunk &objChunk)
 

Private Member Functions

std::string getRegionFileName (int iChunkX, int iChunkZ) const
 
std::fstream * getRegionFile (int iChunkX, int iChunkZ)
 
std::pair< int, int > getRegionCoords (int iChunkX, int iChunkZ) const
 

Private Attributes

std::string m_strWorldDir
 
std::unordered_map< std::string, std::fstream * > m_mapOpenFiles
 
std::mutex m_mutexIO
 

Constructor & Destructor Documentation

◆ RegionManager()

RegionManager::RegionManager ( const std::string &  strWorldDir)

◆ ~RegionManager()

RegionManager::~RegionManager ( )

Member Function Documentation

◆ getRegionCoords()

std::pair< int, int > RegionManager::getRegionCoords ( int  iChunkX,
int  iChunkZ 
) const
inlineprivate
Here is the caller graph for this function:

◆ getRegionFile()

std::fstream * RegionManager::getRegionFile ( int  iChunkX,
int  iChunkZ 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRegionFileName()

std::string RegionManager::getRegionFileName ( int  iChunkX,
int  iChunkZ 
) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadChunk()

bool RegionManager::LoadChunk ( Chunk objChunk)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SaveChunk()

bool RegionManager::SaveChunk ( const Chunk objChunk)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_mapOpenFiles

std::unordered_map<std::string, std::fstream*> RegionManager::m_mapOpenFiles
private

◆ m_mutexIO

std::mutex RegionManager::m_mutexIO
private

◆ m_strWorldDir

std::string RegionManager::m_strWorldDir
private

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