22 #ifndef NDN_EXCLUDE_HPP
23 #define NDN_EXCLUDE_HPP
26 #include "lite/exclude-lite.hpp"
52 : type_(ndn_Exclude_ANY)
59 Entry(
const uint8_t *component,
size_t componentLen)
60 : type_(ndn_Exclude_COMPONENT), component_(component, componentLen)
68 : type_(ndn_Exclude_COMPONENT), component_(component)
73 getType()
const {
return type_; }
76 getComponent()
const {
return component_; }
79 ndn_ExcludeType type_;
80 Name::Component component_;
88 size()
const {
return entries_.size(); }
96 get(
size_t i)
const {
return entries_[i]; }
108 DEPRECATED_IN_NDN_CPP
getEntry(
size_t i)
const {
return entries_[i]; }
135 entries_.push_back(
Entry());
149 entries_.push_back(
Entry(component, componentLength));
162 entries_.push_back(
Entry(component));
177 DEPRECATED_IN_NDN_CPP
addComponent(uint8_t *component,
size_t componentLength)
227 std::vector<Entry> entries_;
228 uint64_t changeCount_;
Copyright (C) 2013-2016 Regents of the University of California.
Definition: common.hpp:35
Exclude()
Create a new Exclude with no entries.
Definition: exclude.hpp:38
Exclude & appendAny()
Append a new entry of type ndn_Exclude_ANY.
Definition: exclude.hpp:133
size_t size() const
Get the number of entries.
Definition: exclude.hpp:88
Entry()
Create an Exclude::Entry of type ndn_Exclude_ANY.
Definition: exclude.hpp:51
Entry(const Name::Component &component)
Create an Exclude::Entry of type ndn_Exclude_COMPONENT.
Definition: exclude.hpp:67
An Exclude::Entry holds an ndn_ExcludeType, and if it is a COMPONENT, it holds the component value...
Definition: exclude.hpp:46
const Exclude::Entry & operator[](int i) const
The same as get(i), get the entry at the given index.
Definition: exclude.hpp:214
An Exclude holds a vector of Exclude::Entry.
Definition: exclude.hpp:33
void clear()
Clear all the entries.
Definition: exclude.hpp:186
uint64_t getChangeCount() const
Get the change count, which is incremented each time this object is changed.
Definition: exclude.hpp:224
A Name::Component holds a read-only name component value.
Definition: name.hpp:45
Exclude & appendComponent(const uint8_t *component, size_t componentLength)
Append a new entry of type ndn_Exclude_COMPONENT, copying from component of length componentLength...
Definition: exclude.hpp:147
An ExcludeLite holds an array of ExcludeLite::Entry.
Definition: exclude-lite.hpp:33
Entry(const uint8_t *component, size_t componentLen)
Create an Exclude::Entry of type ndn_Exclude_COMPONENT.
Definition: exclude.hpp:59
Exclude &DEPRECATED_IN_NDN_CPP addComponent(uint8_t *component, size_t componentLength)
Definition: exclude.hpp:177
size_t DEPRECATED_IN_NDN_CPP getEntryCount() const
Definition: exclude.hpp:102
bool matches(const Name::Component &component) const
Check if the component matches any of the exclude criteria.
Definition: exclude.cpp:65
Exclude &DEPRECATED_IN_NDN_CPP addAny()
Definition: exclude.hpp:171
void set(const ExcludeLite &excludeLite)
Clear this Exclude, and set the entries by copying from excludeLite.
Definition: exclude.cpp:49
Exclude & appendComponent(const Name::Component &component)
Append a new entry of type ndn_Exclude_COMPONENT, taking another pointer to the Blob value...
Definition: exclude.hpp:160
const Exclude::Entry &DEPRECATED_IN_NDN_CPP getEntry(size_t i) const
Definition: exclude.hpp:108
std::string toUri() const
Encode this Exclude with elements separated by "," and ndn_Exclude_ANY shown as "*".
Definition: exclude.cpp:120