NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::security::pib::IdentityContainer Class Reference

Container of identities of a Pib. More...

#include <identity-container.hpp>

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

Classes

class  const_iterator
 

Public Types

typedef const_iterator iterator
 

Public Member Functions

const_iterator begin () const
 
const_iterator end () const
 
const_iterator find (const Name &keyId) const
 
size_t size () const
 
Identity add (const Name &identityName)
 Add identity into the container. More...
 
void remove (const Name &identity)
 Remove identity from the container. More...
 
Identity get (const Name &identity) const
 Get identity from the container. More...
 
void reset ()
 Reset state of the container. More...
 
bool isConsistent () const
 Check if the container is consistent with the backend storage. More...
 
const std::set< Name > & getIdentityNames () const
 
const std::unordered_map< Name, shared_ptr< detail::IdentityImpl > > & getLoadedIdentities () const
 

Public Attributes

NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE __pad0__: explicit IdentityContainer(shared_ptr<PibImpl> pibImpl)
 

Friends

class Pib
 

Detailed Description

Container of identities of a Pib.

The container is used to search/enumerate identities of a Pib. The container can be created only by Pib.

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

Member Typedef Documentation

◆ iterator

Member Function Documentation

◆ begin()

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

◆ end()

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

◆ find()

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

◆ size()

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

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

◆ add()

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

Add identity into the container.

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

Referenced by ndn::security::pib::Pib::addIdentity(), and ndn::security::pib::Pib::setDefaultIdentity().

◆ remove()

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

Remove identity from the container.

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

Referenced by ndn::security::pib::Pib::removeIdentity().

◆ get()

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

Get identity from the container.

Exceptions
Pib::Erroridentity does not exist

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

Referenced by ndn::security::pib::Pib::getDefaultIdentity(), ndn::security::pib::Pib::getIdentity(), and ndn::security::pib::IdentityContainer::const_iterator::operator*().

◆ reset()

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

Reset state of the container.

This method removes all loaded identities and retrieves identity names from the PIB implementation.

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

Referenced by ndn::security::pib::Pib::reset().

◆ 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 156 of file identity-container.cpp.

Referenced by ndn::security::pib::Pib::addIdentity(), ndn::security::pib::Pib::getDefaultIdentity(), ndn::security::pib::Pib::getIdentities(), ndn::security::pib::Pib::getIdentity(), ndn::security::pib::Pib::removeIdentity(), and ndn::security::pib::Pib::setDefaultIdentity().

◆ getIdentityNames()

const std::set<Name>& ndn::security::pib::IdentityContainer::getIdentityNames ( ) const
inline

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

◆ getLoadedIdentities()

const std::unordered_map<Name, shared_ptr<detail::IdentityImpl> >& ndn::security::pib::IdentityContainer::getLoadedIdentities ( ) const
inline

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

Friends And Related Function Documentation

◆ Pib

friend class Pib
friend

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

Member Data Documentation

◆ __pad0__

NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE ndn::security::pib::IdentityContainer::__pad0__

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


The documentation for this class was generated from the following files: