IBR-DTNSuite  0.10
NeighborDataset.h
Go to the documentation of this file.
1 /*
2  * NeighborDataset.h
3  *
4  * Created on: 08.01.2013
5  * Author: morgenro
6  */
7 
8 #ifndef NEIGHBORDATASET_H_
9 #define NEIGHBORDATASET_H_
10 
11 #include <ibrdtn/data/Number.h>
12 #include <ibrcommon/refcnt_ptr.h>
13 #include <stdlib.h>
14 #include <iostream>
15 
16 namespace dtn
17 {
18  namespace routing
19  {
21  public:
23  virtual ~NeighborDataSetImpl() = 0;
24 
26  };
27 
29  {
30  private:
31  class Empty : public NeighborDataSetImpl {
32  public:
33  Empty(const dtn::data::Number &id) : NeighborDataSetImpl(id) { };
34  virtual ~Empty() {};
35  };
36 
37  public:
41 
42  bool operator==(const NeighborDataset&) const;
43  bool operator<(const NeighborDataset&) const;
44  bool operator>(const NeighborDataset&) const;
45 
46  bool operator==(const dtn::data::Number&) const;
47  bool operator<(const dtn::data::Number&) const;
48  bool operator>(const dtn::data::Number&) const;
49 
50  const dtn::data::Number &getId() const;
51 
53  const NeighborDataSetImpl& operator*() const;
54 
55  private:
57  };
58  } /* namespace routing */
59 } /* namespace dtn */
60 #endif /* NEIGHBORDATASET_H_ */