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

Represents an absolute name. More...

#include <name.hpp>

Collaboration diagram for ndn::Name:

Classes

class  Error
 

Public Types

using Component = name::Component
 
using component_container = std::vector< Component >
 
using value_type = Component
 
using allocator_type = void
 
using reference = Component &
 
using const_reference = const Component &
 
using pointer = Component *
 
using const_pointer = const Component *
 
using iterator = const Component *
 
using const_iterator = const Component *
 
using reverse_iterator = std::reverse_iterator< iterator >
 
using const_reverse_iterator = std::reverse_iterator< const_iterator >
 
using difference_type = component_container::difference_type
 
using size_type = component_container::size_type
 

Public Member Functions

 Name ()
 Create an empty name. More...
 
 Name (const Block &wire)
 Decode Name from wire encoding. More...
 
 Name (const char *uri)
 Parse name from NDN URI. More...
 
 Name (std::string uri)
 Create name from NDN URI. More...
 
std::string toUri () const
 Get URI representation of the name. More...
 
bool hasWire () const
 Check if this Name instance already has wire encoding. More...
 
template<encoding::Tag TAG>
size_t wireEncode (EncodingImpl< TAG > &encoder) const
 Fast encoding or block size estimation. More...
 
const BlockwireEncode () const
 Perform wire encoding, or return existing wire encoding. More...
 
void wireDecode (const Block &wire)
 Decode name from wire encoding. More...
 
Name deepCopy () const
 Make a deep copy of the name, reallocating the underlying memory buffer. More...
 
bool empty () const
 Check if name is empty. More...
 
size_t size () const
 Get number of components. More...
 
const Componentget (ssize_t i) const
 Get the component at the given index. More...
 
const Componentoperator[] (ssize_t i) const
 Equivalent to get(i) More...
 
const Componentat (ssize_t i) const
 Get the component at the given index. More...
 
PartialName getSubName (ssize_t iStartComponent, size_t nComponents=npos) const
 Extract some components as a sub-name (PartialName) More...
 
PartialName getPrefix (ssize_t nComponents) const
 Extract a prefix of the name. More...
 
const_iterator begin () const
 Begin iterator. More...
 
const_iterator end () const
 End iterator. More...
 
const_reverse_iterator rbegin () const
 Reverse begin iterator. More...
 
const_reverse_iterator rend () const
 Reverse end iterator. More...
 
Nameappend (const Component &component)
 Append a component. More...
 
Nameappend (const char *value)
 Append a component, copying from a zero-terminated byte string. More...
 
Nameappend (const uint8_t *value, size_t valueLength)
 Append a component, copying from [value, value + valueLength) More...
 
template<class Iterator >
Nameappend (Iterator first, Iterator last)
 Append a component, copying from [first, last) More...
 
Nameappend (const Block &value)
 Append a component, decoding from a Block. More...
 
NameappendNumber (uint64_t number)
 Append a component with a nonNegativeInteger. More...
 
NameappendNumberWithMarker (uint8_t marker, uint64_t number)
 Append a component with a marked number. More...
 
NameappendVersion (uint64_t version)
 Append a version component. More...
 
NameappendVersion ()
 Append a version component based on current time. More...
 
NameappendSegment (uint64_t segmentNo)
 Append a segment number (sequential) component. More...
 
NameappendSegmentOffset (uint64_t offset)
 Append a segment byte offset component. More...
 
NameappendTimestamp (const time::system_clock::TimePoint &timePoint)
 Append a timestamp component. More...
 
NameappendTimestamp ()
 Append a timestamp component based on current time. More...
 
NameappendSequenceNumber (uint64_t seqNo)
 Append a sequence number component. More...
 
NameappendImplicitSha256Digest (const ConstBufferPtr &digest)
 Append an ImplicitSha256Digest component. More...
 
NameappendImplicitSha256Digest (const uint8_t *digest, size_t digestSize)
 Append an ImplicitSha256Digest component. More...
 
Nameappend (const PartialName &name)
 Append a PartialName. More...
 
template<class T >
void push_back (const T &component)
 Append a component. More...
 
void clear ()
 Remove all components. More...
 
Name getSuccessor () const
 Get the successor of a name. More...
 
bool isPrefixOf (const Name &other) const
 Check if this name is a prefix of another name. More...
 
bool equals (const Name &other) const
 Check if this name equals another name. More...
 
