DragonNest/Server/ServiceManager/GsmCmdProcess.h
2024-12-20 16:56:44 +08:00

37 lines
No EOL
1.2 KiB
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.


#pragma once
typedef void (*GSM_PROC)();
struct TGSMCmd
{
std::string strCmd;
std::string strRespectCmd;
ULONG nCmdTick;
GSM_PROC pfCall;
TGSMCmd()
{
nCmdTick = 0;
pfCall = NULL;
};
};
class CGsmCmdProcess
{
public:
CGsmCmdProcess();
virtual ~CGsmCmdProcess();
static CGsmCmdProcess * GetInstance();
void AddCmdProcess(const char * pCmd, const char * pRespectCmd, void * pf);
void ParseCmdProcess(const char * pCmd);
protected:
std::list <TGSMCmd> m_CmdList;
private:
CSyncLock m_Sync;
bool IsExistCmd(const char * pCmd);
};