26 #ifndef NFD_DAEMON_TABLE_STRATEGY_CHOICE_HPP 27 #define NFD_DAEMON_TABLE_STRATEGY_CHOICE_HPP 64 install(shared_ptr<fw::Strategy> strategy);
91 get(
const Name& prefix)
const;
108 :
public std::iterator<std::forward_iterator_tag, const strategy_choice::Entry>
119 shared_ptr<strategy_choice::Entry>
153 getStrategy(
const Name& strategyName)
const;
156 setDefaultStrategy(shared_ptr<fw::Strategy> strategy);
170 typedef std::map<Name, shared_ptr<fw::Strategy> > StrategyInstanceTable;
171 StrategyInstanceTable m_strategyInstances;
188 : m_nameTreeIterator(it)
209 ++m_nameTreeIterator;
216 return *(m_nameTreeIterator->getStrategyChoiceEntry());
219 inline shared_ptr<strategy_choice::Entry>
222 return m_nameTreeIterator->getStrategyChoiceEntry();
228 return m_nameTreeIterator == other.m_nameTreeIterator;
234 return m_nameTreeIterator != other.m_nameTreeIterator;
239 #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)
size_t size() const
number of entries stored
const strategy_choice::Entry & operator*() const