From 8f18510dec4eab5f00e0ff311cf31ae2ce4f2d4d Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 6 Jul 2013 19:56:03 +0000 Subject: AnvilStats: moved into the Tools folder git-svn-id: http://mc-server.googlecode.com/svn/trunk@1658 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- AnvilStats/Processor.h | 77 -------------------------------------------------- 1 file changed, 77 deletions(-) delete mode 100644 AnvilStats/Processor.h (limited to 'AnvilStats/Processor.h') diff --git a/AnvilStats/Processor.h b/AnvilStats/Processor.h deleted file mode 100644 index b7d3f392e..000000000 --- a/AnvilStats/Processor.h +++ /dev/null @@ -1,77 +0,0 @@ - -// Processor.h - -// Interfaces to the cProcessor class representing the overall processor engine that manages threads, calls callbacks etc. - - - - -#pragma once - - - - - -// fwd: -class cCallback; -class cCallbackFactory; -class cParsedNBT; - - - - - -class cProcessor -{ - class cThread : - public cIsThread - { - typedef cIsThread super; - - cCallback & m_Callback; - cProcessor & m_ParentProcessor; - - // 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); - bool ProcessChunkTileEntities(int a_ChunkX, int a_ChunkZ, cParsedNBT & a_NBT, int a_LevelTag); - bool ProcessChunkTileTicks(int a_ChunkX, int a_ChunkZ, cParsedNBT & a_NBT, int a_LevelTag); - - public: - cThread(cCallback & a_Callback, cProcessor & a_ParentProcessor); - } ; - - typedef std::vector 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; - cEvent m_ThreadsHaveStarted; // This is signalled by each thread to notify the parent thread that it can start waiting for those threads - - void PopulateFileQueue(const AString & a_WorldFolder); - - AString GetOneFileName(void); -} ; - - - - -- cgit v1.2.3