Abstraction implementing Interest selectors. More...
#include <selectors.hpp>
Classes | |
class | Error |
Public Member Functions | |
Selectors () | |
Selectors (const Block &wire) | |
Create from wire encoding. More... | |
bool | empty () const |
template<encoding::Tag TAG> | |
size_t | wireEncode (EncodingImpl< TAG > &encoder) const |
Fast encoding or block size estimation. More... | |
const Block & | wireEncode () const |
Encode to a wire format. More... | |
void | wireDecode (const Block &wire) |
Decode the input from wire format. More... | |
int | getMinSuffixComponents () const |
Selectors & | setMinSuffixComponents (int minSuffixComponents) |
int | getMaxSuffixComponents () const |
Selectors & | setMaxSuffixComponents (int maxSuffixComponents) |
const KeyLocator & | getPublisherPublicKeyLocator () const |
Selectors & | setPublisherPublicKeyLocator (const KeyLocator &keyLocator) |
const Exclude & | getExclude () const |
Selectors & | setExclude (const Exclude &exclude) |
int | getChildSelector () const |
Selectors & | setChildSelector (int childSelector) |
set ChildSelector More... | |
bool | getMustBeFresh () const |
Selectors & | setMustBeFresh (bool mustBeFresh) |
bool | operator== (const Selectors &other) const |
bool | operator!= (const Selectors &other) const |
Abstraction implementing Interest selectors.
Definition at line 35 of file selectors.hpp.
ndn::Selectors::Selectors | ( | ) |
Definition at line 35 of file selectors.cpp.
Referenced by wireDecode().
|
explicit |
bool ndn::Selectors::empty | ( | ) | const |
Definition at line 49 of file selectors.cpp.
References ndn::DEFAULT_CHILD_SELECTOR, ndn::KeyLocator::empty(), and ndn::Exclude::empty().
Referenced by ndn::Interest::hasSelectors(), and wireEncode().
size_t ndn::Selectors::wireEncode | ( | EncodingImpl< TAG > & | encoder | ) | const |
Fast encoding or block size estimation.
Definition at line 61 of file selectors.cpp.
References ndn::tlv::ChildSelector, ndn::DEFAULT_CHILD_SELECTOR, empty(), getChildSelector(), getExclude(), getMaxSuffixComponents(), getMinSuffixComponents(), getMustBeFresh(), getPublisherPublicKeyLocator(), ndn::tlv::MaxSuffixComponents, ndn::tlv::MinSuffixComponents, ndn::tlv::MustBeFresh, ndn::encoding::prependEmptyBlock(), ndn::encoding::prependNonNegativeIntegerBlock(), ndn::tlv::Selectors, ndn::Exclude::wireEncode(), and ndn::KeyLocator::wireEncode().
Referenced by operator==().
const Block & ndn::Selectors::wireEncode | ( | ) | const |
Encode to a wire format.
Definition at line 115 of file selectors.cpp.
References ndn::Block::hasWire().
Referenced by operator==().
void ndn::Selectors::wireDecode | ( | const Block & | wire | ) |
Decode the input from wire format.
Definition at line 131 of file selectors.cpp.
References ndn::tlv::ChildSelector, ndn::DEFAULT_CHILD_SELECTOR, ndn::Block::elements_end(), ndn::tlv::Exclude, ndn::Block::find(), ndn::tlv::KeyLocator, ndn::tlv::MaxSuffixComponents, ndn::tlv::MinSuffixComponents, ndn::tlv::MustBeFresh, ndn::Block::parse(), Selectors(), ndn::tlv::Selectors, ndn::Block::type(), ndn::Exclude::wireDecode(), and ndn::KeyLocator::wireDecode().
Referenced by Selectors().
|
inline |
Definition at line 76 of file selectors.hpp.
Referenced by ndn::Interest::getMinSuffixComponents(), and wireEncode().
Selectors & ndn::Selectors::setMinSuffixComponents | ( | int | minSuffixComponents | ) |
Definition at line 182 of file selectors.cpp.
References ndn::Block::reset().
Referenced by ndn::Interest::setMinSuffixComponents().
|
inline |
Definition at line 85 of file selectors.hpp.
Referenced by ndn::Interest::getCanBePrefix(), ndn::Interest::getMaxSuffixComponents(), and wireEncode().
Selectors & ndn::Selectors::setMaxSuffixComponents | ( | int | maxSuffixComponents | ) |
Definition at line 190 of file selectors.cpp.
References ndn::Block::reset().
Referenced by ndn::Interest::setCanBePrefix(), and ndn::Interest::setMaxSuffixComponents().
|
inline |
Definition at line 94 of file selectors.hpp.
Referenced by ndn::Interest::getPublisherPublicKeyLocator(), and wireEncode().
Selectors & ndn::Selectors::setPublisherPublicKeyLocator | ( | const KeyLocator & | keyLocator | ) |
Definition at line 198 of file selectors.cpp.
References ndn::Block::reset().
Referenced by ndn::Interest::setPublisherPublicKeyLocator().
|
inline |
Definition at line 103 of file selectors.hpp.
Referenced by ndn::Interest::getExclude(), and wireEncode().
Definition at line 206 of file selectors.cpp.
References ndn::Block::reset().
Referenced by ndn::Interest::setExclude().
|
inline |
Definition at line 112 of file selectors.hpp.
Referenced by ndn::Interest::getChildSelector(), and wireEncode().
Selectors & ndn::Selectors::setChildSelector | ( | int | childSelector | ) |
set ChildSelector
std::invalid_argument | ChildSelector not 0 or 1 |
Definition at line 214 of file selectors.cpp.
References ndn::Block::reset().
Referenced by ndn::Interest::setChildSelector().
|
inline |
Definition at line 125 of file selectors.hpp.
Referenced by ndn::Interest::getMustBeFresh(), and wireEncode().
Selectors & ndn::Selectors::setMustBeFresh | ( | bool | mustBeFresh | ) |
Definition at line 225 of file selectors.cpp.
References ndn::Block::reset().
Referenced by ndn::Interest::setMustBeFresh().
bool ndn::Selectors::operator== | ( | const Selectors & | other | ) | const |
|
inline |
Definition at line 138 of file selectors.hpp.
References operator==().