NS-3 based Named Data Networking (NDN) simulator
ndnSIM: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
ns3::ndn::Exclude Class Reference

Class to represent Exclude component in NDN interests. More...

#include <exclude.h>

Inheritance diagram for ns3::ndn::Exclude:
Collaboration diagram for ns3::ndn::Exclude:

Public Types

typedef std::map
< name::Component, bool,
std::greater< name::Component > > 
exclude_type
 
typedef exclude_type::iterator iterator
 
typedef
exclude_type::const_iterator 
const_iterator
 
typedef
exclude_type::reverse_iterator 
reverse_iterator
 
typedef
exclude_type::const_reverse_iterator 
const_reverse_iterator
 

Public Member Functions

 Exclude ()
 Default constructor an empty exclude.
 
bool isExcluded (const name::Component &comp) const
 Check if name component is excluded. More...
 
ExcludeexcludeOne (const name::Component &comp)
 Exclude specific name component. More...
 
ExcludeexcludeRange (const name::Component &from, const name::Component &to)
 Exclude components from range [from, to]. More...
 
ExcludeexcludeBefore (const name::Component &to)
 Exclude all components from range [/, to]. More...
 
ExcludeexcludeAfter (const name::Component &from)
 Exclude all components from range [from, +Inf]. More...
 
void appendExclude (const name::Component &name, bool any)
 Method to directly append exclude element. More...
 
size_t size () const
 Get number of exclude terms.
 
const_iterator begin () const
 Get begin iterator of the exclude terms.
 
const_iterator end () const
 Get end iterator of the exclude terms.
 
const_reverse_iterator rbegin () const
 Get begin iterator of the exclude terms.
 
const_reverse_iterator rend () const
 Get end iterator of the exclude terms.
 

Detailed Description

Class to represent Exclude component in NDN interests.

Definition at line 25 of file exclude.h.

Member Function Documentation

void ns3::ndn::Exclude::appendExclude ( const name::Component name,
bool  any 
)

Method to directly append exclude element.

Parameters
nameexcluded name component
anyflag indicating if there is a postfix ANY component after the name

This method is used during conversion from wire format of exclude filter

If there is an error with ranges (e.g., order of components is wrong) an exception is thrown

Definition at line 154 of file exclude.cc.

Exclude & ns3::ndn::Exclude::excludeAfter ( const name::Component from)

Exclude all components from range [from, +Inf].

Parameters
tolast element of the range
Returns
*this to allow chaining

Definition at line 129 of file exclude.cc.

Exclude & ns3::ndn::Exclude::excludeBefore ( const name::Component to)
inline

Exclude all components from range [/, to].

Parameters
tolast element of the range
Returns
*this to allow chaining

Definition at line 136 of file exclude.h.

Exclude & ns3::ndn::Exclude::excludeOne ( const name::Component comp)

Exclude specific name component.

Parameters
compcomponent to exclude
Returns
*this to allow chaining

Definition at line 49 of file exclude.cc.

Exclude & ns3::ndn::Exclude::excludeRange ( const name::Component from,
const name::Component to 
)

Exclude components from range [from, to].

Parameters
fromfirst element of the range
tolast element of the range
Returns
*this to allow chaining

Definition at line 87 of file exclude.cc.

References ns3::ndn::name::Component::toUri().

bool ns3::ndn::Exclude::isExcluded ( const name::Component comp) const

Check if name component is excluded.

Parameters
compName component to check against exclude filter

Definition at line 34 of file exclude.cc.


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