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:
40
Server/RylServerProject/BaseLibrary/Pattern/Command.cpp
Normal file
40
Server/RylServerProject/BaseLibrary/Pattern/Command.cpp
Normal file
@@ -0,0 +1,40 @@
|
||||
#include "stdafx.h"
|
||||
#include "Command.h"
|
||||
|
||||
|
||||
CCommandProcess::CCommandProcess()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CCommandProcess::~CCommandProcess()
|
||||
{
|
||||
ClearAll();
|
||||
}
|
||||
|
||||
|
||||
void CCommandProcess::ProcessAll()
|
||||
{
|
||||
CMDList ProcessList;
|
||||
|
||||
m_CMDLock.Lock();
|
||||
ProcessList.splice(ProcessList.end(), m_CMDList);
|
||||
m_CMDLock.Unlock();
|
||||
|
||||
std::for_each(ProcessList.begin(), ProcessList.end(), std::mem_fun(&CCommand::DoProcess));
|
||||
std::for_each(ProcessList.begin(), ProcessList.end(), std::mem_fun(&CCommand::Destroy));
|
||||
}
|
||||
|
||||
|
||||
void CCommandProcess::ClearAll()
|
||||
{
|
||||
CMDLock::Syncronize sync(m_CMDLock);
|
||||
if(m_CMDList.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
std::for_each(m_CMDList.begin(), m_CMDList.end(), std::mem_fun(&CCommand::Destroy));
|
||||
m_CMDList.clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user