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
registered-prefix.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#ifndef NDN_DETAIL_REGISTERED_PREFIX_HPP
23
#define NDN_DETAIL_REGISTERED_PREFIX_HPP
24
25
#include "../common.hpp"
26
#include "../name.hpp"
27
#include "../interest.hpp"
28
29
#include "
interest-filter-record.hpp
"
30
#include "
management/nfd-command-options.hpp
"
31
#include "
management/nfd-control-parameters.hpp
"
32
33
namespace
ndn
{
34
35
class
RegisteredPrefix
: noncopyable
36
{
37
public
:
40
typedef
function<void(const nfd::ControlParameters&)>
SuccessCallback
;
41
44
typedef
function
<void(uint32_t
/*code*/
,
const
std::string&
/*reason*/
)>
FailureCallback
;
45
46
RegisteredPrefix
(
const
Name
& prefix,
47
const
shared_ptr<InterestFilterRecord>& filter,
48
const
nfd::CommandOptions
& options)
49
: m_prefix(prefix)
50
, m_filter(filter)
51
, m_options(options)
52
{
53
}
54
55
const
Name
&
56
getPrefix
()
const
57
{
58
return
m_prefix;
59
}
60
61
const
shared_ptr<InterestFilterRecord>&
62
getFilter
()
const
63
{
64
return
m_filter;
65
}
66
67
const
nfd::CommandOptions
&
68
getCommandOptions
()
const
69
{
70
return
m_options;
71
}
72
73
private
:
74
Name
m_prefix;
75
shared_ptr<InterestFilterRecord> m_filter;
76
nfd::CommandOptions
m_options;
77
};
78
82
class
RegisteredPrefixId;
83
87
class
MatchRegisteredPrefixId
88
{
89
public
:
90
explicit
91
MatchRegisteredPrefixId
(
const
RegisteredPrefixId* registeredPrefixId)
92
: m_id(registeredPrefixId)
93
{
94
}
95
96
bool
97
operator()
(
const
shared_ptr<RegisteredPrefix>& registeredPrefix)
const
98
{
99
return
(reinterpret_cast<const RegisteredPrefixId*>(registeredPrefix.get()) == m_id);
100
}
101
private
:
102
const
RegisteredPrefixId* m_id;
103
};
104
105
106
}
// namespace ndn
107
108
#endif // NDN_DETAIL_REGISTERED_PREFIX_HPP
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::RegisteredPrefix::RegisteredPrefix
RegisteredPrefix(const Name &prefix, const shared_ptr< InterestFilterRecord > &filter, const nfd::CommandOptions &options)
Definition:
registered-prefix.hpp:46
ndn::RegisteredPrefix::FailureCallback
function< void(uint32_t, const std::string &)> FailureCallback
a callback on command failure
Definition:
registered-prefix.hpp:44
ndn::MatchRegisteredPrefixId::MatchRegisteredPrefixId
MatchRegisteredPrefixId(const RegisteredPrefixId *registeredPrefixId)
Definition:
registered-prefix.hpp:91
ndn::RegisteredPrefix::SuccessCallback
function< void(const nfd::ControlParameters &)> SuccessCallback
a callback on command success
Definition:
registered-prefix.hpp:40
ndn::RegisteredPrefix::getPrefix
const Name & getPrefix() const
Definition:
registered-prefix.hpp:56
ndn::MatchRegisteredPrefixId::operator()
bool operator()(const shared_ptr< RegisteredPrefix > ®isteredPrefix) const
Definition:
registered-prefix.hpp:97
ndn::RegisteredPrefix::getFilter
const shared_ptr< InterestFilterRecord > & getFilter() const
Definition:
registered-prefix.hpp:62
ndn::RegisteredPrefix
Definition:
registered-prefix.hpp:35
ndn::nfd::CommandOptions
contains options for ControlCommand execution
Definition:
nfd-command-options.hpp:39
nfd-control-parameters.hpp
ndn::Name
Name abstraction to represent an absolute name.
Definition:
name.hpp:46
interest-filter-record.hpp
nfd-command-options.hpp
ndn::MatchRegisteredPrefixId
Functor to match RegisteredPrefixId.
Definition:
registered-prefix.hpp:87
ndn::RegisteredPrefix::getCommandOptions
const nfd::CommandOptions & getCommandOptions() const
Definition:
registered-prefix.hpp:68
ndnSIM
ndn-cxx
src
detail
registered-prefix.hpp
Generated on Tue Feb 23 2016 22:18:43 for ndnSIM by
1.8.11