NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
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_V2_ADDITIONAL_DESCRIPTION_HPP
23
#define NDN_SECURITY_V2_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
namespace
v2 {
33
38
class
AdditionalDescription
39
{
40
public
:
41
class
Error
:
public
tlv::Error
42
{
43
public
:
44
explicit
45
Error
(
const
std::string& what)
46
: tlv::
Error
(what)
47
{
48
}
49
};
50
51
typedef
std::map<std::string, std::string>::iterator
iterator
;
52
typedef
std::map<std::string, std::string>::const_iterator
const_iterator
;
53
54
public
:
55
59
AdditionalDescription
() =
default
;
60
64
explicit
65
AdditionalDescription
(
const
Block
& block);
66
67
const
std::string&
68
get
(
const
std::string& key)
const
;
69
70
void
71
set
(
const
std::string& key,
const
std::string& value);
72
73
bool
74
has
(
const
std::string& key)
const
;
75
76
size_t
77
size
()
const
78
{
79
return
m_info.size();
80
}
81
82
iterator
83
begin
();
84
85
iterator
86
end
();
87
88
const_iterator
89
begin
()
const
;
90
91
const_iterator
92
end
()
const
;
93
96
template
<encoding::Tag TAG>
97
size_t
98
wireEncode
(
EncodingImpl<TAG>
& encoder)
const
;
99
102
const
Block
&
103
wireEncode
()
const
;
104
108
void
109
wireDecode
(
const
Block
& wire);
110
111
public
:
// EqualityComparable concept
112
113
bool
114
operator==
(
const
AdditionalDescription
& other)
const
;
115
116
bool
117
operator!=
(
const
AdditionalDescription
& other)
const
;
118
119
private
:
120
121
std::map<std::string, std::string> m_info;
122
123
mutable
Block
m_wire;
124
};
125
126
std::ostream&
127
operator<<
(std::ostream& os,
const
AdditionalDescription
& period);
128
129
}
// namespace v2
130
131
using
v2::AdditionalDescription
;
132
133
}
// namespace security
134
}
// namespace ndn
135
136
#endif // NDN_SECURITY_V2_ADDITIONAL_DESCRIPTION_HPP
ndn::security::v2::AdditionalDescription::has
bool has(const std::string &key) const
Definition:
additional-description.cpp:62
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::security::v2::AdditionalDescription::const_iterator
std::map< std::string, std::string >::const_iterator const_iterator
Definition:
additional-description.hpp:52
ndn::security::v2::AdditionalDescription::end
iterator end()
Definition:
additional-description.cpp:74
ndn::security::v2::AdditionalDescription
Abstraction of AdditionalDescription.
Definition:
additional-description.hpp:38
ndn::security::v2::AdditionalDescription::Error
Definition:
additional-description.hpp:41
ndn::security::v2::AdditionalDescription::wireDecode
void wireDecode(const Block &wire)
Decode ValidityPeriod from TLV block.
Definition:
additional-description.cpp:137
ndn::Block
Class representing a wire element of NDN-TLV packet format.
Definition:
block.hpp:43
ndn::security::v2::AdditionalDescription::iterator
std::map< std::string, std::string >::iterator iterator
Definition:
additional-description.hpp:51
ndn::security::v2::AdditionalDescription::wireEncode
const Block & wireEncode() const
Encode ValidityPeriod into TLV block.
Definition:
additional-description.cpp:119
ndn::security::v2::AdditionalDescription::operator==
bool operator==(const AdditionalDescription &other) const
Definition:
additional-description.cpp:170
nfd::cs::iterator
Table::const_iterator iterator
Definition:
cs-internal.hpp:41
ndn::encoding::EncodingImpl
Definition:
encoding-buffer-fwd.hpp:45
ndn::security::v2::AdditionalDescription::AdditionalDescription
AdditionalDescription()=default
Create an empty AdditionalDescription.
ndn::security::v2::AdditionalDescription::Error::Error
Error(const std::string &what)
Definition:
additional-description.hpp:45
ndn::security::v2::operator<<
std::ostream & operator<<(std::ostream &os, const AdditionalDescription &other)
Definition:
additional-description.cpp:182
ndn::tlv::AdditionalDescription
Definition:
tlv.hpp:111
ndn::security::v2::AdditionalDescription::begin
iterator begin()
Definition:
additional-description.cpp:68
ndn::security::v2::AdditionalDescription::operator!=
bool operator!=(const AdditionalDescription &other) const
Definition:
additional-description.cpp:176
ndn::security::v2::AdditionalDescription::size
size_t size() const
Definition:
additional-description.hpp:77
security
ndn::tlv::Error
represents an error in TLV encoding or decoding
Definition:
tlv.hpp:50
ndnSIM
ndn-cxx
src
security
v2
additional-description.hpp
Generated on Wed Jan 11 2017 18:17:14 for ndnSIM by
1.8.13