亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? rtphashtable.h

?? jrtp庫
?? H
字號:
/*  This file is a part of JRTPLIB  Copyright (c) 1999-2007 Jori Liesenborgs  Contact: jori.liesenborgs@gmail.com  This library was developed at the "Expertisecentrum Digitale Media"  (http://www.edm.uhasselt.be), a research center of the Hasselt University  (http://www.uhasselt.be). The library is based upon work done for   my thesis at the School for Knowledge Technology (Belgium/The Netherlands).  Permission is hereby granted, free of charge, to any person obtaining a  copy of this software and associated documentation files (the "Software"),  to deal in the Software without restriction, including without limitation  the rights to use, copy, modify, merge, publish, distribute, sublicense,  and/or sell copies of the Software, and to permit persons to whom the  Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included  in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS  IN THE SOFTWARE.*/#ifndef RTPHASHTABLE_H#define RTPHASHTABLE_H/** * \file rtphashtable.h */#include "rtperrors.h"#include "rtpmemoryobject.h"#ifdef RTPDEBUG#include <iostream>#endif // RTPDEBUG//template<class Element,int GetIndex(const Element &k),int hashsize>template<class Element,class GetIndex,int hashsize>class RTPHashTable : public RTPMemoryObject{public:	RTPHashTable(RTPMemoryManager *mgr = 0, int memtype = RTPMEM_TYPE_OTHER);	~RTPHashTable()						{ Clear(); }	void GotoFirstElement()					{ curhashelem = firsthashelem; }	void GotoLastElement()					{ curhashelem = lasthashelem; }	bool HasCurrentElement()				{ return (curhashelem == 0)?false:true; }	int DeleteCurrentElement();	Element &GetCurrentElement()				{ return curhashelem->GetElement(); }	int GotoElement(const Element &e);	bool HasElement(const Element &e);	void GotoNextElement();	void GotoPreviousElement();	void Clear();	int AddElement(const Element &elem);	int DeleteElement(const Element &elem);#ifdef RTPDEBUG	void Dump();#endif // RTPDEBUGprivate:	class HashElement	{	public:		HashElement(const Element &e,int index):element(e) { hashprev = 0; hashnext = 0; listnext = 0; listprev = 0; hashindex = index; }		int GetHashIndex() 						{ return hashindex; }		Element &GetElement()						{ return element; }#ifdef RTPDEBUG		void Dump()							{ std::cout << "\tHash index " << hashindex << " | Element " << element << std::endl; }#endif // RTPDEBUG	private:		int hashindex;		Element element;	public:		HashElement *hashprev,*hashnext;		HashElement *listprev,*listnext;	};	HashElement *table[hashsize];	HashElement *firsthashelem,*lasthashelem;	HashElement *curhashelem;#ifdef RTP_SUPPORT_MEMORYMANAGEMENT	int memorytype;#endif // RTP_SUPPORT_MEMORYMANAGEMENT};template<class Element,class GetIndex,int hashsize>inline RTPHashTable<Element,GetIndex,hashsize>::RTPHashTable(RTPMemoryManager *mgr,int memtype) : RTPMemoryObject(mgr){	for (int i = 0 ; i < hashsize ; i++)		table[i] = 0;	firsthashelem = 0;	lasthashelem = 0;#ifdef RTP_SUPPORT_MEMORYMANAGEMENT	memorytype = memtype;#endif // RTP_SUPPORT_MEMORYMANAGEMENT}template<class Element,class GetIndex,int hashsize>inline int RTPHashTable<Element,GetIndex,hashsize>::DeleteCurrentElement(){	if (curhashelem)	{		HashElement *tmp1,*tmp2;		int index;				// First, relink elements in current hash bucket				index = curhashelem->GetHashIndex();		tmp1 = curhashelem->hashprev;		tmp2 = curhashelem->hashnext;		if (tmp1 == 0) // no previous element in hash bucket		{			table[index] = tmp2;			if (tmp2 != 0)				tmp2->hashprev = 0;		}		else // there is a previous element in the hash bucket		{			tmp1->hashnext = tmp2;			if (tmp2 != 0)				tmp2->hashprev = tmp1;		}		// Relink elements in list				tmp1 = curhashelem->listprev;		tmp2 = curhashelem->listnext;		if (tmp1 == 0) // curhashelem is first in list		{			firsthashelem = tmp2;			if (tmp2 != 0)				tmp2->listprev = 0;			else // curhashelem is also last in list				lasthashelem = 0;			}		else		{			tmp1->listnext = tmp2;			if (tmp2 != 0)				tmp2->listprev = tmp1;			else // curhashelem is last in list				lasthashelem = tmp1;		}				// finally, with everything being relinked, we can delete curhashelem		RTPDelete(curhashelem,GetMemoryManager());		curhashelem = tmp2; // Set to next element in the list	}	else		return ERR_RTP_HASHTABLE_NOCURRENTELEMENT;	return 0;}template<class Element,class GetIndex,int hashsize>inline int RTPHashTable<Element,GetIndex,hashsize>::GotoElement(const Element &e){	int index;	bool found;		index = GetIndex::GetIndex(e);	if (index >= hashsize)		return ERR_RTP_HASHTABLE_FUNCTIONRETURNEDINVALIDHASHINDEX;		curhashelem = table[index]; 	found = false;	while(!found && curhashelem != 0)	{		if (curhashelem->GetElement() == e)			found = true;		else			curhashelem = curhashelem->hashnext;	}	if (!found)		return ERR_RTP_HASHTABLE_ELEMENTNOTFOUND;	return 0;}template<class Element,class GetIndex,int hashsize>inline bool RTPHashTable<Element,GetIndex,hashsize>::HasElement(const Element &e){	int index;	bool found;	HashElement *tmp;		index = GetIndex::GetIndex(e);	if (index >= hashsize)		return false;		tmp = table[index]; 	found = false;	while(!found && tmp != 0)	{		if (tmp->GetElement() == e)			found = true;		else			tmp = tmp->hashnext;	}	return found;}template<class Element,class GetIndex,int hashsize>inline void RTPHashTable<Element,GetIndex,hashsize>::GotoNextElement(){	if (curhashelem)		curhashelem = curhashelem->listnext;}template<class Element,class GetIndex,int hashsize>inline void RTPHashTable<Element,GetIndex,hashsize>::GotoPreviousElement(){	if (curhashelem)		curhashelem = curhashelem->listprev;}template<class Element,class GetIndex,int hashsize>inline void RTPHashTable<Element,GetIndex,hashsize>::Clear(){	HashElement *tmp1,*tmp2;		for (int i = 0 ; i < hashsize ; i++)		table[i] = 0;		tmp1 = firsthashelem;	while (tmp1 != 0)	{		tmp2 = tmp1->listnext;		RTPDelete(tmp1,GetMemoryManager());		tmp1 = tmp2;	}	firsthashelem = 0;	lasthashelem = 0;}template<class Element,class GetIndex,int hashsize>inline int RTPHashTable<Element,GetIndex,hashsize>::AddElement(const Element &elem){	int index;	bool found;	HashElement *e,*newelem;		index = GetIndex::GetIndex(elem);	if (index >= hashsize)		return ERR_RTP_HASHTABLE_FUNCTIONRETURNEDINVALIDHASHINDEX;		e = table[index];	found = false;	while(!found && e != 0)	{		if (e->GetElement() == elem)			found = true;		else			e = e->hashnext;	}	if (found)		return ERR_RTP_HASHTABLE_ELEMENTALREADYEXISTS;		// Okay, the key doesn't exist, so we can add the new element in the hash table		newelem = RTPNew(GetMemoryManager(),memorytype) HashElement(elem,index);	if (newelem == 0)		return ERR_RTP_OUTOFMEM;	e = table[index];	table[index] = newelem;	newelem->hashnext = e;	if (e != 0)		e->hashprev = newelem;		// Now, we still got to add it to the linked list		if (firsthashelem == 0)	{		firsthashelem = newelem;		lasthashelem = newelem;	}	else // there already are some elements in the list	{		lasthashelem->listnext = newelem;		newelem->listprev = lasthashelem;		lasthashelem = newelem;	}	return 0;}template<class Element,class GetIndex,int hashsize>inline int RTPHashTable<Element,GetIndex,hashsize>::DeleteElement(const Element &elem){	int status;	status = GotoElement(elem);	if (status < 0)		return status;	return DeleteCurrentElement();}#ifdef RTPDEBUGtemplate<class Element,class GetIndex,int hashsize>inline void RTPHashTable<Element,GetIndex,hashsize>::Dump(){	HashElement *e;		std::cout << "DUMPING TABLE CONTENTS:" << std::endl;	for (int i = 0 ; i < hashsize ; i++)	{		e = table[i];		while (e != 0)		{			e->Dump();			e = e->hashnext;		}	}		std::cout << "DUMPING LIST CONTENTS:" << std::endl;	e = firsthashelem;	while (e != 0)	{		e->Dump();		e = e->listnext;	}}#endif // RTPDEBUG#endif // RTPHASHTABLE_H

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲丝袜精品丝袜在线| 亚洲综合免费观看高清完整版在线| 午夜欧美一区二区三区在线播放| 欧美中文字幕一区| 日韩黄色免费电影| 欧美大白屁股肥臀xxxxxx| 国产制服丝袜一区| 久久精品亚洲一区二区三区浴池| 成人免费观看视频| 亚洲人成在线观看一区二区| 欧美体内she精视频| 久久电影网站中文字幕| 国产欧美日韩精品在线| 91黄色免费观看| 精品一区二区三区在线视频| 国产精品日日摸夜夜摸av| 在线观看一区不卡| 精品在线亚洲视频| 国产精品久久久久一区| 欧美日韩国产高清一区二区三区 | 日韩精品在线一区二区| 国产精品一区二区三区乱码| 亚洲欧美另类小说| 日韩女同互慰一区二区| 福利电影一区二区| 性做久久久久久| 国产亚洲午夜高清国产拍精品| 91视频你懂的| 激情五月婷婷综合| 亚洲精品v日韩精品| 精品久久久久久久久久久久包黑料 | 亚洲国产一区视频| 精品国产伦一区二区三区观看方式 | 欧美一级二级三级蜜桃| 99精品视频在线免费观看| 久久国产精品72免费观看| 亚洲欧美精品午睡沙发| 久久综合一区二区| 欧美三级三级三级| 懂色av一区二区三区免费观看 | 国产成人aaa| 国产传媒日韩欧美成人| 制服丝袜一区二区三区| 亚洲一区二区三区不卡国产欧美| 不卡电影一区二区三区| 国产精品视频第一区| 国产91精品一区二区麻豆网站| 在线不卡中文字幕| 久久精品国产亚洲a| 精品日韩一区二区三区| 免费观看在线综合色| 精品日韩一区二区三区免费视频| 国产在线看一区| 欧美日韩激情一区| 极品少妇一区二区三区精品视频| 日韩欧美卡一卡二| 国产精一区二区三区| 最新不卡av在线| 久久久久久久久久久黄色| 捆绑调教美女网站视频一区| 日韩一区二区三区电影 | 911国产精品| 久久精品国产第一区二区三区 | 欧美变态tickle挠乳网站| 国模少妇一区二区三区| 中文字幕日韩av资源站| 久久精品欧美一区二区三区麻豆| 日韩欧美亚洲另类制服综合在线| 7777精品伊人久久久大香线蕉经典版下载 | 国产精品久久久久久久久免费相片 | www国产精品av| 日韩女优视频免费观看| 日韩午夜在线影院| 日韩免费性生活视频播放| 日韩丝袜美女视频| 91精品国产91综合久久蜜臀| 在线观看日韩电影| 色成人在线视频| 欧美伊人久久久久久久久影院| 91久久精品一区二区二区| 色综合欧美在线| 在线国产亚洲欧美| 欧美日本一区二区三区| 91精品福利在线一区二区三区 | 日韩女优毛片在线| 欧美精品一区二区蜜臀亚洲| 精品国产一区二区三区四区四| 久久久亚洲精品石原莉奈 | 91高清视频免费看| 色94色欧美sute亚洲13| 欧美日韩精品电影| 精品国产乱码久久久久久老虎 | 欧美一区二区视频网站| 日韩情涩欧美日韩视频| 国产无人区一区二区三区| 国产在线不卡一区| 欧美专区亚洲专区| 精品动漫一区二区三区在线观看| 精品国产三级a在线观看| 欧美草草影院在线视频| 国产午夜三级一区二区三| 国产精品乱码一区二区三区软件| 中文字幕中文乱码欧美一区二区 | 色综合久久中文字幕综合网 | 久久福利资源站| 成人精品鲁一区一区二区| 91老师国产黑色丝袜在线| 91蜜桃在线免费视频| 欧美日韩日日骚| 精品av综合导航| 亚洲三级电影网站| 蜜臀av一区二区在线免费观看| 国产成人在线免费观看| 91网站视频在线观看| 日韩一区二区三区免费看 | 欧美xxxxxxxx| 亚洲欧美一区二区三区国产精品 | 久久99精品视频| 91麻豆免费看| 日韩欧美一区二区在线视频| 秋霞电影一区二区| 一区二区三区欧美| 国内一区二区在线| 欧美手机在线视频| 国产色综合一区| 午夜免费欧美电影| 成人性生交大片免费看在线播放 | 337p粉嫩大胆色噜噜噜噜亚洲 | 美腿丝袜亚洲综合| 一本一道久久a久久精品综合蜜臀| 欧美一区二区高清| 亚洲免费观看高清在线观看| 国产自产高清不卡| 4438x成人网最大色成网站| 亚洲少妇中出一区| 国产成人亚洲综合a∨婷婷图片| 欧美绝品在线观看成人午夜影视| 国产精品久久久久久一区二区三区| 免费xxxx性欧美18vr| 欧美日韩中文国产| 亚洲美女视频在线观看| 成人黄色国产精品网站大全在线免费观看 | 这里只有精品视频在线观看| 亚洲欧洲日产国码二区| 国产精品69毛片高清亚洲| 欧美一区二区三区不卡| 亚洲综合色噜噜狠狠| 91美女片黄在线观看| 国产精品全国免费观看高清| 国产九九视频一区二区三区| 欧美大片一区二区三区| 丝袜亚洲精品中文字幕一区| 91福利在线播放| 亚洲男人的天堂在线aⅴ视频| 白白色 亚洲乱淫| 欧美激情一区二区三区全黄 | 成人国产精品免费观看动漫| 久久久午夜精品理论片中文字幕| 麻豆91免费观看| 欧美挠脚心视频网站| 亚洲一区二区三区爽爽爽爽爽| 色婷婷亚洲一区二区三区| 亚洲精品中文在线影院| 日本韩国欧美在线| 亚洲一区在线观看免费| 在线视频中文字幕一区二区| 亚洲激情男女视频| 欧美在线观看视频在线| 亚洲高清在线视频| 欧美日韩国产片| 美女脱光内衣内裤视频久久网站 | 日韩久久一区二区| 91同城在线观看| 一区二区三区视频在线看| 欧美性欧美巨大黑白大战| 亚洲国产精品久久一线不卡| 欧美日韩国产精选| 理论片日本一区| 久久久久久久免费视频了| 成人在线一区二区三区| 亚洲日本一区二区三区| 91欧美一区二区| 亚洲一级二级在线| 日韩区在线观看| 国产成人啪免费观看软件| 中文字幕日韩精品一区| 欧美日韩免费不卡视频一区二区三区| 亚欧色一区w666天堂| 精品国产伦一区二区三区观看体验 | 欧美日韩国产综合久久| 日本视频一区二区| 久久人人超碰精品| 99视频精品在线| 日韩电影免费在线看| 欧美高清在线精品一区| 色94色欧美sute亚洲线路一ni| 日韩黄色小视频| 国产精品视频线看| 欧美精品日韩综合在线| 国产精品一卡二卡|