summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/WorldStorage.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/WorldStorage/WorldStorage.h')
-rw-r--r--src/WorldStorage/WorldStorage.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/WorldStorage/WorldStorage.h b/src/WorldStorage/WorldStorage.h
index ab8a7f44b..e171aad43 100644
--- a/src/WorldStorage/WorldStorage.h
+++ b/src/WorldStorage/WorldStorage.h
@@ -37,11 +37,11 @@ class cWSSchema abstract
public:
cWSSchema(cWorld * a_World) : m_World(a_World) {}
virtual ~cWSSchema() {} // Force the descendants' destructors to be virtual
-
+
virtual bool LoadChunk(const cChunkCoords & a_Chunk) = 0;
virtual bool SaveChunk(const cChunkCoords & a_Chunk) = 0;
virtual const AString GetName(void) const = 0;
-
+
protected:
cWorld * m_World;
@@ -58,7 +58,7 @@ class cWorldStorage :
public cIsThread
{
typedef cIsThread super;
-
+
public:
cWorldStorage(void);
@@ -71,16 +71,16 @@ public:
/** Queues a chunk to be saved, asynchronously.
The callback, if specified, will be called with the result of the save operation. */
void QueueSaveChunk(int a_ChunkX, int a_ChunkZ, cChunkCoordCallback * a_Callback = nullptr);
-
+
bool Start(cWorld * a_World, const AString & a_StorageSchemaName, int a_StorageCompressionFactor); // Hide the cIsThread's Start() method, we need to provide args
void Stop(void); // Hide the cIsThread's Stop() method, we need to signal the event
void WaitForFinish(void);
void WaitForLoadQueueEmpty(void);
void WaitForSaveQueueEmpty(void);
-
+
size_t GetLoadQueueLength(void);
size_t GetSaveQueueLength(void);
-
+
protected:
cWorld * m_World;
@@ -88,27 +88,27 @@ protected:
cChunkCoordsQueue m_LoadQueue;
cChunkCoordsQueue m_SaveQueue;
-
+
/** All the storage schemas (all used for loading) */
cWSSchemaList m_Schemas;
-
+
/** The one storage schema used for saving */
cWSSchema * m_SaveSchema;
/** Set when there's any addition to the queues */
cEvent m_Event;
-
+
/** Loads the chunk specified; returns true on success, false on failure */
bool LoadChunk(int a_ChunkX, int a_ChunkZ);
void InitSchemas(int a_StorageCompressionFactor);
-
+
virtual void Execute(void) override;
-
+
/** Loads one chunk from the queue (if any queued); returns true if there are more chunks in the load queue */
bool LoadOneChunk(void);
-
+
/** Saves one chunk from the queue (if any queued); returns true if there are more chunks in the save queue */
bool SaveOneChunk(void);
} ;