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
74 insert(
const Data& data,
bool isUnsolicited =
false);
76 typedef std::function<void(const Interest&, const Data& data)>
HitCallback;
88 const HitCallback& hitCallback,
89 const MissCallback& missCallback)
const;
94 BOOST_ASSERT_MSG(
false,
"not implemented");
118 return m_policy.get();
126 return m_table.size();
147 typedef boost::transform_iterator<EntryFromEntryImpl, iterator, const Entry&>
const_iterator;
181 setPolicyImpl(unique_ptr<Policy> policy);
185 unique_ptr<Policy> m_policy;
195 #endif // NFD_DAEMON_TABLE_CS_HPP #define PUBLIC_WITH_TESTS_ELSE_PRIVATE
std::set< EntryImpl > Table
Cs(size_t nMaxPackets=10, unique_ptr< Policy > policy=makeDefaultPolicy())
const Entry & operator()(const EntryImpl &entry) const
represents an Interest packet
const_iterator begin() const
const Entry & result_type
Copyright (c) 2014-2016, Regents of the University of California, Arizona Board of Regents...
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.
unique_ptr< Policy > makeDefaultPolicy()
boost::transform_iterator< EntryFromEntryImpl, iterator, const Entry & > const_iterator
ContentStore iterator (public API)
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.
void find(const Interest &interest, const HitCallback &hitCallback, const MissCallback &missCallback) const
finds the best matching Data packet
std::function< void(const Interest &, const Data &data)> HitCallback
void erase(const Name &exactName)
std::function< void(const Interest &)> MissCallback
represents the ContentStore
const_iterator end() const
Policy * getPolicy() const