NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
prefix-announcement.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2013-2018 Regents of the University of California.
4
*
5
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
6
*
7
* ndn-cxx library is free software: you can redistribute it and/or modify it under the
8
* terms of the GNU Lesser General Public License as published by the Free Software
9
* Foundation, either version 3 of the License, or (at your option) any later version.
10
*
11
* ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
12
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
14
*
15
* You should have received copies of the GNU General Public License and GNU Lesser
16
* General Public License along with ndn-cxx, e.g., in COPYING.md file. If not, see
17
* <http://www.gnu.org/licenses/>.
18
*
19
* See AUTHORS.md for complete list of ndn-cxx authors and contributors.
20
*
21
* @author Teng Liang <philoliang@email.arizona.edu>
22
*/
23
24
#ifndef NDN_CXX_LP_PREFIX_ANNOUNCEMENT_HPP
25
#define NDN_CXX_LP_PREFIX_ANNOUNCEMENT_HPP
26
27
#include "../data.hpp"
28
#include "../name.hpp"
29
30
namespace
ndn
{
31
namespace
lp
{
32
40
class
PrefixAnnouncement
41
{
42
public
:
43
class
Error
:
public
ndn::tlv::Error
44
{
45
public
:
46
explicit
47
Error
(
const
std::string& what)
48
:
ndn
::tlv::
Error
(what)
49
{
50
}
51
};
52
53
PrefixAnnouncement
();
54
55
explicit
56
PrefixAnnouncement
(
const
Block
& block);
57
58
explicit
59
PrefixAnnouncement
(shared_ptr<const Data> data);
60
61
template
<encoding::Tag TAG>
62
size_t
63
wireEncode
(
EncodingImpl<TAG>
& encoder)
const
;
64
65
void
66
wireDecode
(
const
Block
& wire);
67
71
Name
72
getAnnouncedName
()
const
;
73
74
shared_ptr<const Data>
75
getData
()
const
76
{
77
return
m_data;
78
}
79
80
PrefixAnnouncement
&
81
setData
(shared_ptr<const Data> data);
82
83
private
:
84
shared_ptr<const Data> m_data;
85
};
86
87
NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS
(
PrefixAnnouncement
);
88
89
}
// namespace lp
90
}
// namespace ndn
91
92
#endif // NDN_CXX_LP_PREFIX_ANNOUNCEMENT_HPP
ndn::lp::NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS
NDN_CXX_DECLARE_WIRE_ENCODE_INSTANTIATIONS(CachePolicy)
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::lp::PrefixAnnouncement::PrefixAnnouncement
PrefixAnnouncement()
ndn::lp::PrefixAnnouncement::Error
Definition:
prefix-announcement.hpp:43
ndn::Block
Represents a TLV element of NDN packet format.
Definition:
block.hpp:42
ndn::lp::PrefixAnnouncement::setData
PrefixAnnouncement & setData(shared_ptr< const Data > data)
Definition:
prefix-announcement.cpp:83
ndn::lp::PrefixAnnouncement::Error::Error
Error(const std::string &what)
Definition:
prefix-announcement.hpp:47
ndn::lp::PrefixAnnouncement::wireDecode
void wireDecode(const Block &wire)
Definition:
prefix-announcement.cpp:58
ndn::lp::tlv::PrefixAnnouncement
Definition:
tlv.hpp:49
ndn::lp::PrefixAnnouncement::wireEncode
size_t wireEncode(EncodingImpl< TAG > &encoder) const
Definition:
prefix-announcement.cpp:46
ndn::Name
Represents an absolute name.
Definition:
name.hpp:42
ndn::encoding::EncodingImpl
Definition:
encoding-buffer-fwd.hpp:36
ndn::lp::PrefixAnnouncement
represents a Prefix Announcement
Definition:
prefix-announcement.hpp:40
ndn::lp::PrefixAnnouncement::getAnnouncedName
Name getAnnouncedName() const
Get announced name.
Definition:
prefix-announcement.cpp:69
ndn::lp
Definition:
cache-policy.cpp:28
ndn::lp::PrefixAnnouncement::getData
shared_ptr< const Data > getData() const
Definition:
prefix-announcement.hpp:75
ndn::tlv::Error
represents an error in TLV encoding or decoding
Definition:
tlv.hpp:50
ndnSIM
ndn-cxx
src
lp
prefix-announcement.hpp
Generated on Tue Aug 7 2018 16:19:16 for ndnSIM by
1.8.14