int compare (const Name &other) const
 Compare this to the other Name using NDN canonical ordering. More...
 
int compare (size_t pos1, size_t count1, const Name &other, size_t pos2=0, size_t count2=npos) const
 compares [pos1, pos1+count1) components in this Name to [pos2, pos2+count2) components in other More...
 

Static Public Attributes

static const size_t npos = std::numeric_limits<size_t>::max()
 indicates "until the end" in getSubName and compare More...
 

Detailed Description

Represents an absolute name.

Definition at line 42 of file name.hpp.

Member Typedef Documentation

Definition at line 55 of file name.hpp.

Definition at line 56 of file name.hpp.

Definition at line 59 of file name.hpp.

Definition at line 60 of file name.hpp.

Definition at line 61 of file name.hpp.

Definition at line 62 of file name.hpp.

Definition at line 63 of file name.hpp.

Definition at line 64 of file name.hpp.

Definition at line 65 of file name.hpp.

Definition at line 66 of file name.hpp.

using ndn::Name::reverse_iterator = std::reverse_iterator<iterator>

Definition at line 67 of file name.hpp.

using ndn::Name::const_reverse_iterator = std::reverse_iterator<const_iterator>

Definition at line 68 of file name.hpp.

using ndn::Name::difference_type = component_container::difference_type

Definition at line 69 of file name.hpp.

using ndn::Name::size_type = component_container::size_type

Definition at line 70 of file name.hpp.

Constructor & Destructor Documentation

ndn::Name::Name ( )

Create an empty name.

Postcondition
empty() == true

Definition at line 56 of file name.cpp.

Referenced by ndn::operator>>().

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

Decode Name from wire encoding.

Exceptions
tlv::Errorwire encoding is invalid

This is a more efficient equivalent for

name.wireDecode(wire);

Definition at line 61 of file name.cpp.

References ndn::Block::parse().

ndn::Name::Name ( const char *  uri)

Parse name from NDN URI.

Parameters
uria null-terminated URI string
See also
https://named-data.net/doc/ndn-tlv/name.html#ndn-uri-scheme

Definition at line 67 of file name.cpp.

ndn::Name::Name ( std::string  uri)

Create name from NDN URI.

Parameters
uria URI string
See also
https://named-data.net/doc/ndn-tlv/name.html#ndn-uri-scheme

Definition at line 72 of file name.cpp.

References append(), and ndn::name::Component::fromEscapedString().

Member Function Documentation

std::string ndn::Name::toUri ( ) const

Get URI representation of the name.

Returns
URI representation; "ndn:" scheme identifier is not included
See also
https://named-data.net/doc/ndn-tlv/name.html#ndn-uri-scheme
Note
To print URI representation into a stream, it is more efficient to use os << name.

Definition at line 122 of file name.cpp.

Referenced by ndn::security::pib::CertificateContainer::add(), ndn::security::pib::KeyContainer::add(), ndn::security::v2::KeyChain::addCertificate(), ndn::security::v2::ValidationPolicySimpleHierarchy::checkPolicy(), ndn::security::v2::validator_config::ValidationPolicyConfig::checkPolicy(), ndn::security::v2::ValidationPolicyCommandInterest::checkPolicy(), ndn::security::tpm::BackEnd::createKey(), ndn::security::v2::KeyChain::deleteCertificate(), ndn::security::v2::KeyChain::deleteKey(), ndn::security::tpm::BackEndOsx::derivePublicKey(), ndn::security::v2::CertificateFetcherFromNetwork::doFetch(), nfd::TablesConfigSection::ensureConfigured(), ndn::security::tpm::BackEnd::exportKey(), ndn::security::v2::KeyChain::exportSafeBag(), ndn::security::v2::extractIdentityFromCertName(), ndn::security::v2::extractIdentityFromKeyName(), ndn::security::v2::extractKeyNameFromCertName(), ndn::security::pib::CertificateContainer::get(), ndn::security::pib::KeyContainer::get(), ndn::security::pib::PibMemory::getCertificate(), ndn::security::pib::PibSqlite3::getCertificate(), ndn::security::pib::PibMemory::getDefaultCertificateOfKey(), ndn::security::pib::PibSqlite3::getDefaultCertificateOfKey(), ndn::security::pib::PibMemory::getDefaultKeyOfIdentity(), ndn::security::pib::PibSqlite3::getDefaultKeyOfIdentity(), ndn::security::tpm::BackEndOsx::Impl::getKey(), ndn::security::pib::PibMemory::getKeyBits(), ndn::security::pib::PibSqlite3::getKeyBits(), ndn::security::pib::detail::IdentityImpl::IdentityImpl(), ndn::security::tpm::BackEnd::importKey(), ndn::security::v2::KeyChain::importSafeBag(), nfd::rib::RibManager::onRibUpdateFailure(), ndn::security::v2::parseLocatorUri(), ndn::security::pib::CertificateContainer::remove(), ndn::security::pib::KeyContainer::remove(), ndn::security::pib::PibMemory::setDefaultCertificateOfKey(), ndn::security::pib::PibSqlite3::setDefaultCertificateOfKey(), ndn::security::pib::PibMemory::setDefaultKeyOfIdentity(), ndn::security::pib::PibSqlite3::setDefaultKeyOfIdentity(), ndn::security::v2::Validator::validate(), ndn::security::v2::DataValidationState::~DataValidationState(), and ndn::security::v2::InterestValidationState::~InterestValidationState().

bool ndn::Name::hasWire ( ) const
inline

Check if this Name instance already has wire encoding.

Definition at line 113 of file name.hpp.

References deepCopy(), wireDecode(), and wireEncode().

template<encoding::Tag TAG>
size_t ndn::Name::wireEncode ( EncodingImpl< TAG > &  encoder) const

Fast encoding or block size estimation.

Definition at line 131 of file name.cpp.

References ndn::tlv::Name, and ndn::NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS().

Referenced by nfd::DeadNonceList::add(), ndn::security::pib::PibSqlite3::addCertificate(), ndn::security::pib::PibSqlite3::addIdentity(), ndn::security::pib::PibSqlite3::addKey(), nfd::name_tree::computeHash(), nfd::name_tree::computeHashes(), deepCopy(), ndn::security::pib::PibSqlite3::getCertificate(), ndn::security::pib::PibSqlite3::getCertificatesOfKey(), ndn::security::pib::PibSqlite3::getDefaultCertificateOfKey(), ndn::security::pib::PibSqlite3::getDefaultKeyOfIdentity(), ndn::security::pib::PibSqlite3::getKeyBits(), ndn::security::pib::PibSqlite3::getKeysOfIdentity(), ndn::security::pib::PibSqlite3::hasCertificate(), ndn::security::pib::PibSqlite3::hasIdentity(), ndn::security::pib::PibSqlite3::hasKey(), std::hash< ndn::Name >::operator()(), ndn::security::parse(), ndn::security::pib::PibSqlite3::removeCertificate(), ndn::security::pib::PibSqlite3::removeIdentity(), ndn::security::pib::PibSqlite3::removeKey(), ndn::security::pib::PibSqlite3::setDefaultCertificateOfKey(), ndn::security::pib::PibSqlite3::setDefaultIdentity(), ndn::security::pib::PibSqlite3::setDefaultKeyOfIdentity(), ndn::security::v2::KeyChain::sign(), ndn::security::tpm::BackEndFile::Impl::toFileName(), ndn::nfd::StrategyChoice::wireEncode(), ndn::Data::wireEncode(), ndn::Interest::wireEncode(), ndn::KeyLocator::wireEncode(), and ndn::nfd::ControlParameters::wireEncode().

const Block & ndn::Name::wireEncode ( ) const

Perform wire encoding, or return existing wire encoding.

Postcondition
hasWire() == true

Definition at line 146 of file name.cpp.

References ndn::Block::hasWire(), and ndn::Block::parse().

Referenced by hasWire().

void ndn::Name::wireDecode ( const Block wire)
Name ndn::Name::deepCopy ( ) const

Make a deep copy of the name, reallocating the underlying memory buffer.

Definition at line 174 of file name.cpp.

References ndn::Block::resetWire(), and wireEncode().

Referenced by hasWire().

size_t ndn::Name::size ( ) const
inline

Get number of components.

Definition at line 154 of file name.hpp.

