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;
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 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.
Main class of NFD's forwarding engine.
StrategyChoice(Forwarder &forwarder)
InsertResult insert(const Name &prefix, const Name &strategyName)
Set strategy of prefix to be strategyName.
Represents a Measurements entry.
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.