26 #ifndef NFD_DAEMON_TABLE_STRATEGY_CHOICE_HPP 27 #define NFD_DAEMON_TABLE_STRATEGY_CHOICE_HPP 63 install(shared_ptr<fw::Strategy> strategy);
89 get(
const Name& prefix)
const;
106 :
public std::iterator<std::forward_iterator_tag, const strategy_choice::Entry>
117 shared_ptr<strategy_choice::Entry>
151 getStrategy(
const Name& strategyName)
const;
154 setDefaultStrategy(shared_ptr<fw::Strategy> strategy);
168 typedef std::map<Name, shared_ptr<fw::Strategy> > StrategyInstanceTable;
169 StrategyInstanceTable m_strategyInstances;
186 : m_nameTreeIterator(it)
207 ++m_nameTreeIterator;
214 return *(m_nameTreeIterator->getStrategyChoiceEntry());
217 inline shared_ptr<strategy_choice::Entry>
220 return m_nameTreeIterator->getStrategyChoiceEntry();
226 return m_nameTreeIterator == other.m_nameTreeIterator;
232 return m_nameTreeIterator != other.m_nameTreeIterator;
237 #endif // NFD_DAEMON_TABLE_STRATEGY_CHOICE_HPP fw::Strategy & findEffectiveStrategy(const Name &prefix) const
get effective strategy for prefix
represents the Strategy Choice table
bool hasStrategy(const Name &strategyName, bool isExact=false) const
determines if a strategy is installed
StrategyChoice(NameTree &nameTree, shared_ptr< fw::Strategy > defaultStrategy)
bool insert(const Name &prefix, const Name &strategyName)
set strategy of prefix to be strategyName
bool operator==(const const_iterator &other) const
bool operator!=(const const_iterator &other) const
represents a Measurements entry
Table::const_iterator iterator
shared_ptr< strategy_choice::Entry > operator->() const
Copyright (c) 2011-2015 Regents of the University of California.
void erase(const Name &prefix)
make prefix to inherit strategy from its parent
const_iterator & operator++()
const_iterator end() const
Name abstraction to represent an absolute name.
represents a Strategy Choice entry
bool install(shared_ptr< fw::Strategy > strategy)
install a strategy
const_iterator begin() const
represents a forwarding strategy
const_iterator(const NameTree::const_iterator &it)
const_iterator end() const
Get an iterator referring to the past-the-end FIB entry.
size_t size() const
number of entries stored
const strategy_choice::Entry & operator*() const