Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
72
Server/RylServerProject/RylGameLibrary/Log/ParseLog.h
Normal file
72
Server/RylServerProject/RylGameLibrary/Log/ParseLog.h
Normal file
@@ -0,0 +1,72 @@
|
||||
#ifndef _PARSE_LOG_H_
|
||||
#define _PARSE_LOG_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
namespace GAMELOG
|
||||
{
|
||||
struct sLogBase;
|
||||
}
|
||||
|
||||
class CParseLog
|
||||
{
|
||||
public:
|
||||
|
||||
typedef std::vector<GAMELOG::sLogBase*> LogPtrArray;
|
||||
|
||||
CParseLog();
|
||||
~CParseLog();
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ε<EFBFBD><CEB5><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>м<EFBFBD><D0BC>ؼ<EFBFBD> <20>ִ´<D6B4>. <20><><EFBFBD>н<EFBFBD> <20><><EFBFBD><EFBFBD> <20>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||
bool LoadFile(const char* szFileName);
|
||||
void Destroy();
|
||||
|
||||
const LogPtrArray& GetLogPtrArray() const { return m_LogPtrArray; }
|
||||
|
||||
// Process. <20>Լ<EFBFBD><D4BC>ڸ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD> <20>Ϳ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||
template<typename FnProcess>
|
||||
void Process(FnProcess fnProcess)
|
||||
{
|
||||
std::for_each(m_LogPtrArray.begin(), m_LogPtrArray.end(), fnProcess);
|
||||
}
|
||||
|
||||
// <20>˻<EFBFBD>(TotalSet<65><74><EFBFBD><EFBFBD> Result<6C><74><EFBFBD><EFBFBD>)
|
||||
template<typename FnFind>
|
||||
void Find(LogPtrArray& Result, FnFind fnFind)
|
||||
{
|
||||
Result.clear();
|
||||
Result.reserve(m_LogPtrArray.size());
|
||||
|
||||
for(LogPtrArray::iterator itr = m_LogPtrArray.begin();
|
||||
itr != m_LogPtrArray.end(); ++itr)
|
||||
{
|
||||
if(fnFind(*itr)) { Result.push_back(*itr); }
|
||||
}
|
||||
}
|
||||
|
||||
// <20>˻<EFBFBD>(Source<63><65><EFBFBD><EFBFBD> <20>̾Ƴ<CCBE><C6B3><EFBFBD> Result<6C><74> <20><><EFBFBD><EFBFBD>)
|
||||
template<typename FnFind>
|
||||
static void Find(const LogPtrArray& Source, LogPtrArray& Result, FnFind fnFind)
|
||||
{
|
||||
Result.clear();
|
||||
Result.reserve(Source.size());
|
||||
|
||||
for(LogPtrArray::const_iterator itr = Source.begin();
|
||||
itr != Source.end(); ++itr)
|
||||
{
|
||||
if(fnFind(*itr)) { Result.push_back(*itr); }
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
bool Parse();
|
||||
|
||||
char* m_lpRawLog;
|
||||
unsigned long m_dwRawLogSize;
|
||||
LogPtrArray m_LogPtrArray;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user