⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 globaluserlist.h

📁 真正的传奇源代码
💻 H
字号:


#pragma once


#define GLOBALLIST_MAXLIST		20000
#define GLOBALLIST_MAXBUCKET	1000


#include "..\Def\_OrzEx\syncobj.h"
#include "..\Def\_OrzEx\indexmap.h"
#include "..\Def\_OrzEx\fsa.h"


class CGlobalUserList : public CIntLock
{
public:
	class CUserInfo
	{
	public:
		enum { MAXID = 32, MAXIP = 32 };

		char szID[MAXID];
		char szIP[MAXIP];

	public:
		CUserInfo() { szID[0] = '\0'; szIP[0] = '\0'; }
	};

public:
	CIndexMap< CUserInfo >				m_listUser;
	CFixedSizeAllocator< CUserInfo >	m_fixedMemory;	

public:
	CGlobalUserList();
	virtual ~CGlobalUserList();

	bool		Insert( char *pID, char *pIP );
	CUserInfo *	Search( char *pID );
	void		Remove( char *pID );

protected:
	static char * __cbGetKey( CUserInfo *pUser );
};


typedef CGlobalUserList::CUserInfo CGlobalUserInfo;


CGlobalUserList * GetGlobalUserList();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -