NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
registered-prefix.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2013-2019 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 
22 #ifndef NDN_IMPL_REGISTERED_PREFIX_HPP
23 #define NDN_IMPL_REGISTERED_PREFIX_HPP
24 
28 
29 namespace ndn {
30 
34 class RegisteredPrefixId;
35 
36 static_assert(sizeof(const RegisteredPrefixId*) == sizeof(RecordId), "");
37 
41 class RegisteredPrefix : public RecordBase<RegisteredPrefix>
42 {
43 public:
44  RegisteredPrefix(const Name& prefix, const nfd::CommandOptions& options,
45  RecordId filterId = 0)
46  : m_prefix(prefix)
47  , m_options(options)
48  , m_filterId(filterId)
49  {
50  }
51 
52  const Name&
53  getPrefix() const
54  {
55  return m_prefix;
56  }
57 
58  const nfd::CommandOptions&
60  {
61  return m_options;
62  }
63 
64  RecordId
65  getFilterId() const
66  {
67  return m_filterId;
68  }
69 
70 private:
71  Name m_prefix;
72  nfd::CommandOptions m_options;
73  RecordId m_filterId;
74 };
75 
76 } // namespace ndn
77 
78 #endif // NDN_IMPL_REGISTERED_PREFIX_HPP
ndn::RegisteredPrefix::getCommandOptions
const nfd::CommandOptions & getCommandOptions() const
Definition: registered-prefix.hpp:59
ndn::RegisteredPrefix
stores information about a prefix registered in NDN forwarder
Definition: registered-prefix.hpp:42
interest-filter-record.hpp
ndn::RecordId
uintptr_t RecordId
Definition: record-container.hpp:32
ndn::Name
Represents an absolute name.
Definition: name.hpp:44
ndn::RegisteredPrefix::getPrefix
const Name & getPrefix() const
Definition: registered-prefix.hpp:53
ndn::nfd::CommandOptions
contains options for ControlCommand execution
Definition: command-options.hpp:35
ndn::RegisteredPrefix::getFilterId
RecordId getFilterId() const
Definition: registered-prefix.hpp:65
ndn::RegisteredPrefix::RegisteredPrefix
RegisteredPrefix(const Name &prefix, const nfd::CommandOptions &options, RecordId filterId=0)
Definition: registered-prefix.hpp:44
ndn::RecordBase
Template of PendingInterest, RegisteredPrefix, and InterestFilterRecord.
Definition: record-container.hpp:42
command-options.hpp
control-parameters.hpp
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition: ndn-strategy-choice-helper.hpp:34