ndn::security::pib::IdentityContainer Class Reference

Container of identities of a PIB. More...

#include <ndn-cxx/security/pib/identity-container.hpp>

+ Inheritance diagram for ndn::security::pib::IdentityContainer:
+ Collaboration diagram for ndn::security::pib::IdentityContainer:

Classes

class  const_iterator
 

Public Types

using iterator = const_iterator
 

Public Member Functions

Identity add (const Name &identity)
 Add identity into the container. More...
 
const_iterator begin () const noexcept
 
bool empty () const noexcept
 Check whether the container is empty. More...
 
const_iterator end () const noexcept
 
const_iterator find (const Name &identity) const
 
Identity get (const Name &identity) const
 Return an identity by name. More...
 
bool isConsistent () const
 Check if the container is consistent with the backend storage. More...
 
void remove (const Name &identity)
 Remove identity from the container. More...
 
void reset ()
 Reset the state of the container. More...
 
size_t size () const noexcept
 Return the number of identities in the container. More...
 

Detailed Description

Container of identities of a PIB.

The container is used to search/enumerate the identities in a PIB. It can be created only by the Pib class.

See also
Pib::getIdentities()

Definition at line 50 of file identity-container.hpp.

Member Typedef Documentation

◆ iterator

Member Function Documentation

◆ add()

Identity ndn::security::pib::IdentityContainer::add ( const Name identity)

Add identity into the container.

Definition at line 74 of file identity-container.cpp.

◆ begin()

const_iterator ndn::security::pib::IdentityContainer::begin ( ) const
inlinenoexcept

Definition at line 108 of file identity-container.hpp.

◆ empty()

bool ndn::security::pib::IdentityContainer::empty ( ) const
inlinenoexcept

Check whether the container is empty.

Definition at line 126 of file identity-container.hpp.

◆ end()

const_iterator ndn::security::pib::IdentityContainer::end ( ) const
inlinenoexcept

Definition at line 114 of file identity-container.hpp.

◆ find()

IdentityContainer::const_iterator ndn::security::pib::IdentityContainer::find ( const Name identity) const

Definition at line 68 of file identity-container.cpp.

◆ get()

Identity ndn::security::pib::IdentityContainer::get ( const Name identity) const

Return an identity by name.

Exceptions
Pib::ErrorThe identity does not exist.

Definition at line 107 of file identity-container.cpp.

◆ isConsistent()

bool ndn::security::pib::IdentityContainer::isConsistent ( ) const

Check if the container is consistent with the backend storage.

Note
This method is heavyweight and should be used in debugging mode only.

Definition at line 133 of file identity-container.cpp.

◆ remove()

void ndn::security::pib::IdentityContainer::remove ( const Name identity)

Remove identity from the container.

Definition at line 93 of file identity-container.cpp.

◆ reset()

void ndn::security::pib::IdentityContainer::reset ( )

Reset the state of the container.

This clears all cached information and reloads the identity names from the PIB backend.

Definition at line 125 of file identity-container.cpp.

◆ size()

size_t ndn::security::pib::IdentityContainer::size ( ) const
inlinenoexcept

Return the number of identities in the container.

Definition at line 135 of file identity-container.hpp.