48 #ifndef NFD_DAEMON_TABLE_CS_HPP 49 #define NFD_DAEMON_TABLE_CS_HPP 54 #include <ndn-cxx/util/signal.hpp> 55 #include <boost/iterator/transform_iterator.hpp> 65 class Cs : noncopyable
75 insert(
const Data& data,
bool isUnsolicited =
false);
77 typedef std::function<void(const Interest&, const Data& data)>
HitCallback;
89 const HitCallback& hitCallback,
90 const MissCallback& missCallback)
const;
95 BOOST_ASSERT_MSG(
false,
"not implemented");
119 return m_policy.get();
127 return m_table.size();
148 typedef boost::transform_iterator<EntryFromEntryImpl, iterator, const Entry&>
const_iterator;
182 setPolicyImpl(unique_ptr<Policy>& policy);
186 unique_ptr<Policy> m_policy;
196 #endif // NFD_DAEMON_TABLE_CS_HPP
const_iterator end() const
std::set< EntryImpl > Table
Cs(size_t nMaxPackets=10, unique_ptr< Policy > policy=makeDefaultPolicy())
Policy * getPolicy() const
bool insert(const Data &data, bool isUnsolicited=false)
inserts a Data packet
represents an Interest packet
const_iterator begin() const
const Entry & result_type
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
const Entry & operator()(const EntryImpl &entry) const
an Entry in ContentStore implementation
Table::const_iterator iterator
represents a CS replacement policy
Copyright (c) 2011-2015 Regents of the University of California.
unique_ptr< Policy > makeDefaultPolicy()
boost::transform_iterator< EntryFromEntryImpl, iterator, const Entry & > const_iterator
ContentStore iterator (public API)
void find(const Interest &interest, const HitCallback &hitCallback, const MissCallback &missCallback) const
finds the best matching Data packet
void setPolicy(unique_ptr< Policy > policy)
changes cs replacement policy
represents a base class for CS entry
disconnects a Connection automatically upon destruction
void setLimit(size_t nMaxPackets)
changes capacity (in number of packets)
Name abstraction to represent an absolute name.
std::function< void(const Interest &, const Data &data)> HitCallback
void erase(const Name &exactName)
std::function< void(const Interest &)> MissCallback
represents the ContentStore
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE