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.cpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
30 #include "cs-skip-list-entry.hpp"
31 #include "core/logger.hpp"
32 
33 namespace nfd {
34 namespace cs {
35 namespace skip_list {
36 
37 NFD_LOG_INIT("CsSkipListEntry");
38 
39 void
41 {
42  BOOST_ASSERT(m_layerIterators.empty());
43 
44  reset();
45 }
46 
47 void
48 Entry::setIterator(int layer, const Entry::LayerIterators::mapped_type& layerIterator)
49 {
50  m_layerIterators[layer] = layerIterator;
51 }
52 
53 void
55 {
56  m_layerIterators.erase(layer);
57 }
58 
59 void
60 Entry::printIterators() const
61 {
62  for (LayerIterators::const_iterator it = m_layerIterators.begin();
63  it != m_layerIterators.end();
64  ++it)
65  {
66  NFD_LOG_TRACE("[" << it->first << "]" << " " << &(*it->second));
67  }
68 }
69 
70 } // namespace skip_list
71 } // namespace cs
72 } // namespace nfd
void reset()
clears CS entry After reset, *this == Entry()
Definition: cs-entry.cpp:65
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
void release()
releases reference counts on shared objects
#define NFD_LOG_INIT(name)
Definition: logger.hpp:33
#define NFD_LOG_TRACE(expression)
Definition: logger.hpp:35