NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
additional-description.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#ifndef NDN_SECURITY_ADDITIONAL_DESCRIPTION_HPP
23
#define NDN_SECURITY_ADDITIONAL_DESCRIPTION_HPP
24
25
#include "../common.hpp"
26
#include "../encoding/tlv.hpp"
27
#include "../encoding/block.hpp"
28
#include <map>
29
30
namespace
ndn
{
31
namespace
security {
32
37
class
AdditionalDescription
38
{
39
public
:
40
class
Error
:
public
tlv::Error
41
{
42
public
:
43
explicit
44
Error
(
const
std::string& what)
45
: tlv::
Error
(what)
46
{
47
}
48
};
49
50
typedef
std::map<std::string, std::string>::iterator
iterator
;
51
typedef
std::map<std::string, std::string>::const_iterator
const_iterator
;
52
53
public
:
54
58
AdditionalDescription
() =
default
;
59
63
explicit
64
AdditionalDescription
(
const
Block
& block);
65
66
const
std::string&
67
get
(
const
std::string& key)
const
;
68
69
void
70
set
(
const
std::string& key,
const
std::string& value);
71
72
bool
73
has
(
const
std::string& key)
const
;
74
75
size_t
76
size
()
const
77
{
78
return
m_info.size();
79
}
80
81
iterator
82
begin
();
83
84
iterator
85
end
();
86
87
const_iterator
88
begin
()
const
;
89
90
const_iterator
91
end
()
const
;
92
95
template
<encoding::Tag TAG>
96
size_t
97
wireEncode
(EncodingImpl<TAG>& encoder)
const
;
98
101
const
Block
&
102
wireEncode
()
const
;
103
107
void
108
wireDecode
(
const
Block
& wire);
109
110
public
:
// EqualityComparable concept
111
112
bool
113
operator==
(
const
AdditionalDescription
& other)
const
;
114
115
bool
116
operator!=
(
const
AdditionalDescription
& other)
const
;
117
118
private
:
119
120
std::map<std::string, std::string> m_info;
121
122
mutable
Block
m_wire;
123
};
124
125
std::ostream&
126
operator<<
(std::ostream& os,
const
AdditionalDescription
& period);
127
128
}
// namespace security
129
}
// namespace ndn
130
131
#endif // NDN_SECURITY_ADDITIONAL_DESCRIPTION_HPP
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::security::AdditionalDescription::size
size_t size() const
Definition:
additional-description.hpp:76
ndn::security::AdditionalDescription::has
bool has(const std::string &key) const
Definition:
additional-description.cpp:61
ndn::security::AdditionalDescription::AdditionalDescription
AdditionalDescription()=default
Create an empty AdditionalDescription.
ndn::Block
Class representing a wire element of NDN-TLV packet format.
Definition:
block.hpp:43
ndn::security::operator<<
std::ostream & operator<<(std::ostream &os, const AdditionalDescription &other)
Definition:
additional-description.cpp:181
ndn::security::AdditionalDescription::iterator
std::map< std::string, std::string >::iterator iterator
Definition:
additional-description.hpp:50
nfd::cs::iterator
Table::const_iterator iterator
Definition:
cs-internal.hpp:41
ndn::security::AdditionalDescription::wireEncode
const Block & wireEncode() const
Encode ValidityPeriod into TLV block.
Definition:
additional-description.cpp:118
ndn::security::AdditionalDescription::end
iterator end()
Definition:
additional-description.cpp:73
ndn::security::AdditionalDescription::begin
iterator begin()
Definition:
additional-description.cpp:67
ndn::security::AdditionalDescription::operator!=
bool operator!=(const AdditionalDescription &other) const
Definition:
additional-description.cpp:175
ndn::security::AdditionalDescription::wireDecode
void wireDecode(const Block &wire)
Decode ValidityPeriod from TLV block.
Definition:
additional-description.cpp:136
ndn::security::AdditionalDescription::operator==
bool operator==(const AdditionalDescription &other) const
Definition:
additional-description.cpp:169
ndn::security::AdditionalDescription
Abstraction of AdditionalDescription.
Definition:
additional-description.hpp:37
ndn::security::AdditionalDescription::Error::Error
Error(const std::string &what)
Definition:
additional-description.hpp:44
ndn::security::AdditionalDescription::Error
Definition:
additional-description.hpp:40
ndn::security::AdditionalDescription::const_iterator
std::map< std::string, std::string >::const_iterator const_iterator
Definition:
additional-description.hpp:51
ndn::tlv::Error
represents an error in TLV encoding or decoding
Definition:
tlv.hpp:50
ndnSIM
ndn-cxx
src
security
additional-description.hpp
Generated on Tue Feb 23 2016 22:18:43 for ndnSIM by
1.8.11