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
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
measurements-accessor.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#include "
measurements-accessor.hpp
"
27
28
namespace
nfd {
29
30
using
fw::Strategy
;
31
32
MeasurementsAccessor::MeasurementsAccessor
(
Measurements
& measurements,
33
StrategyChoice
& strategyChoice,
34
Strategy
* strategy)
35
: m_measurements(measurements)
36
, m_strategyChoice(strategyChoice)
37
, m_strategy(strategy)
38
{
39
}
40
41
MeasurementsAccessor::~MeasurementsAccessor
()
42
{
43
}
44
45
shared_ptr<measurements::Entry>
46
MeasurementsAccessor::filter(
const
shared_ptr<measurements::Entry>& entry)
47
{
48
if
(!static_cast<bool>(entry)) {
49
return
entry;
50
}
51
52
Strategy
& effectiveStrategy = m_strategyChoice.
findEffectiveStrategy
(*entry);
53
if
(&effectiveStrategy == m_strategy) {
54
return
entry;
55
}
56
return
shared_ptr<measurements::Entry>();
57
}
58
59
}
// namespace nfd
nfd::StrategyChoice::findEffectiveStrategy
fw::Strategy & findEffectiveStrategy(const Name &prefix) const
get effective strategy for prefix
Definition:
strategy-choice.cpp:166
nfd::StrategyChoice
represents the Strategy Choice table
Definition:
strategy-choice.hpp:45
nfd::Measurements
Definition:
measurements.hpp:46
nfd::fw::Strategy
Strategy
Definition:
strategy.cpp:33
measurements-accessor.hpp
nfd::MeasurementsAccessor::MeasurementsAccessor
MeasurementsAccessor(Measurements &measurements, StrategyChoice &strategyChoice, fw::Strategy *strategy)
Definition:
measurements-accessor.cpp:32
nfd::MeasurementsAccessor::~MeasurementsAccessor
~MeasurementsAccessor()
Definition:
measurements-accessor.cpp:41
ndnSIM
NFD
daemon
table
measurements-accessor.cpp
Generated on Wed Feb 18 2015 16:31:16 for ndnSIM by
1.8.7