forest-net
an overlay networks for large-scale virtual worlds
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
Repeater.h
Go to the documentation of this file.
1 
9 #ifndef REPEATER_H
10 #define REPEATER_H
11 
12 #include <queue>
13 #include <map>
14 
15 #include "stdinc.h"
16 #include "Forest.h"
17 #include "Pair.h"
18 #include "Dheap.h"
19 #include "Hash.h"
20 #include "HashMap.h"
21 
22 using namespace std::chrono;
23 using namespace grafalgo;
24 
25 namespace forest {
26 
28 class Repeater {
29 public:
30  Repeater(int);
31  ~Repeater();
32 
33  int saveReq(int, int64_t, int64_t, int=0);
34  pair<int,int> deleteMatch(int64_t);
35  pair<int,int> overdue(int64_t);
36 private:
37  int n;
38  HashMap<int64_t, Pair<int,int>, Hash::s64> *pmap;
40  Dheap<int64_t> *deadlines;
41 };
42 
43 } // ends namespace
44 
45 #endif