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
available-strategies.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#include "
best-route-strategy.hpp
"
27
#include "
broadcast-strategy.hpp
"
28
#include "
client-control-strategy.hpp
"
29
#include "
ncc-strategy.hpp
"
30
#include "
best-route-strategy2.hpp
"
31
32
namespace
nfd {
33
namespace
fw {
34
35
shared_ptr<Strategy>
36
makeDefaultStrategy
(
Forwarder
& forwarder)
37
{
38
return
make_shared<BestRouteStrategy2>(ref(forwarder));
39
}
40
41
template
<
typename
S>
42
inline
void
43
installStrategy
(
Forwarder
& forwarder)
44
{
45
StrategyChoice
& strategyChoice = forwarder.
getStrategyChoice
();
46
if
(!strategyChoice.
hasStrategy
(S::STRATEGY_NAME)) {
47
strategyChoice.
install
(make_shared<S>(ref(forwarder)));
48
}
49
}
50
51
void
52
installStrategies
(
Forwarder
& forwarder)
53
{
54
installStrategy<BestRouteStrategy>(forwarder);
55
installStrategy<BroadcastStrategy>(forwarder);
56
installStrategy<ClientControlStrategy>(forwarder);
57
installStrategy<NccStrategy>(forwarder);
58
installStrategy<BestRouteStrategy2>(forwarder);
59
}
60
61
}
// namespace fw
62
}
// namespace nfd
nfd::StrategyChoice
represents the Strategy Choice table
Definition:
strategy-choice.hpp:45
nfd::Forwarder::getStrategyChoice
StrategyChoice & getStrategyChoice()
Definition:
forwarder.hpp:297
nfd::fw::installStrategies
void installStrategies(Forwarder &forwarder)
Definition:
available-strategies.cpp:52
nfd::Forwarder
main class of NFD
Definition:
forwarder.hpp:54
best-route-strategy2.hpp
nfd::fw::makeDefaultStrategy
shared_ptr< Strategy > makeDefaultStrategy(Forwarder &forwarder)
Definition:
available-strategies.cpp:36
broadcast-strategy.hpp
nfd::fw::installStrategy
void installStrategy(Forwarder &forwarder)
Definition:
available-strategies.cpp:43
nfd::StrategyChoice::install
bool install(shared_ptr< fw::Strategy > strategy)
install a strategy
Definition:
strategy-choice.cpp:58
nfd::StrategyChoice::hasStrategy
bool hasStrategy(const Name &strategyName, bool isExact=false) const
determines if a strategy is installed
Definition:
strategy-choice.cpp:47
best-route-strategy.hpp
ncc-strategy.hpp
client-control-strategy.hpp
ndnSIM
NFD
daemon
fw
available-strategies.cpp
Generated on Wed Feb 18 2015 16:31:16 for ndnSIM by
1.8.7