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...
 

Friends

class Pib
 

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 42 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 55 of file identity-container.cpp.

◆ begin()

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

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

◆ empty()

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

Check whether the container is empty.

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

◆ end()

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

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

◆ find()

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

Definition at line 49 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 88 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 113 of file identity-container.cpp.

◆ remove()

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

Remove identity from the container.

Definition at line 74 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 105 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 121 of file identity-container.hpp.

Friends And Related Function Documentation

◆ Pib

friend class Pib
friend

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