22 #ifndef NDN_CXX_SECURITY_PIB_IDENTITY_CONTAINER_HPP
23 #define NDN_CXX_SECURITY_PIB_IDENTITY_CONTAINER_HPP
29 #include <unordered_map>
53 using NameSet = std::set<Name>;
98 NameSet::const_iterator m_it;
110 return {m_identityNames.begin(), *
this};
128 return m_identityNames.empty();
137 return m_identityNames.size();
157 get(
const Name& identity)
const;
184 mutable std::unordered_map<Name, shared_ptr<detail::IdentityImpl>> m_identities;
187 NameSet m_identityNames;
188 const shared_ptr<PibImpl> m_pib;
#define NDN_CXX_NODISCARD
Represents an absolute name.
bool operator==(const const_iterator &other) const
const_iterator operator++(int)
std::forward_iterator_tag iterator_category
const_iterator & operator++()
std::ptrdiff_t difference_type
bool operator!=(const const_iterator &other) const
Container of identities of a PIB.
bool empty() const noexcept
Check whether the container is empty.
size_t size() const noexcept
Return the number of identities in the container.
const_iterator begin() const noexcept
Identity get(const Name &identity) const
Return an identity by name.
const_iterator find(const Name &identity) const
const_iterator end() const noexcept
void remove(const Name &identity)
Remove identity from the container.
Identity add(const Name &identity)
Add identity into the container.
bool isConsistent() const
Check if the container is consistent with the backend storage.
void reset()
Reset the state of the container.
Frontend handle for an identity in the PIB.
Frontend to the Public Information Base.
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE