NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
pit-iterator.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#include "
pit-iterator.hpp
"
27
#include "
core/asserts.hpp
"
28
29
namespace
nfd
{
30
namespace
pit {
31
32
NFD_ASSERT_FORWARD_ITERATOR
(Iterator);
33
34
Iterator::Iterator
(
const
NameTree::const_iterator& ntIt,
size_t
iPitEntry)
35
: m_ntIt(ntIt)
36
, m_iPitEntry(iPitEntry)
37
{
38
}
39
40
Iterator
&
41
Iterator::operator++
()
42
{
43
BOOST_ASSERT(m_ntIt != NameTree::const_iterator());
44
BOOST_ASSERT(m_iPitEntry < m_ntIt->getPitEntries().size());
45
46
if
(++m_iPitEntry >= m_ntIt->getPitEntries().size()) {
47
++m_ntIt;
48
m_iPitEntry = 0;
49
BOOST_ASSERT(m_ntIt == NameTree::const_iterator() || m_ntIt->hasPitEntries());
50
}
51
52
return
*
this
;
53
}
54
55
Iterator
56
Iterator::operator++
(
int
)
57
{
58
Iterator
copy = *
this
;
59
this->
operator++
();
60
return
copy;
61
}
62
63
}
// namespace pit
64
}
// namespace nfd
pit-iterator.hpp
nfd::pit::Iterator::Iterator
Iterator(const NameTree::const_iterator &ntIt=NameTree::const_iterator(), size_t iPitEntry=0)
constructor
Definition:
pit-iterator.cpp:34
asserts.hpp
nfd::pit::Iterator
PIT iterator.
Definition:
pit-iterator.hpp:37
nfd::pit::NFD_ASSERT_FORWARD_ITERATOR
NFD_ASSERT_FORWARD_ITERATOR(Iterator)
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
nfd::pit::Iterator::operator++
Iterator & operator++()
Definition:
pit-iterator.cpp:41
ndnSIM
NFD
daemon
table
pit-iterator.cpp
Generated on Thu Nov 2 2017 03:30:29 for ndnSIM by
1.8.11