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;
95 InsertResult(Status status,
const std::string& exceptionMessage =
"");
99 std::string m_exceptionMessage;
112 insert(
const Name& prefix,
const Name& strategyName);
119 erase(
const Name& prefix);
124 std::pair<bool, Name>
125 get(
const Name& prefix)
const;
159 return this->getRange().begin();
168 return this->getRange().end();
173 changeStrategy(
Entry& entry,
181 findEffectiveStrategyImpl(
const K& key)
const;
188 NameTree& m_nameTree;
201 #endif // NFD_DAEMON_TABLE_STRATEGY_CHOICE_HPP StrategyChoice(Forwarder &forwarder)
bool isRegistered() const
represents a Measurements entry
represents the Strategy Choice table
InsertResult insert(const Name &prefix, const Name &strategyName)
set strategy of prefix to be strategyName
friend std::ostream & operator<<(std::ostream &, const InsertResult &)
boost::transformed_range< name_tree::GetTableEntry< Entry >, const name_tree::Range > Range
boost::range_iterator< Range >::type const_iterator
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
void setDefaultStrategy(const Name &strategyName)
set the default strategy
represents a Strategy Choice entry
represents a forwarding strategy
boost::iterator_range< Iterator > Range
a Forward Range of name tree entries
const_iterator begin() const
fw::Strategy & findEffectiveStrategy(const Name &prefix) const
get effective strategy for prefix
const_iterator end() const
void erase(const Name &prefix)
make prefix to inherit strategy from its parent