NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cs-skip-list-entry.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
30 #ifndef NFD_DAEMON_TABLE_CS_SKIP_LIST_ENTRY_HPP
31 #define NFD_DAEMON_TABLE_CS_SKIP_LIST_ENTRY_HPP
32 
33 #include "common.hpp"
34 #include "cs-entry.hpp"
35 
36 namespace nfd {
37 namespace cs {
38 namespace skip_list {
39 
42 class Entry : public cs::Entry
43 {
44 public:
45  typedef std::map<int, std::list<Entry*>::iterator > LayerIterators;
46 
47  Entry() = default;
48 
51  void
52  release();
53 
56  void
57  setIterator(int layer, const LayerIterators::mapped_type& layerIterator);
58 
61  void
62  removeIterator(int layer);
63 
66  const LayerIterators&
67  getIterators() const;
68 
69 private:
72  void
73  printIterators() const;
74 
75 private:
76  LayerIterators m_layerIterators;
77 };
78 
79 inline const Entry::LayerIterators&
81 {
82  return m_layerIterators;
83 }
84 
85 } // namespace skip_list
86 } // namespace cs
87 } // namespace nfd
88 
89 #endif // NFD_DAEMON_TABLE_CS_SKIP_LIST_ENTRY_HPP
void removeIterator(int layer)
removes the iterator pointing to the CS entry on a specific layer of skip list
void setIterator(int layer, const LayerIterators::mapped_type &layerIterator)
saves the iterator pointing to the CS entry on a specific layer of skip list
std::map< int, std::list< Entry * >::iterator > LayerIterators
const LayerIterators & getIterators() const
returns the table containing pairs.
void release()
releases reference counts on shared objects
represents a base class for CS entry
Definition: cs-entry.hpp:42
represents an entry in a CS with skip list implementation