26 #ifndef NFD_DAEMON_TABLE_STRATEGY_CHOICE_HPP 27 #define NFD_DAEMON_TABLE_STRATEGY_CHOICE_HPP 32 #include <boost/range/adaptor/transformed.hpp> 38 namespace strategy_choice {
77 return m_status == OK;
83 return m_status == OK || m_status == EXCEPTION;
91 return static_cast<int>(m_status);
103 InsertResult(Status status,
const std::string& exceptionMessage =
"");
107 std::string m_exceptionMessage;
132 std::pair<bool, Name>
167 return this->getRange().begin();
176 return this->getRange().end();
181 changeStrategy(
Entry& entry,
189 findEffectiveStrategyImpl(
const K& key)
const;
209 #endif // NFD_DAEMON_TABLE_STRATEGY_CHOICE_HPP int getStatusCode() const
get a status code for use in management command response
boost::range_iterator< Range >::type const_iterator
void erase(const Name &prefix)
make prefix to inherit strategy from its parent
std::pair< bool, Name > get(const Name &prefix) const
get strategy Name of prefix
StrategyChoice(Forwarder &forwarder)
InsertResult insert(const Name &prefix, const Name &strategyName)
set strategy of prefix to be strategyName
represents a Measurements entry
std::ostream & operator<<(std::ostream &os, const StrategyChoice::InsertResult &res)
bool isRegistered() const
Copyright (c) 2011-2015 Regents of the University of California.
fw::Strategy & findEffectiveStrategy(const Name &prefix) const
get effective strategy for prefix
Represents an absolute name.
void setDefaultStrategy(const Name &strategyName)
set the default strategy
friend std::ostream & operator<<(std::ostream &, const InsertResult &)
represents a Strategy Choice entry
const_iterator end() const
represents a forwarding strategy
boost::transformed_range< name_tree::GetTableEntry< Entry >, const name_tree::Range > Range
a common index structure for FIB, PIT, StrategyChoice, and Measurements
const_iterator begin() const
boost::iterator_range< Iterator > Range
a Forward Range of name tree entries
represents the Strategy Choice table