Referenced by ndn::mgmt::Dispatcher::addStatusDataset(), append(), at(), ndn::security::v2::validator_config::Checker::check(), ndn::security::v2::validator_config::checkNameRelation(), ndn::security::v2::ValidationPolicyCommandInterest::checkPolicy(), compare(), nfd::cs::compareQueryWithData(), nfd::name_tree::computeHash(), nfd::name_tree::computeHashes(), nfd::rib::AutoPrefixPropagator::disable(), ndn::InterestFilter::doesMatch(), ndn::security::v2::CertificateBundleFetcher::doFetch(), equals(), nfd::strategy_choice::StrategyChoice::erase(), ndn::RegexTopMatcher::expand(), ndn::security::v2::CertificateCache::find(), nfd::cs::Cs::find(), nfd::name_tree::NameTree::findExactMatch(), nfd::name_tree::NameTree::findLongestPrefixMatch(), nfd::rib::Rib::findParent(), get(), ndn::security::v2::getKeyLocatorName(), nfd::fw::asf::AsfMeasurements::getOrCreateNamespaceInfo(), getPrefix(), getSubName(), nfd::strategy_choice::StrategyChoice::insert(), isPrefixOf(), ndn::security::v2::isValidKeyName(), ndn::security::v2::Certificate::isValidName(), nfd::name_tree::NameTree::lookup(), nfd::CommandAuthenticator::makeAuthorization(), ndn::RegexTopMatcher::match(), ndn::security::v2::validator_config::Filter::match(), ndn::Interest::matchesData(), ndn::Interest::matchesName(), ndn::nfd::operator==(), ndn::security::parse(), nfd::fw::Strategy::parseInstanceName(), nfd::pit::Pit::Pit(), ndn::mgmt::Dispatcher::removeTopPrefix(), ndn::InMemoryStorage::selectChild(), and ndn::nfd::StrategyChoiceUnsetCommand::validateRequest().

const Component& ndn::Name::operator[] ( ssize_t  i) const
inline

Equivalent to get(i)

Definition at line 175 of file name.hpp.

References at(), getSubName(), and npos.

PartialName ndn::Name::getSubName ( ssize_t  iStartComponent,
size_t  nComponents = npos 
) const

Extract some components as a sub-name (PartialName)

Parameters
iStartComponentzero-based index of the first component; if negative, size()+iStartComponent is used instead
nComponentsNumber of components starting at iStartComponent. Use npos to get the PartialName until the end of this Name.
Returns
a new PartialName containing the extracted components

If iStartComponent is positive and indexes out of bounds, returns an empty PartialName. If iStartComponent is negative and indexes out of bounds, returns components starting from the beginning of the Name. If nComponents is out of bounds, returns the components until the end of this Name.

Definition at line 199 of file name.cpp.

References append(), at(), npos, and size().

Referenced by getPrefix(), operator[](), and nfd::fw::Strategy::parseInstanceName().

const_iterator ndn::Name::begin ( ) const
inline

Begin iterator.

Definition at line 222 of file name.hpp.

Referenced by ndn::RegexTopMatcher::expand(), ndn::RegexTopMatcher::fromName(), and rend().

const_iterator ndn::Name::end ( ) const
inline

End iterator.

Definition at line 230 of file name.hpp.

Referenced by ndn::RegexTopMatcher::fromName(), and rbegin().

const_reverse_iterator ndn::Name::rbegin ( ) const
inline

Reverse begin iterator.

Definition at line 238 of file name.hpp.

References end().

Referenced by nfd::fw::Strategy::makeInstanceName().

const_reverse_iterator ndn::Name::rend ( ) const
inline

Reverse end iterator.

Definition at line 246 of file name.hpp.

References begin().

Referenced by nfd::fw::Strategy::makeInstanceName().

Name& ndn::Name::append ( const char *  value)
inline

Append a component, copying from a zero-terminated byte string.

Parameters
valuea zero-terminated string; it will be constructed as a component as is and will not be interpreted as a URI
Note
This overload is necessary to ensure unambiguity of append("string"), because both Component and PartialName are implicitly convertible from zero-terminated byte string. This overload ensures the string is constructed as a Component.

Definition at line 270 of file name.hpp.

References append().

Name& ndn::Name::append ( const uint8_t *  value,
size_t  valueLength 
)
inline

Append a component, copying from [value, value + valueLength)

Returns
a reference to this name, to allow chaining

Definition at line 279 of file name.hpp.

References append().

template<class Iterator >
Name& ndn::Name::append ( Iterator  first,
Iterator  last 
)
inline

Append a component, copying from [first, last)

Template Parameters
Iteratoran InputIterator dereferencing to a one-octet value type. More efficient implementation is available when Iterator additionally satisfies RandomAccessIterator concept.
Parameters
firstbegin position of the value
lastend position of the value
Returns
a reference to this name, to allow chaining

