ndn::security::AdditionalDescription Class Reference

Represents an AdditionalDescription TLV element. More...

#include <ndn-cxx/security/additional-description.hpp>

+ Inheritance diagram for ndn::security::AdditionalDescription:
+ Collaboration diagram for ndn::security::AdditionalDescription:

Classes

class  Error
 

Public Types

using const_iterator = std::map< std::string, std::string >::const_iterator
 
using iterator = std::map< std::string, std::string >::iterator
 

Public Member Functions

 AdditionalDescription ()=default
 Create an empty AdditionalDescription. More...
 
 AdditionalDescription (const Block &block)
 Create AdditionalDescription from block. More...
 
iterator begin ()
 
const_iterator begin () const
 
bool empty () const
 
iterator end ()
 
const_iterator end () const
 
const std::string & get (const std::string &key) const
 
bool has (const std::string &key) const
 
void set (const std::string &key, const std::string &value)
 
size_t size () const
 
void wireDecode (const Block &wire)
 Decode ValidityPeriod from TLV block. More...
 
const BlockwireEncode () const
 Encode ValidityPeriod into TLV block. More...
 
template<encoding::Tag TAG>
size_t wireEncode (EncodingImpl< TAG > &encoder) const
 Fast encoding or block size estimation. More...
 

Friends

bool operator== (const AdditionalDescription &lhs, const AdditionalDescription &rhs)
 

Detailed Description

Represents an AdditionalDescription TLV element.

See also
https://docs.named-data.net/NDN-packet-spec/0.3/certificate.html

Definition at line 36 of file additional-description.hpp.

Member Typedef Documentation

◆ const_iterator

using ndn::security::AdditionalDescription::const_iterator = std::map<std::string, std::string>::const_iterator

Definition at line 46 of file additional-description.hpp.

◆ iterator

using ndn::security::AdditionalDescription::iterator = std::map<std::string, std::string>::iterator

Definition at line 45 of file additional-description.hpp.

Constructor & Destructor Documentation

◆ AdditionalDescription() [1/2]

ndn::security::AdditionalDescription::AdditionalDescription ( )
default

Create an empty AdditionalDescription.

◆ AdditionalDescription() [2/2]

ndn::security::AdditionalDescription::AdditionalDescription ( const Block block)
explicit

Create AdditionalDescription from block.

Definition at line 31 of file additional-description.cpp.

Member Function Documentation

◆ begin() [1/2]

AdditionalDescription::iterator ndn::security::AdditionalDescription::begin ( )

Definition at line 59 of file additional-description.cpp.

◆ begin() [2/2]

AdditionalDescription::const_iterator ndn::security::AdditionalDescription::begin ( ) const

Definition at line 71 of file additional-description.cpp.

◆ empty()

bool ndn::security::AdditionalDescription::empty ( ) const
inline

Definition at line 76 of file additional-description.hpp.

◆ end() [1/2]

AdditionalDescription::iterator ndn::security::AdditionalDescription::end ( )

Definition at line 65 of file additional-description.cpp.

◆ end() [2/2]

AdditionalDescription::const_iterator ndn::security::AdditionalDescription::end ( ) const

Definition at line 77 of file additional-description.cpp.

◆ get()

const std::string & ndn::security::AdditionalDescription::get ( const std::string &  key) const

Definition at line 37 of file additional-description.cpp.

◆ has()

bool ndn::security::AdditionalDescription::has ( const std::string &  key) const

Definition at line 53 of file additional-description.cpp.

◆ set()

void ndn::security::AdditionalDescription::set ( const std::string &  key,
const std::string &  value 
)

Definition at line 47 of file additional-description.cpp.

◆ size()

size_t ndn::security::AdditionalDescription::size ( ) const
inline

Definition at line 70 of file additional-description.hpp.

◆ wireDecode()

void ndn::security::AdditionalDescription::wireDecode ( const Block wire)

Decode ValidityPeriod from TLV block.

Exceptions
Errorwhen an invalid TLV block supplied

Definition at line 124 of file additional-description.cpp.

◆ wireEncode() [1/2]

const Block & ndn::security::AdditionalDescription::wireEncode ( ) const

Encode ValidityPeriod into TLV block.

Definition at line 106 of file additional-description.cpp.

◆ wireEncode() [2/2]

template<encoding::Tag TAG>
size_t ndn::security::AdditionalDescription::wireEncode ( EncodingImpl< TAG > &  encoder) const

Fast encoding or block size estimation.

Definition at line 84 of file additional-description.cpp.

Friends And Related Function Documentation

◆ operator==

bool operator== ( const AdditionalDescription lhs,
const AdditionalDescription rhs 
)
friend

Definition at line 116 of file additional-description.hpp.