Files
wnmj/Servers/服务器组件/服务核心/WHAllocationID.h

37 lines
651 B
C
Raw Normal View History

2026-02-13 14:34:15 +08:00
#ifndef _WH_ALLOCATION_ID_H_
#define _WH_ALLOCATION_ID_H_
#include <deque>
#include <map>
#include "ServiceCoreHead.h"
using std::deque;
using std::map;
class SERVICE_CORE_CLASS WHAllocationID
{
private:
CCriticalSection m_CriticalSection; //ͬ<><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
deque<int> m_allocationIDQueue; //<2F><><EFBFBD><EFBFBD>ID<49><44>queue;
map < int, bool > m_allocationIDMap; //<2F><><EFBFBD><EFBFBD>ID<49><44>map;
enum{ default_maxsize=10000 };
public:
WHAllocationID(int nMaxSize = default_maxsize);
~WHAllocationID(){};
//<2F><><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Size;
void ReAllocate( int nMaxSize );
//<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID;
int PopValue();
//<2F><EFBFBD><E9BBB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȥ<EFBFBD><C8A5>ID;
void PushValue( int nID );
};
#endif