blob: 7933f33c34be0ad101de3112f4f21ed49843f0b8 [file] [log] [blame]
Junxiao Shibb5105f2014-03-03 12:06:45 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
3 * Copyright (C) 2014 Named Data Networking Project
4 * See COPYING for copyright and distribution information.
5 */
6
7#include "strategy-choice-entry.hpp"
Alexander Afanasyevbf9edee2014-03-31 23:05:27 -07008#include "core/logger.hpp"
9#include "fw/strategy.hpp"
10
11NFD_LOG_INIT("StrategyChoiceEntry");
Junxiao Shibb5105f2014-03-03 12:06:45 -070012
13namespace nfd {
14namespace strategy_choice {
15
16Entry::Entry(const Name& prefix)
17 : m_prefix(prefix)
18{
19}
20
21void
22Entry::setStrategy(shared_ptr<fw::Strategy> strategy)
23{
24 BOOST_ASSERT(static_cast<bool>(strategy));
25 m_strategy = strategy;
Alexander Afanasyevbf9edee2014-03-31 23:05:27 -070026
27 NFD_LOG_INFO("Set strategy " << strategy->getName() << " for " << m_prefix << " prefix");
Junxiao Shibb5105f2014-03-03 12:06:45 -070028}
29
30} // namespace strategy_choice
31} // namespace nfd