|
NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
|
API Documentation
|
Go to the documentation of this file.
22 #ifndef NDN_DELEGATION_LIST_HPP
23 #define NDN_DELEGATION_LIST_HPP
27 #include <initializer_list>
69 template<encoding::Tag TAG>
92 return m_dels.begin();
104 return m_dels.empty();
110 return m_dels.size();
119 BOOST_ASSERT(i <
size());
187 return this->eraseImpl(preference,
name);
210 isValidTlvType(uint32_t type);
213 insertImpl(uint64_t preference,
const Name&
name);
216 eraseImpl(optional<uint64_t> preference,
const Name&
name);
229 return lhs.m_dels == rhs.m_dels;
235 return lhs.m_dels != rhs.m_dels;
248 std::vector<Delegation> m_dels;
252 extern template size_t
253 DelegationList::wireEncode<encoding::EncoderTag>(
EncodingBuffer&, uint32_t)
const;
255 extern template size_t
256 DelegationList::wireEncode<encoding::EstimatorTag>(
EncodingEstimator&, uint32_t)
const;
260 operator<<(std::ostream& os,
const DelegationList& dl);
264 #endif // NDN_DELEGATION_LIST_HPP
NDN_CXX_NODISCARD bool empty() const noexcept
size_t size() const noexcept
size_t wireEncode(EncodingImpl< TAG > &encoder, uint32_t type=tlv::ForwardingHint) const
encode into wire format
friend bool operator!=(const DelegationList &lhs, const DelegationList &rhs)
const Delegation & operator[](size_t i) const
get the i-th delegation
@ INS_APPEND
multiple delegations with the same name are kept in the DelegationList
DelegationList()
construct an empty DelegationList
friend bool operator==(const DelegationList &lhs, const DelegationList &rhs)
Compare whether two DelegationLists are equal.
@ INS_SKIP
new delegation is not inserted if an existing delegation has the same name
bool isSorted() const noexcept
InsertConflictResolution
what to do when inserting a duplicate name
std::vector< Delegation >::const_iterator const_iterator
EncodingImpl< EstimatorTag > EncodingEstimator
void sort()
sort the delegation list
Represents an absolute name.
bool insert(uint64_t preference, const Name &name, InsertConflictResolution onConflict=INS_REPLACE)
insert Delegation
#define NDN_CXX_NODISCARD
bool insert(const Delegation &del, InsertConflictResolution onConflict=INS_REPLACE)
insert Delegation
const_iterator end() const noexcept
const nullopt_t nullopt((nullopt_t::init()))
represents a list of Delegations
@ INS_REPLACE
existing delegation(s) with the same name are replaced with the new delegation
size_t erase(const Delegation &del)
delete Delegation(s) with matching preference and name
Represents a TLV element of NDN packet format.
std::ostream & operator<<(std::ostream &os, const Data &data)
represents an error in TLV encoding or decoding
void wireDecode(const Block &block, bool wantSort=true)
decode a DelegationList
Error(const char *expectedType, uint32_t actualType)
const_iterator begin() const noexcept
size_t erase(const Name &name)
erase Delegation(s) with specified name
Copyright (c) 2011-2015 Regents of the University of California.
EncodingImpl< EncoderTag > EncodingBuffer
size_t erase(uint64_t preference, const Name &name)
delete Delegation(s) with specified preference and name
const Delegation & at(size_t i) const
get the i-th delegation