22 #ifndef NDN_EXCLUDE_LITE_HPP
23 #define NDN_EXCLUDE_LITE_HPP
25 #include "name-lite.hpp"
26 #include "../c/interest-types.h"
58 Entry(
const uint8_t *component,
size_t componentLength);
61 getType()
const {
return type; }
128 (component.getValue().
buf(), component.getValue().
size());
An ndn_ExcludeEntry holds an ndn_ExcludeType, and if it is a COMPONENT, it holds a pointer to the com...
Definition: interest-types.h:40
size_t size() const
Return size given to the constructor.
Definition: blob-lite.hpp:61
Copyright (C) 2013-2015 Regents of the University of California.
Definition: common.hpp:35
size_t nEntries
the number of entries in the exclude, 0 for no exclude
Definition: interest-types.h:51
size_t size() const
Get the number of entries.
Definition: exclude-lite.hpp:83
Entry()
Create an ExcludeLite::Entry of type ndn_Exclude_ANY.
Definition: exclude-lite.cpp:27
void clear()
Clear all the entries.
Definition: exclude-lite.cpp:56
struct ndn_ExcludeEntry * entries
pointer to the array of entries.
Definition: interest-types.h:49
ndn_Error appendComponent(const NameLite::Component &component)
Append a new entry of type ndn_Exclude_COMPONENT with the given component value.
Definition: exclude-lite.hpp:125
An ndn_Exclude holds an array of ndn_ExcludeEntry.
Definition: interest-types.h:48
An ExcludeLite holds an array of ExcludeLite::Entry.
Definition: exclude-lite.hpp:33
static ExcludeLite & upCast(ndn_Exclude &exclude)
Upcast the reference to the ndn_Exclude struct to an ExcludeLite.
Definition: exclude-lite.hpp:152
A NameLite::Component holds a pointer to the component value.
Definition: name-lite.hpp:39
static Component & upCast(ndn_NameComponent &component)
Upcast the reference to the ndn_NameComponent struct to a NameLite::Component.
Definition: name-lite.hpp:168
const uint8_t * buf() const
Return buf given to the constructor.
Definition: blob-lite.hpp:55
ExcludeLite(ndn_ExcludeEntry *entries, size_t maxEntries)
Create an ExcludeLite with the entries array.
Definition: exclude-lite.cpp:38
size_t maxEntries
the number of elements in the allocated entries array
Definition: interest-types.h:50
Definition: exclude-lite.hpp:45
ndn_Error appendAny()
Append a new entry of type ndn_Exclude_ANY.
Definition: exclude-lite.cpp:44
ndn_Error appendComponent(const uint8_t *component, size_t componentLength)
Append a new entry of type ndn_Exclude_COMPONENT with the given component value.
Definition: exclude-lite.cpp:50
static Entry & upCast(ndn_ExcludeEntry &entry)
Upcast the reference to the ndn_ExcludeEntry struct to an ExcludeLite::Entry.
Definition: exclude-lite.hpp:72
ndn_Error set(const ExcludeLite &other)
Set this exclude object to have the values from the other exclude.
Definition: exclude-lite.cpp:59