Represents an AdditionalDescription TLV element. More...
#include <additional-description.hpp>
Classes | |
class | Error |
Public Types | |
typedef std::map< std::string, std::string >::iterator | iterator |
typedef std::map< std::string, std::string >::const_iterator | const_iterator |
Public Member Functions | |
AdditionalDescription ()=default | |
Create an empty AdditionalDescription. More... | |
AdditionalDescription (const Block &block) | |
Create AdditionalDescription from block . More... | |
const std::string & | get (const std::string &key) const |
void | set (const std::string &key, const std::string &value) |
bool | has (const std::string &key) const |
size_t | size () const |
bool | empty () const |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
template<encoding::Tag TAG> | |
size_t | wireEncode (EncodingImpl< TAG > &encoder) const |
Fast encoding or block size estimation. More... | |
const Block & | wireEncode () const |
Encode ValidityPeriod into TLV block. More... | |
void | wireDecode (const Block &wire) |
Decode ValidityPeriod from TLV block. More... | |
Friends | |
bool | operator== (const AdditionalDescription &lhs, const AdditionalDescription &rhs) |
bool | operator!= (const AdditionalDescription &lhs, const AdditionalDescription &rhs) |
Represents an AdditionalDescription TLV element.
Definition at line 39 of file additional-description.hpp.
typedef std::map<std::string, std::string>::iterator ndn::security::v2::AdditionalDescription::iterator |
Definition at line 48 of file additional-description.hpp.
typedef std::map<std::string, std::string>::const_iterator ndn::security::v2::AdditionalDescription::const_iterator |
Definition at line 49 of file additional-description.hpp.
|
default |
Create an empty AdditionalDescription.
|
explicit |
Create AdditionalDescription from block
.
Definition at line 41 of file additional-description.cpp.
References wireDecode().
const std::string & ndn::security::v2::AdditionalDescription::get | ( | const std::string & | key | ) | const |
Definition at line 47 of file additional-description.cpp.
References NDN_THROW.
void ndn::security::v2::AdditionalDescription::set | ( | const std::string & | key, |
const std::string & | value | ||
) |
Definition at line 57 of file additional-description.cpp.
bool ndn::security::v2::AdditionalDescription::has | ( | const std::string & | key | ) | const |
Definition at line 63 of file additional-description.cpp.
|
inline |
Definition at line 73 of file additional-description.hpp.
|
inline |
Definition at line 79 of file additional-description.hpp.
References begin(), end(), wireDecode(), and wireEncode().
AdditionalDescription::iterator ndn::security::v2::AdditionalDescription::begin | ( | ) |
Definition at line 69 of file additional-description.cpp.
Referenced by empty().
AdditionalDescription::iterator ndn::security::v2::AdditionalDescription::end | ( | ) |
Definition at line 75 of file additional-description.cpp.
Referenced by empty().
AdditionalDescription::const_iterator ndn::security::v2::AdditionalDescription::begin | ( | ) | const |
Definition at line 81 of file additional-description.cpp.
AdditionalDescription::const_iterator ndn::security::v2::AdditionalDescription::end | ( | ) | const |
Definition at line 87 of file additional-description.cpp.
size_t ndn::security::v2::AdditionalDescription::wireEncode | ( | EncodingImpl< TAG > & | encoder | ) | const |
Fast encoding or block size estimation.
Definition at line 94 of file additional-description.cpp.
References ndn::tlv::AdditionalDescription, ndn::tlv::DescriptionEntry, ndn::tlv::DescriptionKey, ndn::tlv::DescriptionValue, ndn::security::v2::NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(), and ndn::encoding::prependStringBlock().
const Block & ndn::security::v2::AdditionalDescription::wireEncode | ( | ) | const |
Encode ValidityPeriod into TLV block.
Definition at line 116 of file additional-description.cpp.
References ndn::Block::hasWire(), and ndn::Block::parse().
Referenced by empty().
void ndn::security::v2::AdditionalDescription::wireDecode | ( | const Block & | wire | ) |
Decode ValidityPeriod from TLV block.
Error | when an invalid TLV block supplied |
Definition at line 134 of file additional-description.cpp.
References ndn::tlv::AdditionalDescription, ndn::tlv::DescriptionEntry, ndn::tlv::DescriptionKey, ndn::tlv::DescriptionValue, ndn::Block::elements(), ndn::Block::elements_begin(), ndn::Block::elements_end(), ndn::Block::elements_size(), ndn::Block::hasWire(), ndn::security::v2::KEY_OFFSET, NDN_THROW, ndn::Block::parse(), ndn::encoding::readString(), ndn::Block::type(), and ndn::security::v2::VALUE_OFFSET.
Referenced by AdditionalDescription(), and empty().
|
friend |
Definition at line 118 of file additional-description.hpp.
|
friend |
Definition at line 124 of file additional-description.hpp.