All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Classes | Public Member Functions | List of all members
ndn::Exclude Class Reference

An Exclude holds a vector of Exclude::Entry. More...

#include <exclude.hpp>

Classes

class  Entry
 An Exclude::Entry holds an ndn_ExcludeType, and if it is a COMPONENT, it holds the component value. More...
 

Public Member Functions

 Exclude ()
 Create a new Exclude with no entries.
 
size_t size () const
 Get the number of entries. More...
 
const Exclude::Entryget (size_t i) const
 Get the entry at the given index. More...
 
size_t DEPRECATED_IN_NDN_CPP getEntryCount () const
 
const Exclude::Entry
&DEPRECATED_IN_NDN_CPP 
getEntry (size_t i) const
 
void get (ExcludeLite &excludeLite) const
 Set excludeLite to have the values and point to the entries in this Exclude, without copying any memory. More...
 
void set (const ExcludeLite &excludeLite)
 Clear this Exclude, and set the entries by copying from excludeLite. More...
 
ExcludeappendAny ()
 Append a new entry of type ndn_Exclude_ANY. More...
 
ExcludeappendComponent (const uint8_t *component, size_t componentLength)
 Append a new entry of type ndn_Exclude_COMPONENT, copying from component of length componentLength. More...
 
ExcludeappendComponent (const Name::Component &component)
 Append a new entry of type ndn_Exclude_COMPONENT, taking another pointer to the Blob value. More...
 
Exclude &DEPRECATED_IN_NDN_CPP addAny ()
 
Exclude &DEPRECATED_IN_NDN_CPP addComponent (uint8_t *component, size_t componentLength)
 
void clear ()
 Clear all the entries.
 
bool matches (const Name::Component &component) const
 Check if the component matches any of the exclude criteria. More...
 
std::string toUri () const
 Encode this Exclude with elements separated by "," and ndn_Exclude_ANY shown as "*". More...
 
const Exclude::Entryoperator[] (int i) const
 The same as get(i), get the entry at the given index. More...
 
uint64_t getChangeCount () const
 Get the change count, which is incremented each time this object is changed. More...
 

Detailed Description

An Exclude holds a vector of Exclude::Entry.

Member Function Documentation

Exclude& DEPRECATED_IN_NDN_CPP ndn::Exclude::addAny ( )
inline
Deprecated:
Use appendAny.
Exclude& DEPRECATED_IN_NDN_CPP ndn::Exclude::addComponent ( uint8_t *  component,
size_t  componentLength 
)
inline
Deprecated:
Use appendComponent.
Exclude& ndn::Exclude::appendAny ( )
inline

Append a new entry of type ndn_Exclude_ANY.

Returns
This Exclude so that you can chain calls to append.
Exclude& ndn::Exclude::appendComponent ( const uint8_t *  component,
size_t  componentLength 
)
inline

Append a new entry of type ndn_Exclude_COMPONENT, copying from component of length componentLength.

Parameters
componentA pointer to the component byte array.
componentLengthThe length of component.
Returns
This Exclude so that you can chain calls to append.
Exclude& ndn::Exclude::appendComponent ( const Name::Component component)
inline

Append a new entry of type ndn_Exclude_COMPONENT, taking another pointer to the Blob value.

Parameters
componentA Name.Component for the exclude value.
Returns
This Exclude so that you can chain calls to append.
const Exclude::Entry& ndn::Exclude::get ( size_t  i) const
inline

Get the entry at the given index.

Parameters
iThe index of the entry, starting from 0.
Returns
The entry at the index.
void ndn::Exclude::get ( ExcludeLite excludeLite) const

Set excludeLite to have the values and point to the entries in this Exclude, without copying any memory.

WARNING: The resulting pointers in excludeLite are invalid after a further use of this object which could reallocate memory.

Parameters
excludeLiteA ExcludeLite object where the entries array is already allocated
uint64_t ndn::Exclude::getChangeCount ( ) const
inline

Get the change count, which is incremented each time this object is changed.

Returns
The change count.
const Exclude::Entry& DEPRECATED_IN_NDN_CPP ndn::Exclude::getEntry ( size_t  i) const
inline
Deprecated:
Use get(i).
size_t DEPRECATED_IN_NDN_CPP ndn::Exclude::getEntryCount ( ) const
inline
bool ndn::Exclude::matches ( const Name::Component component) const

Check if the component matches any of the exclude criteria.

Parameters
componentThe name component to check.
Returns
True if the component matches any of the exclude criteria, otherwise false.
const Exclude::Entry& ndn::Exclude::operator[] ( int  i) const
inline

The same as get(i), get the entry at the given index.

Parameters
iThe index of the entry, starting from 0.
Returns
The entry at the index.
void ndn::Exclude::set ( const ExcludeLite excludeLite)

Clear this Exclude, and set the entries by copying from excludeLite.

Parameters
excludeLiteAn ExcludeLite object.
size_t ndn::Exclude::size ( ) const
inline

Get the number of entries.

Returns
The number of entries.
string ndn::Exclude::toUri ( ) const

Encode this Exclude with elements separated by "," and ndn_Exclude_ANY shown as "*".

Returns
the URI string

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