NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::Selectors Class Reference

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 BlockwireEncode () const
 Encode to a wire format. More...
 
void wireDecode (const Block &wire)
 Decode the input from wire format. More...
 
int getMinSuffixComponents () const
 
SelectorssetMinSuffixComponents (int minSuffixComponents)
 
int getMaxSuffixComponents () const
 
SelectorssetMaxSuffixComponents (int maxSuffixComponents)
 
const KeyLocatorgetPublisherPublicKeyLocator () const
 
SelectorssetPublisherPublicKeyLocator (const KeyLocator &keyLocator)
 
const ExcludegetExclude () const
 
SelectorssetExclude (const Exclude &exclude)
 
int getChildSelector () const
 
SelectorssetChildSelector (int childSelector)
 set ChildSelector More...
 
bool getMustBeFresh () const
 
SelectorssetMustBeFresh (bool mustBeFresh)
 
bool operator== (const Selectors &other) const
 
bool operator!= (const Selectors &other) const
 

Detailed Description

Abstraction implementing Interest selectors.

Definition at line 36 of file selectors.hpp.

Constructor & Destructor Documentation

◆ Selectors() [1/2]

ndn::Selectors::Selectors ( )

Definition at line 35 of file selectors.cpp.

Referenced by wireDecode().

◆ Selectors() [2/2]

ndn::Selectors::Selectors ( const Block wire)
explicit

Create from wire encoding.

Definition at line 43 of file selectors.cpp.

References wireDecode().

Member Function Documentation

◆ empty()

bool ndn::Selectors::empty ( ) const

◆ wireEncode() [1/2]

◆ wireEncode() [2/2]

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==().

◆ wireDecode()

◆ getMinSuffixComponents()

int ndn::Selectors::getMinSuffixComponents ( ) const
inline

Definition at line 81 of file selectors.hpp.

Referenced by ndn::Interest::getMinSuffixComponents(), and wireEncode().

◆ setMinSuffixComponents()

Selectors & ndn::Selectors::setMinSuffixComponents ( int  minSuffixComponents)

Definition at line 182 of file selectors.cpp.

References ndn::Block::reset().

Referenced by ndn::Interest::setMinSuffixComponents().

◆ getMaxSuffixComponents()

int ndn::Selectors::getMaxSuffixComponents ( ) const
inline

◆ setMaxSuffixComponents()

Selectors & ndn::Selectors::setMaxSuffixComponents ( int  maxSuffixComponents)

◆ getPublisherPublicKeyLocator()

const KeyLocator& ndn::Selectors::getPublisherPublicKeyLocator ( ) const
inline

Definition at line 99 of file selectors.hpp.

Referenced by ndn::Interest::getPublisherPublicKeyLocator(), and wireEncode().

◆ setPublisherPublicKeyLocator()

Selectors & ndn::Selectors::setPublisherPublicKeyLocator ( const KeyLocator keyLocator)

Definition at line 198 of file selectors.cpp.

References ndn::Block::reset().

Referenced by ndn::Interest::setPublisherPublicKeyLocator().

◆ getExclude()

const Exclude& ndn::Selectors::getExclude ( ) const
inline

Definition at line 108 of file selectors.hpp.

Referenced by ndn::Interest::getExclude(), and wireEncode().

◆ setExclude()

Selectors & ndn::Selectors::setExclude ( const Exclude exclude)

Definition at line 206 of file selectors.cpp.

References ndn::Block::reset().

Referenced by ndn::Interest::setExclude().

◆ getChildSelector()

int ndn::Selectors::getChildSelector ( ) const
inline

Definition at line 117 of file selectors.hpp.

Referenced by ndn::Interest::getChildSelector(), and wireEncode().

◆ setChildSelector()

Selectors & ndn::Selectors::setChildSelector ( int  childSelector)

set ChildSelector

Exceptions
std::invalid_argumentChildSelector not 0 or 1

Definition at line 214 of file selectors.cpp.

References ndn::Block::reset().

Referenced by ndn::Interest::setChildSelector().

◆ getMustBeFresh()

bool ndn::Selectors::getMustBeFresh ( ) const
inline

Definition at line 130 of file selectors.hpp.

Referenced by ndn::Interest::getMustBeFresh(), and wireEncode().

◆ setMustBeFresh()

Selectors & ndn::Selectors::setMustBeFresh ( bool  mustBeFresh)

Definition at line 225 of file selectors.cpp.

References ndn::Block::reset().

Referenced by ndn::Interest::setMustBeFresh().

◆ operator==()

bool ndn::Selectors::operator== ( const Selectors other) const

Definition at line 233 of file selectors.cpp.

References wireEncode().

Referenced by operator!=().

◆ operator!=()

bool ndn::Selectors::operator!= ( const Selectors other) const
inline

Definition at line 143 of file selectors.hpp.

References operator==().


The documentation for this class was generated from the following files: