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
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
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::security::pib::operator==
bool operator==(const Identity &lhs, const Identity &rhs)
Definition:
identity.hpp:162
NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
Definition:
common.hpp:43
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
Definition:
identity-container.hpp:49
websocketpp::transport::asio::socket::error::security
Catch-all error for security policy errors that don't fit in other categories.
Definition:
base.hpp:79
nfd::cs::iterator
Table::const_iterator iterator
Definition:
cs-internal.hpp:41
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
Container of identities of a Pib.
Definition:
identity-container.hpp:46
ndn::security::pib::operator!=
bool operator!=(const Identity &lhs, const Identity &rhs)
Definition:
identity.cpp:101
ndn::security::pib::Identity
A frontend handle of an Identity.
Definition:
identity.hpp:42
ndn::security::pib::IdentityContainer::getIdentityNames
const std::set< Name > & getIdentityNames() const
Definition:
identity-container.hpp:139
ndn::security::pib::Pib
represents the PIB
Definition:
pib.hpp:52
ndnSIM
ndn-cxx
src
security
pib
identity-container.hpp
Generated on Thu Nov 2 2017 03:30:28 for ndnSIM by
1.8.11