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> 62 class Cs : noncopyable
66 Cs(
size_t nMaxPackets = 10);
71 insert(
const Data& data,
bool isUnsolicited =
false);
73 typedef std::function<void(const Interest&, const Data& data)>
HitCallback;
85 const HitCallback& hitCallback,
86 const MissCallback& missCallback)
const;
91 BOOST_ASSERT_MSG(
false,
"not implemented");
115 return m_policy.get();
123 return m_table.size();
144 typedef boost::transform_iterator<EntryFromEntryImpl, iterator, const Entry&>
const_iterator;
178 setPolicyImpl(unique_ptr<Policy> policy);
182 unique_ptr<Policy> m_policy;
192 #endif // NFD_DAEMON_TABLE_CS_HPP #define PUBLIC_WITH_TESTS_ELSE_PRIVATE
const_iterator end() const
std::set< EntryImpl > Table
Policy * getPolicy() const
represents an Interest packet
const_iterator begin() const
const Entry & result_type
declares ContentStore internal types
const Entry & operator()(const EntryImpl &entry) const
an Entry in ContentStore implementation
Table::const_iterator iterator
represents a CS replacement policy
void insert(const Data &data, bool isUnsolicited=false)
inserts a Data packet
Copyright (c) 2011-2015 Regents of the University of California.
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
Cs(size_t nMaxPackets=10)
represents a base class for CS entry
disconnects a Connection automatically upon destruction
void setLimit(size_t nMaxPackets)
changes capacity (in number of packets)
Represents 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
Represents a Data packet.