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;
120 insert(
const Name& prefix,
const Name& strategyName);
126 erase(
const Name& prefix);
131 std::pair<bool, Name>
132 get(
const Name& prefix)
const;
166 return this->getRange().begin();
175 return this->getRange().end();
180 changeStrategy(
Entry& entry,
188 findEffectiveStrategyImpl(
const K& key)
const;
208 #endif // NFD_DAEMON_TABLE_STRATEGY_CHOICE_HPP StrategyChoice(Forwarder &forwarder)
Main class of NFD's forwarding engine.
A common index structure for FIB, PIT, StrategyChoice, and Measurements.
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 &)
const_iterator begin() const
boost::transformed_range< name_tree::GetTableEntry< Entry >, const name_tree::Range > Range
const_iterator end() const
fw::Strategy & findEffectiveStrategy(const Name &prefix) const
Get effective strategy for prefix.
boost::range_iterator< Range >::type const_iterator
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
int getStatusCode() const
Get a status code for use in management command response.
bool isRegistered() const
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
void erase(const Name &prefix)
Make prefix to inherit strategy from its parent.