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

📄 requesttable.h

📁 在Linux下做的QuadTree的程序
💻 H
字号:
/* -*- c++ -*-   requesttable.h   implement a table to keep track of the most current request   number we've heard from a node in terms of that node's id   implemented as a circular buffer   $Id: requesttable.h,v 1.1.1.1 2000/08/28 18:40:10 jinyang Exp $*/#ifndef _requesttable_h#define _requesttable_h#include "path.h"struct Entry;enum LastType { LIMIT0, UNLIMIT};class RequestTable {public:  RequestTable(int size = 30);  ~RequestTable();  void insert(const ID& net_id, int req_num);  void insert(const ID& net_id, const ID& MAC_id, int req_num);  int get(const ID& id) const;  // rtns 0 if id not found  Entry* getEntry(const ID& id);  private:  Entry *table;  int size;  int ptr;  int find(const ID& net_id, const ID& MAC_id ) const;};struct Entry {  ID MAC_id;  ID net_id;  int req_num;  Time last_arp;  int rt_reqs_outstanding;  Time last_rt_req;  LastType last_type;};#endif //_requesttable_h

⌨️ 快捷键说明

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