NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
identity-container.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#include "
identity-container.hpp
"
23
#include "
pib-impl.hpp
"
24
25
namespace
ndn
{
26
namespace
security
{
27
28
IdentityContainer::const_iterator::const_iterator(std::set<Name>::const_iterator it,
29
shared_ptr<PibImpl> impl)
30
: m_it(it)
31
, m_impl(impl)
32
{
33
}
34
35
Identity
36
IdentityContainer::const_iterator::operator*
()
37
{
38
return
Identity
(*m_it, m_impl);
39
}
40
41
IdentityContainer::const_iterator
&
42
IdentityContainer::const_iterator::operator++
()
43
{
44
++m_it;
45
return
*
this
;
46
}
47
48
IdentityContainer::const_iterator
49
IdentityContainer::const_iterator::operator++
(
int
)
50
{
51
const_iterator
it(*
this
);
52
++m_it;
53
return
it;
54
}
55
56
bool
57
IdentityContainer::const_iterator::operator==
(
const
const_iterator
& other)
58
{
59
return
(m_impl == other.m_impl && m_it == other.m_it);
60
}
61
62
bool
63
IdentityContainer::const_iterator::operator!=
(
const
const_iterator
& other)
64
{
65
return
!(*
this
== other);
66
}
67
68
IdentityContainer::IdentityContainer
()
69
{
70
}
71
72
IdentityContainer::IdentityContainer
(std::set<Name>&& identities,
73
shared_ptr<PibImpl> impl)
74
: m_identities(identities)
75
, m_impl(impl)
76
{
77
}
78
79
IdentityContainer::const_iterator
80
IdentityContainer::begin
()
const
81
{
82
return
const_iterator
(m_identities.begin(), m_impl);
83
}
84
85
IdentityContainer::const_iterator
86
IdentityContainer::end
()
const
87
{
88
return
const_iterator
(m_identities.end(), m_impl);
89
}
90
91
IdentityContainer::const_iterator
92
IdentityContainer::find
(
const
Name
& identity)
const
93
{
94
return
const_iterator
(m_identities.find(identity), m_impl);
95
}
96
97
size_t
98
IdentityContainer::size
()
const
99
{
100
return
m_identities.size();
101
}
102
103
}
// namespace security
104
}
// namespace ndn
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::security::Identity
represents an identity
Definition:
identity.hpp:44
ndn::security::IdentityContainer::end
const_iterator end() const
Definition:
identity-container.cpp:86
ndn::security::IdentityContainer::const_iterator::operator++
const_iterator & operator++()
Definition:
identity-container.cpp:42
ndn::security::IdentityContainer::find
const_iterator find(const Name &keyId) const
Definition:
identity-container.cpp:92
ndn::security::IdentityContainer::IdentityContainer
IdentityContainer()
Definition:
identity-container.cpp:68
ndn::security::IdentityContainer::const_iterator::operator==
bool operator==(const const_iterator &other)
Definition:
identity-container.cpp:57
identity-container.hpp
ndn::security::IdentityContainer::const_iterator::operator!=
bool operator!=(const const_iterator &other)
Definition:
identity-container.cpp:63
ndn::Name
Name abstraction to represent an absolute name.
Definition:
name.hpp:46
ndn::security::IdentityContainer::const_iterator::operator*
Identity operator*()
Definition:
identity-container.cpp:36
ndn::security::IdentityContainer::begin
const_iterator begin() const
Definition:
identity-container.cpp:80
ndn::security::IdentityContainer::size
size_t size() const
Definition:
identity-container.cpp:98
ndn::security::IdentityContainer::const_iterator
Definition:
identity-container.hpp:37
pib-impl.hpp
security
ndnSIM
ndn-cxx
src
security
identity-container.cpp
Generated on Wed Jan 11 2017 18:17:14 for ndnSIM by
1.8.13