Definition at line 294 of file name.hpp.

References append().

Name& ndn::Name::append ( const Block value)
inline

Append a component, decoding from a Block.

Parameters
valuea Block; if its TLV-TYPE is not NameComponent, it is nested into a NameComponent
Returns
a reference to this name, to allow chaining

Definition at line 306 of file name.hpp.

References ndn::tlv::NameComponent, push_back(), and ndn::Block::type().

Name& ndn::Name::appendNumber ( uint64_t  number)
inline

Append a component with a nonNegativeInteger.

See also
number the number
Returns
a reference to this name, to allow chaining
See also
https://named-data.net/doc/ndn-tlv/tlv.html#non-negative-integer-encoding

Definition at line 324 of file name.hpp.

References append(), and ndn::name::Component::fromNumber().

Referenced by ndn::security::v2::CertificateBundleFetcher::doFetch().

Name& ndn::Name::appendNumberWithMarker ( uint8_t  marker,
uint64_t  number 
)
inline

Append a component with a marked number.

Parameters
marker1-octet marker
numberthe number

The component is encoded as a 1-octet marker, followed by a nonNegativeInteger.

Returns
a reference to this name, to allow chaining
See also
NDN Naming Conventions https://named-data.net/doc/tech-memos/naming-conventions.pdf

Definition at line 339 of file name.hpp.

References append(), and ndn::name::Component::fromNumberWithMarker().

Name& ndn::Name::appendVersion ( uint64_t  version)
inline

Append a version component.

Returns
a reference to this name, to allow chaining
See also
NDN Naming Conventions https://named-data.net/doc/tech-memos/naming-conventions.pdf

Definition at line 349 of file name.hpp.

References append(), appendVersion(), and ndn::name::Component::fromVersion().

Referenced by ndn::security::v2::parseLocatorUri(), and ndn::mgmt::StatusDatasetContext::setPrefix().

Name & ndn::Name::appendVersion ( )

Append a version component based on current time.

The version number is the current UNIX timestamp in milliseconds

Returns
a reference to this name, to allow chaining
See also
NDN Naming Conventions https://named-data.net/doc/tech-memos/naming-conventions.pdf

Definition at line 220 of file name.cpp.

References ndn::time::system_clock::now(), and ndn::time::toUnixTimestamp().

Referenced by appendVersion().

Name& ndn::Name::appendSegment ( uint64_t  segmentNo)
inline

Append a segment number (sequential) component.

Returns
a reference to this name, to allow chaining
See also
NDN Naming Conventions https://named-data.net/doc/tech-memos/naming-conventions.pdf

Definition at line 369 of file name.hpp.

References append(), and ndn::name::Component::fromSegment().

Referenced by ndn::util::SegmentFetcher::fetch().

Name& ndn::Name::appendSegmentOffset ( uint64_t  offset)
inline

Append a segment byte offset component.

Returns
a reference to this name, to allow chaining
See also
NDN Naming Conventions https://named-data.net/doc/tech-memos/naming-conventions.pdf

Definition at line 379 of file name.hpp.

References append(), and ndn::name::Component::fromSegmentOffset().

Name& ndn::Name::appendTimestamp ( const time::system_clock::TimePoint timePoint)
inline

Append a timestamp component.

Returns
a reference to this name, to allow chaining
See also
NDN Naming Conventions https://named-data.net/doc/tech-memos/naming-conventions.pdf

Definition at line 389 of file name.hpp.

References append(), appendTimestamp(), and ndn::name::Component::fromTimestamp().

Name & ndn::Name::appendTimestamp ( )

Append a timestamp component based on current time.

Returns
a reference to this name, to allow chaining
See also
NDN Naming Conventions https://named-data.net/doc/tech-memos/naming-conventions.pdf

Definition at line 226 of file name.cpp.

References ndn::time::system_clock::now().

Referenced by appendTimestamp().

Name& ndn::Name::appendSequenceNumber ( uint64_t  seqNo)
inline

Append a sequence number component.

Returns
a reference to this name, to allow chaining
See also
NDN Naming Conventions https://named-data.net/doc/tech-memos/naming-conventions.pdf

Definition at line 406 of file name.hpp.

References append(), and ndn::name::Component::fromSequenceNumber().

