22 #ifndef NDN_CXX_SECURITY_PIB_CERTIFICATE_CONTAINER_HPP
23 #define NDN_CXX_SECURITY_PIB_CERTIFICATE_CONTAINER_HPP
29 #include <unordered_map>
52 using NameSet = std::set<Name>;
97 NameSet::const_iterator m_it;
109 return {m_certNames.begin(), *
this};
127 return m_certNames.empty();
136 return m_certNames.size();
159 get(
const Name& certName)
const;
177 mutable std::unordered_map<Name, Certificate> m_certs;
181 const Name m_keyName;
182 const shared_ptr<PibImpl> m_pib;
184 friend detail::KeyImpl;
#define NDN_CXX_NODISCARD
Represents an absolute name.
bool operator==(const const_iterator &other) const
const_iterator operator++(int)
bool operator!=(const const_iterator &other) const
std::forward_iterator_tag iterator_category
const_iterator & operator++()
std::ptrdiff_t difference_type
Container of certificates of a key.
const_iterator find(const Name &certName) const
bool empty() const noexcept
Check whether the container is empty.
Certificate get(const Name &certName) const
Return a certificate by name.
void remove(const Name &certName)
Remove a certificate with certName from the container.
const_iterator end() const noexcept
bool isConsistent() const
Check if the container is consistent with the backend storage.
void add(const Certificate &certificate)
Add certificate into the container.
size_t size() const noexcept
Return the number of certificates in the container.
const_iterator begin() const noexcept
Represents an NDN certificate.
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE