NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
nfd::name_tree Namespace Reference

Classes

struct  AnyEntry
 
struct  AnyEntrySubTree
 
class  Entry
 Name Tree Entry Class. More...
 
class  Hash32
 
class  Hash64
 
class  Node
 Name Tree Node Class. More...
 

Typedefs

typedef function< bool(const Entry &entry)> EntrySelector
 a predicate to accept or reject an Entry in find operations More...
 
typedef function< std::pair< bool, bool >const Entry &entry)> EntrySubTreeSelector
 a predicate to accept or reject an Entry and its children More...
 

Functions

size_t computeHash (const Name &prefix)
 Compute the hash value of the given name prefix's WIRE FORMAT. More...
 
std::vector< size_t > computeHashSet (const Name &prefix)
 Incrementally compute hash values. More...
 

Typedef Documentation

§ EntrySelector

typedef function<bool (const Entry& entry)> nfd::name_tree::EntrySelector

a predicate to accept or reject an Entry in find operations

Definition at line 49 of file name-tree.hpp.

§ EntrySubTreeSelector

typedef function<std::pair<bool,bool>const Entry& entry)> nfd::name_tree::EntrySubTreeSelector

a predicate to accept or reject an Entry and its children

Returns
.first indicates whether entry should be accepted; .second indicates whether entry's children should be visited

Definition at line 56 of file name-tree.hpp.

Function Documentation

§ computeHash()

size_t nfd::name_tree::computeHash ( const Name prefix)

Compute the hash value of the given name prefix's WIRE FORMAT.

Definition at line 77 of file name-tree.cpp.

References ndn::Name::begin(), ndn::Name::end(), and ndn::Name::wireEncode().

Referenced by nfd::NameTree::findExactMatch(), and nfd::NameTree::~NameTree().

§ computeHashSet()

std::vector< size_t > nfd::name_tree::computeHashSet ( const Name prefix)

Incrementally compute hash values.

Returns
Return a vector of hash values, starting from the root prefix

Definition at line 95 of file name-tree.cpp.

References ndn::Name::begin(), ndn::Name::end(), and ndn::Name::wireEncode().

Referenced by nfd::NameTree::findLongestPrefixMatch().