summaryrefslogtreecommitdiffstats
path: root/Tools/AnvilStats/Processor.h
diff options
context:
space:
mode:
authorAlexander Lyons Harkness <me@bearbin.net>2017-12-23 13:49:08 +0100
committerAlexander Lyons Harkness <me@bearbin.net>2017-12-24 15:23:23 +0100
commit1926181cb7c8570fe57ec1b39d4241b9dd156333 (patch)
tree8ac9c6f24285846fa3f97f0a4ade9b0f9996f295 /Tools/AnvilStats/Processor.h
parentFixed item ID raw rabbit (#4103) (diff)
downloadcuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.tar
cuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.tar.gz
cuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.tar.bz2
cuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.tar.lz
cuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.tar.xz
cuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.tar.zst
cuberite-1926181cb7c8570fe57ec1b39d4241b9dd156333.zip
Diffstat (limited to '')
-rw-r--r--Tools/AnvilStats/Processor.h26
1 files changed, 11 insertions, 15 deletions
diff --git a/Tools/AnvilStats/Processor.h b/Tools/AnvilStats/Processor.h
index db50ec619..30f160404 100644
--- a/Tools/AnvilStats/Processor.h
+++ b/Tools/AnvilStats/Processor.h
@@ -27,20 +27,20 @@ class cProcessor
public cIsThread
{
typedef cIsThread super;
-
+
cCallback & m_Callback;
cProcessor & m_ParentProcessor;
cEvent m_HasStarted;
-
+
// cIsThread override:
virtual void Execute(void) override;
-
+
void ProcessFile(const AString & a_FileName);
void ProcessFileData(const char * a_FileData, size_t a_Size, int a_ChunkBaseX, int a_ChunkBaseZ);
void ProcessChunk(const char * a_FileData, int a_ChunkX, int a_ChunkZ, unsigned a_SectorStart, unsigned a_SectorSize, unsigned a_TimeStamp);
void ProcessCompressedChunkData(int a_ChunkX, int a_ChunkZ, const char * a_CompressedData, int a_CompressedSize);
void ProcessParsedChunkData(int a_ChunkX, int a_ChunkZ, cParsedNBT & a_NBT);
-
+
// The following processing parts return true if they were interrupted by the callback, causing the processing of current chunk to abort
bool ProcessChunkSections(int a_ChunkX, int a_ChunkZ, cParsedNBT & a_NBT, int a_LevelTag);
bool ProcessChunkEntities(int a_ChunkX, int a_ChunkZ, cParsedNBT & a_NBT, int a_LevelTag);
@@ -53,31 +53,27 @@ class cProcessor
/** Waits until the thread starts processing the callback code. */
void WaitForStart(void);
} ;
-
+
typedef std::vector<cThread *> cThreads;
-
+
public:
cProcessor(void);
~cProcessor();
-
+
void ProcessWorld(const AString & a_WorldFolder, cCallbackFactory & a_CallbackFactory);
-
+
protected:
bool m_IsShuttingDown; // If true, the threads should stop ASAP
-
+
cCriticalSection m_CS;
AStringList m_FileQueue;
-
+
cThreads m_Threads;
/** Populates m_FileQueue with Anvil files from the specified folder. */
void PopulateFileQueue(const AString & a_WorldFolder);
-
+
/** Returns one filename from m_FileQueue, and removes the name from the queue. */
AString GetOneFileName(void);
} ;
-
-
-
-