NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
identity-container.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#ifndef NDN_SECURITY_PIB_IDENTITY_CONTAINER_HPP
23
#define NDN_SECURITY_PIB_IDENTITY_CONTAINER_HPP
24
25
#include "
identity.hpp
"
26
27
#include <set>
28
#include <unordered_map>
29
30
namespace
ndn
{
31
namespace
security {
32
namespace
pib {
33
34
class
PibImpl;
35
36
namespace
detail {
37
class
IdentityImpl;
38
}
// namespace detail
39
46
class
IdentityContainer
: noncopyable
47
{
48
public
:
49
class
const_iterator
:
public
std::iterator
<std::forward_iterator_tag, const Identity>
50
{
51
public
:
52
const_iterator
();
53
54
Identity
55
operator*
();
56
57
const_iterator
&
58
operator++
();
59
60
const_iterator
61
operator++
(
int
);
62
63
bool
64
operator==
(
const
const_iterator
& other);
65
66
bool
67
operator!=
(
const
const_iterator
& other);
68
69
private
:
70
const_iterator
(std::set<Name>::const_iterator it,
const
IdentityContainer
& container);
71
72
private
:
73
std::set<Name>::const_iterator m_it;
74
const
IdentityContainer
* m_container;
75
76
friend
class
IdentityContainer
;
77
};
78
79
typedef
const_iterator
iterator
;
80
81
public
:
82
const_iterator
83
begin
()
const
;
84
85
const_iterator
86
end
()
const
;
87
88
const_iterator
89
find
(
const
Name
& keyId)
const
;
90
91
size_t
92
size
()
const
;
93
97
Identity
98
add
(
const
Name
& identityName);
99
103
void
104
remove
(
const
Name
& identity);
105
110
Identity
111
get
(
const
Name
& identity)
const
;
112
119
void
120
reset
();
121
127
bool
128
isConsistent
()
const
;
129
130
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
:
135
explicit
136
IdentityContainer
(shared_ptr<PibImpl> pibImpl);
137
138
const
std::set<Name>&
139
getIdentityNames
()
const
140
{
141
return
m_identityNames;
142
}
143
144
const
std::unordered_map<Name, shared_ptr<detail::IdentityImpl>>&
145
getLoadedIdentities
()
const
146
{
147
return
m_identities;
148
}
149
150
private
:
151
std::set<Name> m_identityNames;
153
mutable
std::unordered_map<Name, shared_ptr<detail::IdentityImpl>> m_identities;
154
155
shared_ptr<PibImpl> m_pibImpl;
156
157
friend
class
Pib
;
158
};
159
160
}
// namespace pib
161
162
using
pib::IdentityContainer
;
163
164
}
// namespace security
165
}
// namespace ndn
166
167
#endif // NDN_SECURITY_PIB_IDENTITY_CONTAINER_HPP
ndn::security::pib::IdentityContainer::end
const_iterator end() const
Definition:
identity-container.cpp:97
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::security::pib::IdentityContainer::reset
void reset()
Reset state of the container.
Definition:
identity-container.cpp:150
ndn::security::pib::IdentityContainer::getIdentityNames
const std::set< Name > & getIdentityNames() const
Definition:
identity-container.hpp:139
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
Definition:
common.hpp:43
ndn::security::pib::IdentityContainer::const_iterator
Definition:
identity-container.hpp:49
ndn::security::pib::IdentityContainer::const_iterator::operator==
bool operator==(const const_iterator &other)
Definition:
identity-container.cpp:68
nfd::cs::iterator
Table::const_iterator iterator
Definition:
cs-internal.hpp:41
ndn::security::pib::IdentityContainer::add
Identity add(const Name &identityName)
Add identity into the container.
Definition:
identity-container.cpp:115
ndn::security::pib::IdentityContainer::find
const_iterator find(const Name &keyId) const
Definition:
identity-container.cpp:103
ndn::security::pib::IdentityContainer::const_iterator::operator!=
bool operator!=(const const_iterator &other)
Definition:
identity-container.cpp:78
identity.hpp
ndn::Name
Represents an absolute name.
Definition:
name.hpp:42
ndn::security::pib::IdentityContainer::iterator
const_iterator iterator
Definition:
identity-container.hpp:79
ndn::security::pib::IdentityContainer::const_iterator::const_iterator
const_iterator()
Definition:
identity-container.cpp:33
ndn::security::pib::IdentityContainer::size
size_t size() const
Definition:
identity-container.cpp:109
ndn::security::pib::IdentityContainer::const_iterator::operator++
const_iterator & operator++()
Definition:
identity-container.cpp:53
ndn::security::pib::IdentityContainer::begin
const_iterator begin() const
Definition:
identity-container.cpp:91
ndn::security::pib::IdentityContainer
Container of identities of a Pib.
Definition:
identity-container.hpp:46
ndn::security::pib::IdentityContainer::isConsistent
bool isConsistent() const
Check if the container is consistent with the backend storage.
Definition:
identity-container.cpp:157
ndn::security::pib::Identity
A frontend handle of an Identity.
Definition:
identity.hpp:42
ndn::security::pib::IdentityContainer::getLoadedIdentities
const std::unordered_map< Name, shared_ptr< detail::IdentityImpl > > & getLoadedIdentities() const
Definition:
identity-container.hpp:145
ndn::security::pib::IdentityContainer::const_iterator::operator*
Identity operator*()
Definition:
identity-container.cpp:46
ndn::security::pib::Pib
represents the PIB
Definition:
pib.hpp:52
ndnSIM
ndn-cxx
src
security
pib
identity-container.hpp
Generated on Tue Aug 7 2018 16:19:16 for ndnSIM by
1.8.14