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);
68 getType()
const {
return type; }
135 (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:39
size_t size() const
Return size given to the constructor.
Definition: blob-lite.hpp:61
Copyright (C) 2013-2016 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:50
size_t size() const
Get the number of entries.
Definition: exclude-lite.hpp:90
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:62
struct ndn_ExcludeEntry * entries
pointer to the array of entries.
Definition: interest-types.h:48
static ExcludeLite & downCast(ndn_Exclude &exclude)
Downcast the reference to the ndn_Exclude struct to an ExcludeLite.
Definition: exclude-lite.hpp:159
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:132
An ndn_Exclude holds an array of ndn_ExcludeEntry.
Definition: interest-types.h:47
An ExcludeLite holds an array of ExcludeLite::Entry.
Definition: exclude-lite.hpp:33
static Entry & downCast(ndn_ExcludeEntry &entry)
Downcast the reference to the ndn_ExcludeEntry struct to an ExcludeLite::Entry.
Definition: exclude-lite.hpp:79
A NameLite::Component holds a pointer to the component value.
Definition: name-lite.hpp:39
A BlobLite holds a pointer to an immutable pre-allocated buffer and its length This is like a JavaScr...
Definition: blob-lite.hpp:37
static Component & downCast(ndn_NameComponent &component)
Downcast the reference to the ndn_NameComponent struct to a NameLite::Component.
Definition: name-lite.hpp:220
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:44
size_t maxEntries
the number of elements in the allocated entries array
Definition: interest-types.h:49
Definition: exclude-lite.hpp:45
ndn_Error appendAny()
Append a new entry of type ndn_Exclude_ANY.
Definition: exclude-lite.cpp:50
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:56
ndn_Error set(const ExcludeLite &other)
Set this exclude object to have the values from the other exclude.
Definition: exclude-lite.cpp:65