hash.h

来自「linux 上http email 协议分析程序 主要能够处理大数据量的主干网」· C头文件 代码 · 共 35 行

H
35
字号
#ifndef _HASH_FILE_H
#define _HASH_FILE_H
#include <time.h>
#include <Mem.h>

#include "Stru.h"

class Chash_v
{
public:
	Chash_v(int ibasecount,int itotcount);
	~Chash_v();

	bool find(TUnit_v *aunit);
	bool add(TUnit_v *aunit);
	bool remove(TUnit_v *aunit);
	void clearMem(CMem *theMem);
	int clear(TUnit_v *punit,int maxunit);

private:
	int getPos(TKey &key);
	bool timeout();
	int m_ibasecount;
	int m_isparecount;

	CMem *m_theMem;
	void * *m_pbase;
	int m_iidlecount;

	time_t m_lctime;

};

#endif

⌨️ 快捷键说明

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