65 template<encoding::Tag TAG>
170 typedef std::map<ExcludeComponent, bool, std::greater<ExcludeComponent>>
ExcludeMap;
171 typedef ExcludeMap::value_type
Entry;
217 class const_iterator :
public std::iterator<std::forward_iterator_tag, const Range>
222 const_iterator(ExcludeMap::const_reverse_iterator it, ExcludeMap::const_reverse_iterator rend);
247 ExcludeMap::const_reverse_iterator m_it;
248 ExcludeMap::const_reverse_iterator m_rend;
279 appendEntry(
const T& component,
bool hasAny);
285 ExcludeMap m_entries;
286 mutable Block m_wire;
319 return m_entries.empty();
325 return !(*
this == other);
343 BOOST_ASSERT(m_it != m_rend);
350 BOOST_ASSERT(m_it != m_rend);
357 return m_it == other.m_it;
368 #endif // NDN_EXCLUDE_H
Copyright (c) 2013-2016 Regents of the University of California.
Exclude & excludeBefore(const name::Component &to)
Exclude all components in range (-Inf, to].
friend std::ostream & operator<<(std::ostream &os, const Exclude &name)
either a name::Component or "negative infinity"
represent an excluded component or range
const_iterator & operator++()
std::ostream & operator<<(std::ostream &os, const Data &data)
name::Component from
from component (inclusive)
bool toInfinity
to positive infinity?
Class representing a wire element of NDN-TLV packet format.
Exclude()
Constructs an empty Exclude.
bool operator==(const Exclude::Range &other) const
bool operator==(const const_iterator &other) const
bool operator>(const Exclude::ExcludeComponent &a, const Exclude::ExcludeComponent &b)
const Range & operator*() const
bool operator!=(const const_iterator &other) const
const Block & wireEncode() const
Encode to a wire format.
void wireDecode(const Block &wire)
Decode from the wire format.
Exclude & excludeOne(const name::Component &comp)
Exclude specific name component.
bool isExcluded(const name::Component &comp) const
Check if name component is excluded.
ExcludeMap::value_type Entry
std::map< ExcludeComponent, bool, std::greater< ExcludeComponent > > ExcludeMap
a map of exclude entries
bool operator==(const Exclude::ExcludeComponent &a, const Exclude::ExcludeComponent &b)
const_iterator begin() const
const Range * operator->() const
bool fromInfinity
from negative infinity?
name::Component to
to component (inclusive)
Component holds a read-only name component value.
std::string toUri() const
Get escaped string representation (e.g., for use in URI) of the exclude filter.
bool operator!=(const Exclude::Range &other) const
bool operator!=(const Exclude &other) const
name::Component component
Exclude & excludeAfter(const name::Component &from)
Exclude all components in range [from, +Inf)
Error(const std::string &what)
Exclude & excludeRange(const name::Component &from, const name::Component &to)
Exclude components in range [from, to].
const_iterator end() const
bool operator==(const Exclude &other) const
ExcludeComponent(const name::Component &component)
implicitly construct a regular infinity ExcludeComponent
represents an error in TLV encoding or decoding
Represents Exclude selector in NDN Interest.