184 mutable Block m_wire;
199 m_exclude[name] = any;
205 return m_exclude.empty();
218 return m_exclude.size();
224 return m_exclude.begin();
230 return m_exclude.end();
236 return m_exclude.rbegin();
242 return m_exclude.rend();
248 std::ostringstream os;
257 size_t totalLength = 0;
268 if (!i->first.empty())
270 totalLength += i->first.wireEncode(block);
274 totalLength += block.prependVarNumber(totalLength);
291 m_wire = buffer.block();
314 throw Error(
"Incorrect format of Exclude filter");
341 #endif // NDN_EXCLUDE_H
void appendExclude(const name::Component &name, bool any)
Method to directly append exclude element.
const_reverse_iterator rend() const
Get end iterator of the exclude terms.
Exclude & excludeBefore(const name::Component &to)
Exclude all components from range [/, to].
Exclude(const Block &wire)
Create from wire encoding.
size_t size() const
Get number of exclude terms.
exclude_type::reverse_iterator reverse_iterator
exclude_type::const_iterator const_iterator
Class representing wire element of the NDN packet.
void clear()
Clear the exclude filter.
Exclude()
Default constructor an empty exclude.
element_const_iterator elements_end() const
element_const_iterator elements_begin() 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.
size_t prependBooleanBlock(EncodingImpl< P > &encoder, uint32_t type)
element_container::const_iterator element_const_iterator
const_iterator begin() const
Get begin iterator of the exclude terms.
void parse() const
Parse wire buffer into subblocks.
Component holds a read-only name component value.
exclude_type::iterator iterator
bool empty() const
Check if exclude filter is empty.
exclude_type::const_reverse_iterator const_reverse_iterator
std::string toUri() const
Get escaped string representation (e.g., for use in URI) of the exclude filter.
bool hasWire() const
Check if the Block has fully encoded wire.
Exclude & excludeAfter(const name::Component &from)
Exclude all components from range [from, +Inf].
Error(const std::string &what)
Exclude & excludeRange(const name::Component &from, const name::Component &to)
Exclude components from range [from, to].
const_reverse_iterator rbegin() const
Get begin iterator of the exclude terms.
const_iterator end() const
Get end iterator of the exclude terms.
std::ostream & operator<<(std::ostream &os, const Data &data)
std::map< name::Component, bool, std::greater< name::Component > > exclude_type
Class representing wire element of the NDN packet.
Class to represent Exclude component in NDN interests.