Referenced by ndn::mgmt::Dispatcher::addNotificationStream(), ndn::util::NotificationStream< Notification >::postNotification(), and ndn::util::NotificationSubscriberBase::stop().

Name& ndn::Name::appendImplicitSha256Digest ( const ConstBufferPtr digest)
inline

Append an ImplicitSha256Digest component.

Returns
a reference to this name, to allow chaining

Definition at line 415 of file name.hpp.

References append(), and ndn::name::Component::fromImplicitSha256Digest().

Referenced by ndn::Data::getFullName().

Name& ndn::Name::appendImplicitSha256Digest ( const uint8_t *  digest,
size_t  digestSize 
)
inline

Append an ImplicitSha256Digest component.

Returns
a reference to this name, to allow chaining

Definition at line 424 of file name.hpp.

References append(), and ndn::name::Component::fromImplicitSha256Digest().

Name & ndn::Name::append ( const PartialName name)

Append a PartialName.

Parameters
namethe components to append
Returns
a reference to this name, to allow chaining

Definition at line 232 of file name.cpp.

References append(), at(), and size().

template<class T >
void ndn::Name::push_back ( const T &  component)
inline

Append a component.

Note
This makes push_back an alias of append, giving Name a similar API as STL vector.

Definition at line 441 of file name.hpp.

References append().

Referenced by append(), and nfd::name_tree::computeHashes().

Name ndn::Name::getSuccessor ( ) const

Get the successor of a name.

The successor of a name is defined as follows:

N represents the set of NDN Names, and X,Y ∈ N.
Operator < is defined by canonical order on N.
Y is the successor of X, if (a) X < Y, and (b) ∄ Z ∈ N s.t. X < Z < Y.

In plain words, successor of a name is the same name, but with its last component advanced to a next possible value.

Examples:

  • successor for / is /%00
  • successor for /%00%01/%01%02 is /%00%01/%01%03
  • successor for /%00%01/%01FF is /%00%01/%02%00
  • successor for /%00%01/FFFF is /%00%01/%00%00%00
Returns
a new Name containing the successor

Definition at line 247 of file name.cpp.

References append(), empty(), and getPrefix().

Referenced by clear(), and nfd::cs::Cs::find().

bool ndn::Name::equals ( const Name other) const

Check if this name equals another name.

Two names are equal if they have the same number of components, and components at each index are equal.

Definition at line 276 of file name.cpp.

References get(), and size().

Referenced by clear(), ndn::operator!=(), and ndn::operator==().

int ndn::Name::compare ( const Name other) const
inline

Compare this to the other Name using NDN canonical ordering.

If the first components of each name are not equal, this returns a negative value if the first comes before the second using the NDN canonical ordering for name components, or a positive value if it comes after. If they are equal, this compares the second components of each name, etc. If both names are the same up to the size of the shorter name, this returns a negative value if the first name is shorter than the second or a positive value if it is longer. For example, if you std::sort gives: /a/b/d /a/b/cc /c /c/a /bb . This is intuitive because all names with the prefix /a are next to each other. But it may be also be counter-intuitive because /c comes before /bb according to NDN canonical ordering since it is shorter.

Parameters
otherThe other Name to compare with.
Return values
negativethis comes before other in canonical ordering
zerothis equals other
positivethis comes after other in canonical ordering
See also
https://named-data.net/doc/ndn-tlv/name.html#canonical-order

Definition at line 520 of file name.hpp.

References npos.

Referenced by compare(), nfd::cs::compareDataWithData(), nfd::cs::compareQueryWithData(), ndn::operator<(), ndn::operator<=(), ndn::operator>(), ndn::operator>=(), and nfd::name_tree::Hashtable::~Hashtable().

int ndn::Name::compare ( size_t  pos1,
size_t  count1,
const Name other,
size_t  pos2 = 0,
size_t  count2 = npos 
) const

compares [pos1, pos1+count1) components in this Name to [pos2, pos2+count2) components in other

This is equivalent to this->getSubName(pos1, count1).compare(other.getSubName(pos2, count2));

Definition at line 290 of file name.cpp.

References compare(), get(), and size().

Member Data Documentation

const size_t ndn::Name::npos = std::numeric_limits<size_t>::max()
static

indicates "until the end" in getSubName and compare

Definition at line 537 of file name.hpp.

Referenced by nfd::pit::Entry::canMatch(), compare(), getSubName(), and operator[]().


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