Name abstraction to represent an absolute name. More...
#include <name.hpp>
Classes | |
class | Error |
Error that can be thrown from Name. More... | |
Public Types | |
typedef name::Component | Component |
typedef std::vector< Component > | component_container |
typedef Component | value_type |
typedef void | allocator_type |
typedef Component & | reference |
typedef const Component | const_reference |
typedef Component * | pointer |
typedef const Component * | const_pointer |
typedef Component * | iterator |
typedef const Component * | const_iterator |
typedef boost::reverse_iterator< iterator > | reverse_iterator |
typedef boost::reverse_iterator< const_iterator > | const_reverse_iterator |
typedef component_container::difference_type | difference_type |
typedef component_container::size_type | size_type |
Public Member Functions | |
Name () | |
Create a new Name with no components. More... | |
Name (const Block &wire) | |
Create Name object from wire block. More... | |
Name (const char *uri) | |
Create name from uri (NDN URI scheme) More... | |
Name (const std::string &uri) | |
Create name from uri (NDN URI scheme) More... | |
template<encoding::Tag TAG> | |
size_t | wireEncode (EncodingImpl< TAG > &encoder) const |
Fast encoding or block size estimation. More... | |
const Block & | wireEncode () const |
void | wireDecode (const Block &wire) |
bool | hasWire () const |
Check if already has wire. More... | |
DEPRECATED (void set(const char *uri)) | |
DEPRECATED (void set(const std::string &uri)) | |
Name & | append (const uint8_t *value, size_t valueLength) |
Append a new component, copying from value of length valueLength. More... | |
template<class Iterator > | |
Name & | append (Iterator first, Iterator last) |
Append a new component, copying from value frome the range [first , last ) of bytes. More... | |
Name & | append (const Component &value) |
Append component value . More... | |
Name & | append (const char *value) |
Append name component that represented as a string. More... | |
Name & | append (const Block &value) |
Name & | append (const PartialName &name) |
append a PartialName to this Name. More... | |
void | clear () |
Clear all the components. More... | |
PartialName | getSubName (ssize_t iStartComponent, size_t nComponents=npos) const |
Extract a sub-name (PartialName) of nComponents components starting from iStartComponent . More... | |
PartialName | getPrefix (ssize_t nComponents) const |
Extract a prefix (PartialName) of the name, containing first nComponents components. More... | |
std::string | toUri () const |
Encode this name as a URI. More... | |
Name & | appendNumber (uint64_t number) |
Append a component with the number encoded as nonNegativeInteger. More... | |
Name & | appendNumberWithMarker (uint8_t marker, uint64_t number) |
Create a component encoded as NameComponentWithMarker. More... | |
Name & | appendVersion (uint64_t version) |
Append version using NDN naming conventions. More... | |
Name & | appendVersion () |
Append version using NDN naming conventions based on current UNIX timestamp in milliseconds. More... | |
Name & | appendSegment (uint64_t segmentNo) |
Append segment number (sequential) using NDN naming conventions. More... | |
Name & | appendSegmentOffset (uint64_t offset) |
Append segment byte offset using NDN naming conventions. More... | |
Name & | appendTimestamp (const time::system_clock::TimePoint &timePoint=time::system_clock::now()) |
Append timestamp using NDN naming conventions. More... | |
Name & | appendSequenceNumber (uint64_t seqNo) |
Append sequence number using NDN naming conventions. More... | |
Name & | appendImplicitSha256Digest (const ConstBufferPtr &digest) |
Append ImplicitSha256Digest. More... | |
Name & | appendImplicitSha256Digest (const uint8_t *digest, size_t digestSize) |
Append ImplicitSha256Digest. More... | |
Name | getSuccessor () const |
Get the successor of a name. More... | |
bool | equals (const Name &name) const |
Check if this name has the same component count and components as the given name. More... | |
bool | isPrefixOf (const Name &name) const |
Check if the N components of this name are the same as the first N components of the given name. More... | |
bool | empty () const |
Check if name is emtpy. More... | |
size_t | size () const |
Get the number of components. More... | |
const Component & | get (ssize_t i) const |
Get the component at the given index. More... | |
const Component & | operator[] (ssize_t i) const |
const Component & | at (ssize_t i) const |
Get component at the specified index. 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... | |
template<class T > | |
void | push_back (const T &component) |
Append the component. More... | |
bool | operator== (const Name &name) const |
Check if this name has the same component count and components as the given name. More... | |
bool | operator!= (const Name &name) const |
Check if this name has the same component count and components as the given name. More... | |
bool | operator<= (const Name &other) const |
Return true if this is less than or equal to the other Name in the NDN canonical ordering. More... | |
bool | operator< (const Name &other) const |
Return true if this is less than the other Name in the NDN canonical ordering. More... | |
bool | operator>= (const Name &other) const |
Return true if this is less than or equal to the other Name in the NDN canonical ordering. More... | |
bool | operator> (const Name &other) const |
Return true if this is greater than the other Name in the NDN canonical ordering. More... | |
const_iterator | begin () const |
Begin iterator (const). More... | |
const_iterator | end () const |
End iterator (const). More... | |
const_reverse_iterator | rbegin () const |
Reverse begin iterator (const). More... | |
const_reverse_iterator | rend () const |
Reverse end iterator (const). More... | |
Static Public Attributes | |
static const size_t | npos = std::numeric_limits<size_t>::max() |
indicates "until the end" in getSubName and compare More... | |
typedef name::Component ndn::Name::Component |
typedef std::vector<Component> ndn::Name::component_container |
typedef Component ndn::Name::value_type |
typedef void ndn::Name::allocator_type |
typedef Component& ndn::Name::reference |
typedef const Component ndn::Name::const_reference |
typedef Component* ndn::Name::pointer |
typedef const Component* ndn::Name::const_pointer |
typedef Component* ndn::Name::iterator |
typedef const Component* ndn::Name::const_iterator |
typedef boost::reverse_iterator<iterator> ndn::Name::reverse_iterator |
typedef boost::reverse_iterator<const_iterator> ndn::Name::const_reverse_iterator |
typedef component_container::difference_type ndn::Name::difference_type |
typedef component_container::size_type ndn::Name::size_type |
ndn::Name::Name | ( | ) |
Create a new Name with no components.
Definition at line 46 of file name.cpp.
Referenced by ndn::operator>>(), and wireDecode().
|
explicit |
ndn::Name::Name | ( | const char * | uri | ) |
ndn::Name::Name | ( | const std::string & | uri | ) |
size_t ndn::Name::wireEncode | ( | EncodingImpl< TAG > & | encoder | ) | const |
Fast encoding or block size estimation.
Definition at line 69 of file name.cpp.
References ndn::tlv::Name, rbegin(), and rend().
Referenced by nfd::DeadNonceList::add(), ndn::security::PibSqlite3::addCertificate(), ndn::security::PibSqlite3::addIdentity(), ndn::security::PibSqlite3::addKey(), ndn::CommandInterestValidator::checkPolicy(), nfd::name_tree::computeHash(), nfd::name_tree::computeHashSet(), ndn::security::PibSqlite3::getCertificate(), ndn::security::PibSqlite3::getCertificatesOfKey(), ndn::security::PibSqlite3::getDefaultCertificateOfKey(), ndn::security::PibSqlite3::getDefaultKeyOfIdentity(), ndn::security::PibSqlite3::getKeyBits(), ndn::security::PibSqlite3::getKeysOfIdentity(), ndn::security::PibSqlite3::hasCertificate(), ndn::security::PibSqlite3::hasIdentity(), ndn::security::PibSqlite3::hasKey(), ndn::security::KeyChain::importIdentity(), std::hash< ndn::Name >::operator()(), ndn::security::PibSqlite3::removeCertificate(), ndn::security::PibSqlite3::removeIdentity(), ndn::security::PibSqlite3::removeKey(), ndn::security::PibSqlite3::setDefaultCertificateOfKey(), ndn::security::PibSqlite3::setDefaultIdentity(), ndn::security::PibSqlite3::setDefaultKeyOfIdentity(), ndn::security::KeyChain::signWithSha256(), ndn::Validator::verifySignature(), ndn::nfd::StrategyChoice::wireEncode(), ndn::KeyLocator::wireEncode(), ndn::Interest::wireEncode(), ndn::nfd::ControlParameters::wireEncode(), and ndn::Data::wireEncode().
const Block & ndn::Name::wireEncode | ( | ) | const |
Definition at line 90 of file name.cpp.
References ndn::Block::hasWire(), and ndn::Block::parse().
void ndn::Name::wireDecode | ( | const Block & | wire | ) |
Definition at line 108 of file name.cpp.
References append(), clear(), ndn::name::Component::fromEscapedString(), ndn::tlv::Name, Name(), ndn::Block::parse(), ndn::trim(), and ndn::Block::type().
Referenced by ndn::nfd::StrategyChoice::wireDecode(), ndn::KeyLocator::wireDecode(), ndn::nfd::ControlParameters::wireDecode(), ndn::Interest::wireDecode(), and ndn::Data::wireDecode().
|
inline |
ndn::Name::DEPRECATED | ( | void | setconst char *uri | ) |
ndn::Name::DEPRECATED | ( | void | setconst std::string &uri | ) |
|
inline |
Append a new component, copying from value of length valueLength.
Definition at line 148 of file name.hpp.
References push_back().
Referenced by ndn::mgmt::Dispatcher::addNotificationStream(), ndn::mgmt::Dispatcher::addTopPrefix(), append(), ndn::IdentityCertificate::certificateNameToPublicKeyName(), ndn::RegexTopMatcher::expand(), ndn::SecPublicInfoSqlite3::getAllKeyNames(), ndn::SecPublicInfoSqlite3::getAllKeyNamesOfIdentity(), ndn::SecPublicInfoSqlite3::getDefaultKeyNameForIdentity(), ndn::security::PibMemory::getDefaultKeyOfIdentity(), ndn::security::getKeyName(), ndn::nfd::ControlCommand::getRequestName(), getSubName(), getSuccessor(), ndn::security::KeyChain::importIdentity(), ndn::security::Key::Key(), ndn::security::KeyChain::prepareUnsignedIdentityCertificate(), push_back(), ndn::security::KeyChain::selfSign(), ndn::security::KeyChain::signWithSha256(), and wireDecode().
|
inline |
Append a new component, copying from value frome the range [first
, last
) of bytes.
first | Iterator pointing to the beginning of the buffer |
last | Iterator pointing to the ending of the buffer |
Iterator | iterator type satisfying at least InputIterator concept. Implementation is more optimal when the iterator type satisfies RandomAccessIterator concept. It is required that sizeof(std::iterator_traits<Iterator>::value_type) == 1. |
Definition at line 165 of file name.hpp.
References push_back().
|
inline |
Append name component that represented as a string.
Note that this method is necessary to ensure correctness and unambiguity of append("string")
operations (both Component and Name can be implicitly converted from string, each having different outcomes
Definition at line 189 of file name.hpp.
References push_back().
Definition at line 196 of file name.hpp.
References append(), ndn::tlv::NameComponent, push_back(), and ndn::Block::type().
Name & ndn::Name::append | ( | const PartialName & | name | ) |
|
inline |
Clear all the components.
Definition at line 218 of file name.hpp.
References getSubName(), ndn::tlv::Name, and npos.
Referenced by ndn::KeyLocator::clear(), ndn::Data::onChanged(), ndn::security::SigningInfo::setSha256Signing(), wireDecode(), and ndn::Data::wireDecode().
PartialName ndn::Name::getSubName | ( | ssize_t | iStartComponent, |
size_t | nComponents = npos |
||
) | const |
Extract a sub-name (PartialName) of nComponents
components starting from iStartComponent
.
iStartComponent | index of the first component; if iStartComponent is negative, size()+iStartComponent is used instead |
nComponents | The number of components starting at iStartComponent. Use npos to get the Partial Name until the end of this Name. |
If iStartComponent is out of bounds and is negative, will return the components starting in the beginning of the Name If iStartComponent is out of bounds and is positive, will return the component "/" If nComponents is out of bounds, will return the components until the end of this Name
Definition at line 274 of file name.cpp.
References append(), at(), npos, and size().
Referenced by ndn::IdentityCertificate::certificateNameToPublicKeyName(), clear(), getPrefix(), and ndn::security::KeyChain::prepareUnsignedIdentityCertificate().
|
inline |
Extract a prefix (PartialName) of the name, containing first nComponents
components.
nComponents | The number of prefix components. If nComponents is -N then return the prefix up to name.size() - N. For example getPrefix(-1) returns the name without the final component. |
Definition at line 249 of file name.hpp.
References appendImplicitSha256Digest(), appendNumber(), appendNumberWithMarker(), appendSegment(), appendSegmentOffset(), appendSequenceNumber(), appendTimestamp(), appendVersion(), equals(), getSubName(), getSuccessor(), isPrefixOf(), ndn::time::system_clock::now(), and toUri().
Referenced by ndn::SecPublicInfoSqlite3::addCertificate(), ndn::security::PibMemory::addCertificate(), ndn::security::PibSqlite3::addCertificate(), ndn::SecPublicInfo::addCertificateAsSystemDefault(), ndn::SecPublicInfoSqlite3::addKey(), nfd::fw::AccessStrategy::beforeSatisfyInterest(), ndn::security::conf::KeyLocatorChecker::check(), ndn::SecPublicInfoSqlite3::deletePublicKeyInfo(), ndn::SecPublicInfoSqlite3::doesPublicKeyExist(), nfd::rib::RibManager::enableLocalControlHeader(), nfd::StrategyChoice::erase(), ndn::util::SegmentFetcher::fetch(), nfd::cs::Cs::find(), nfd::NameTree::findExactMatch(), nfd::rib::Rib::findParent(), ndn::SecPublicInfoSqlite3::getAllCertificateNamesOfKey(), ndn::SecPublicInfoSqlite3::getDefaultCertificateNameForKey(), ndn::SecPublicInfoSqlite3::getDefaultKeyNameForIdentity(), ndn::security::PibMemory::getKeysOfIdentity(), ndn::SecPublicInfoSqlite3::getPublicKey(), ndn::SecPublicInfoSqlite3::getPublicKeyType(), ndn::CertificateCacheTtl::getSize(), getSuccessor(), ndn::security::KeyChain::importIdentity(), nfd::NameTree::lookup(), ndn::security::conf::Filter::match(), ndn::security::KeyChain::prepareUnsignedIdentityCertificate(), nfd::rib::RemoteRegistrator::registerPrefix(), ndn::util::InMemoryStorage::selectChild(), ndn::security::KeyChain::selfSign(), and nfd::rib::RemoteRegistrator::unregisterPrefix().
std::string ndn::Name::toUri | ( | ) | const |
Encode this name as a URI.
Definition at line 183 of file name.cpp.
Referenced by ndn::SecTpmOsx::addAppToAcl(), ndn::SecPublicInfoSqlite3::addCertificate(), ndn::SecPublicInfoSqlite3::addIdentity(), ndn::SecPublicInfoSqlite3::addKey(), ndn::IdentityCertificate::certificateNameToPublicKeyName(), ndn::security::conf::FixedSignerChecker::check(), ndn::ValidatorRegex::checkPolicy(), ndn::ValidatorConfig::checkPolicy(), ndn::CommandInterestValidator::checkPolicy(), ndn::SecPublicInfoSqlite3::deleteCertificateInfo(), ndn::SecPublicInfoSqlite3::deleteIdentityInfo(), ndn::SecTpmFile::deleteKeyPairInTpm(), ndn::SecTpmOsx::deleteKeyPairInTpmInternal(), ndn::SecPublicInfoSqlite3::deletePublicKeyInfo(), ndn::SecPublicInfoSqlite3::doesCertificateExist(), ndn::SecPublicInfoSqlite3::doesIdentityExist(), ndn::SecTpmFile::doesKeyExistInTpm(), ndn::SecPublicInfoSqlite3::doesPublicKeyExist(), nfd::TablesConfigSection::ensureTablesAreConfigured(), ndn::SecTpmFile::exportPrivateKeyPkcs8FromTpm(), ndn::SecTpmOsx::exportPrivateKeyPkcs8FromTpmInternal(), ndn::SecTpmFile::generateKeyPairInTpm(), ndn::SecPublicInfoSqlite3::getAllCertificateNamesOfKey(), ndn::SecPublicInfoSqlite3::getAllKeyNamesOfIdentity(), ndn::SecPublicInfoSqlite3::getCertificate(), ndn::SecPublicInfoSqlite3::getDefaultCertificateNameForKey(), ndn::SecPublicInfoSqlite3::getDefaultIdentity(), ndn::SecPublicInfoSqlite3::getDefaultKeyNameForIdentity(), ndn::SecPublicInfo::getNewKeyName(), getPrefix(), ndn::SecPublicInfoSqlite3::getPublicKey(), ndn::SecTpmOsx::getPublicKeyFromTpm(), ndn::SecTpmFile::getPublicKeyFromTpm(), ndn::SecPublicInfoSqlite3::getPublicKeyType(), ndn::security::Identity::Identity(), ndn::security::KeyChain::importIdentity(), ndn::SecTpmFile::importPrivateKeyPkcs8IntoTpm(), ndn::SecTpmOsx::importPrivateKeyPkcs8IntoTpmInternal(), ndn::SecTpmOsx::importPublicKeyPkcs1IntoTpm(), ndn::SecTpmFile::importPublicKeyPkcs1IntoTpm(), ndn::Validator::onData(), nfd::rib::RibManager::onRibUpdateFailure(), ndn::Validator::onTimeout(), ndn::security::KeyChain::prepareUnsignedIdentityCertificate(), ndn::security::KeyChain::selfSign(), ndn::SecTpmFile::signInTpm(), ndn::SecTpmOsx::signInTpmInternal(), and ndn::SecTpmOsx::Impl::toInternalKeyName().
Name & ndn::Name::appendNumber | ( | uint64_t | number | ) |
Append a component with the number encoded as nonNegativeInteger.
number | The non-negative number |
Definition at line 204 of file name.cpp.
References ndn::name::Component::fromNumber(), and ndn::Block::push_back().
Referenced by getPrefix().
Name & ndn::Name::appendNumberWithMarker | ( | uint8_t | marker, |
uint64_t | number | ||
) |
Create a component encoded as NameComponentWithMarker.
marker | 1-byte marker octet |
number | The non-negative number |
Definition at line 211 of file name.cpp.
References ndn::name::Component::fromNumberWithMarker(), and ndn::Block::push_back().
Referenced by getPrefix().
Name & ndn::Name::appendVersion | ( | uint64_t | version | ) |
Append version using NDN naming conventions.
Definition at line 218 of file name.cpp.
References ndn::name::Component::fromVersion(), and ndn::Block::push_back().
Referenced by ndn::security::KeyChain::prepareUnsignedIdentityCertificate(), nfd::SegmentPublisher< ndn::Face >::publish(), ndn::security::KeyChain::selfSign(), ndn::mgmt::StatusDatasetContext::setPrefix(), and nfd::StatusServer::StatusServer().
Name & ndn::Name::appendVersion | ( | ) |
Append version using NDN naming conventions based on current UNIX timestamp in milliseconds.
Definition at line 225 of file name.cpp.
References ndn::time::system_clock::now(), and ndn::time::toUnixTimestamp().
Referenced by getPrefix().
Name & ndn::Name::appendSegment | ( | uint64_t | segmentNo | ) |
Append segment number (sequential) using NDN naming conventions.
Definition at line 232 of file name.cpp.
References ndn::name::Component::fromSegment(), and ndn::Block::push_back().
Referenced by nfd::rib::RibManager::enableLocalControlHeader(), ndn::util::SegmentFetcher::fetch(), getPrefix(), nfd::SegmentPublisher< ndn::Face >::publish(), and nfd::StatusServer::StatusServer().
Name & ndn::Name::appendSegmentOffset | ( | uint64_t | offset | ) |
Append segment byte offset using NDN naming conventions.
Definition at line 239 of file name.cpp.
References ndn::name::Component::fromSegmentOffset(), and ndn::Block::push_back().
Referenced by getPrefix().
Name & ndn::Name::appendTimestamp | ( | const time::system_clock::TimePoint & | timePoint = time::system_clock::now() | ) |
Append timestamp using NDN naming conventions.
Definition at line 246 of file name.cpp.
References ndn::name::Component::fromTimestamp(), and ndn::Block::push_back().
Referenced by getPrefix().
Name & ndn::Name::appendSequenceNumber | ( | uint64_t | seqNo | ) |
Append sequence number using NDN naming conventions.
Definition at line 253 of file name.cpp.
References ndn::name::Component::fromSequenceNumber(), and ndn::Block::push_back().
Referenced by ndn::mgmt::Dispatcher::addNotificationStream(), getPrefix(), nfd::NotificationStream< nfd::AppFace >::postNotification(), and ndn::util::NotificationStream< Notification >::postNotification().
Name & ndn::Name::appendImplicitSha256Digest | ( | const ConstBufferPtr & | digest | ) |
Append ImplicitSha256Digest.
Definition at line 260 of file name.cpp.
References ndn::name::Component::fromImplicitSha256Digest(), and ndn::Block::push_back().
Referenced by ndn::Data::getFullName(), and getPrefix().
Name & ndn::Name::appendImplicitSha256Digest | ( | const uint8_t * | digest, |
size_t | digestSize | ||
) |
Append ImplicitSha256Digest.
Definition at line 267 of file name.cpp.
References ndn::name::Component::fromImplicitSha256Digest(), and ndn::Block::push_back().
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:
Definition at line 293 of file name.cpp.
References append(), empty(), and getPrefix().
Referenced by nfd::cs::Cs::find(), and getPrefix().
bool ndn::Name::equals | ( | const Name & | name | ) | const |
Check if this name has the same component count and components as the given name.
name | The Name to check. |
Definition at line 306 of file name.cpp.
Referenced by getPrefix(), operator!=(), and operator==().
bool ndn::Name::isPrefixOf | ( | const Name & | name | ) | const |
Check if the N components of this name are the same as the first N components of the given name.
name | The Name to check. |
Definition at line 320 of file name.cpp.
Referenced by ndn::mgmt::Dispatcher::addTopPrefix(), ndn::security::conf::KeyLocatorChecker::checkRelation(), nfd::compare_pickInterest(), ndn::InterestFilter::doesMatch(), nfd::rib::RibManager::enableLocalControlHeader(), ndn::util::InMemoryStorage::erase(), ndn::util::InMemoryStorage::find(), nfd::rib::Rib::findDescendants(), nfd::rib::Rib::findDescendantsForNonInsertedName(), getPrefix(), nfd::StrategyChoice::install(), ndn::Interest::matchesData(), ndn::Interest::matchesName(), nfd::FaceManager::onFaceRequest(), nfd::FibManager::onFibRequest(), nfd::StrategyChoiceManager::onStrategyChoiceRequest(), ndn::security::KeyChain::prepareUnsignedIdentityCertificate(), ndn::Certificate::printCertificate(), nfd::rib::RemoteRegistrator::registerPrefix(), ndn::mgmt::Dispatcher::removeTopPrefix(), ndn::util::InMemoryStorage::selectChild(), ndn::mgmt::StatusDatasetContext::setPrefix(), nfd::rib::RemoteRegistrator::unregisterPrefix(), nfd::pit::Entry::violatesScope(), and nfd::Forwarder::~Forwarder().
|
inline |
Check if name is emtpy.
Definition at line 398 of file name.hpp.
Referenced by ndn::SecPublicInfoSqlite3::addKey(), nfd::cs::compareQueryWithData(), ndn::SecPublicInfoSqlite3::deleteCertificateInfo(), ndn::SecPublicInfoSqlite3::deletePublicKeyInfo(), ndn::SecPublicInfoSqlite3::doesPublicKeyExist(), ndn::CommandInterestGenerator::generate(), ndn::SecPublicInfoSqlite3::getAllCertificateNamesOfKey(), ndn::SecPublicInfoSqlite3::getDefaultCertificateNameForKey(), ndn::Data::getFullName(), ndn::SecPublicInfoSqlite3::getPublicKey(), ndn::SecPublicInfoSqlite3::getPublicKeyType(), getSuccessor(), nfd::fib::Entry::hasNextHops(), ndn::operator<<(), ndn::Face::registerPrefix(), ndn::util::InMemoryStorage::selectChild(), and ndn::Face::setInterestFilter().
|
inline |
Get the number of components.
Definition at line 408 of file name.hpp.
Referenced by ndn::mgmt::Dispatcher::addStatusDataset(), append(), at(), nfd::fw::AccessStrategy::beforeSatisfyInterest(), ndn::IdentityCertificate::certificateNameToPublicKeyName(), ndn::security::conf::KeyLocatorChecker::check(), ndn::ValidatorConfig::checkPolicy(), ndn::CommandInterestValidator::checkPolicy(), compare(), nfd::cs::compareQueryWithData(), ndn::InterestFilter::doesMatch(), nfd::rib::RibManager::enableLocalControlHeader(), equals(), nfd::StrategyChoice::erase(), ndn::RegexTopMatcher::expand(), nfd::cs::Cs::find(), nfd::NameTree::findLongestPrefixMatch(), nfd::rib::Rib::findParent(), get(), getSubName(), nfd::StrategyChoice::install(), isPrefixOf(), nfd::NameTree::lookup(), ndn::nfd::makeSigningInfoFromIdentityCertificate(), ndn::RegexTopMatcher::match(), ndn::security::conf::Filter::match(), ndn::Interest::matchesData(), ndn::Interest::matchesName(), ndn::security::conf::RelationNameFilter::matchName(), nfd::FaceManager::onFaceRequest(), nfd::FibManager::onFibRequest(), nfd::StrategyChoiceManager::onStrategyChoiceRequest(), ndn::security::KeyChain::prepareUnsignedIdentityCertificate(), nfd::rib::RibManager::registerWithNfd(), ndn::mgmt::Dispatcher::removeTopPrefix(), ndn::util::InMemoryStorage::selectChild(), nfd::rib::RibManager::setConfigFile(), ndn::IdentityCertificate::setName(), ndn::nfd::StrategyChoiceUnsetCommand::validateRequest(), and ndn::Validator::verifySignature().
|
inline |
Get the component at the given index.
i | The index of the component, starting from 0. |
Definition at line 419 of file name.hpp.
References size().
Referenced by ndn::SecPublicInfoSqlite3::addCertificate(), ndn::security::PibMemory::addCertificate(), ndn::security::PibSqlite3::addCertificate(), ndn::SecPublicInfoSqlite3::addKey(), ndn::IdentityCertificate::certificateNameToPublicKeyName(), ndn::ValidatorConfig::checkPolicy(), ndn::CommandInterestValidator::checkPolicy(), ndn::SecPublicInfoSqlite3::deletePublicKeyInfo(), ndn::SecPublicInfoSqlite3::doesPublicKeyExist(), nfd::rib::RibManager::enableLocalControlHeader(), ndn::util::SegmentFetcher::fetch(), ndn::SecPublicInfoSqlite3::getAllCertificateNamesOfKey(), ndn::SecPublicInfoSqlite3::getDefaultCertificateNameForKey(), ndn::SecPublicInfoSqlite3::getDefaultKeyNameForIdentity(), ndn::security::PibSqlite3::getDefaultKeyOfIdentity(), ndn::SecPublicInfoSqlite3::getPublicKey(), ndn::SecPublicInfoSqlite3::getPublicKeyType(), ndn::RegexRepeatMatcher::match(), ndn::RegexComponentSetMatcher::match(), ndn::RegexComponentMatcher::match(), ndn::RegexMatcher::match(), ndn::Interest::matchesData(), ndn::security::KeyChain::prepareUnsignedIdentityCertificate(), ndn::mgmt::Dispatcher::removeTopPrefix(), ndn::security::KeyChain::selfSign(), nfd::rib::RibManager::setConfigFile(), and ndn::IdentityCertificate::setName().
|
inline |
|
inline |
Get component at the specified index.
Unlike get() and operator[] methods, at() checks for out of bounds and will throw Name::Error when it happens
Name::Error | if index out of bounds |
Definition at line 442 of file name.hpp.
References ndn::Name::Error::Error(), and size().
Referenced by append(), compare(), equals(), getSubName(), isPrefixOf(), nfd::FaceManager::onFaceRequest(), nfd::FibManager::onFibRequest(), and nfd::StrategyChoiceManager::onStrategyChoiceRequest().
|
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.
other | The other Name to compare with. |
negative | this comes before other in canonical ordering |
zero | this equals other |
positive | this comes after other in canonical ordering |
Definition at line 474 of file name.hpp.
References npos.
Referenced by nfd::cs::compareDataWithData(), nfd::cs::compareQueryWithData(), operator<(), operator<=(), operator>(), and operator>=().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Begin iterator (const).
Definition at line 576 of file name.hpp.
Referenced by nfd::name_tree::computeHash(), nfd::name_tree::computeHashSet(), ndn::RegexTopMatcher::expand(), ndn::RegexTopMatcher::fromName(), ndn::SecRuleRelative::matchSignerName(), ndn::operator<<(), and rend().
|
inline |
End iterator (const).
Definition at line 587 of file name.hpp.
Referenced by nfd::name_tree::computeHash(), nfd::name_tree::computeHashSet(), ndn::RegexTopMatcher::fromName(), ndn::SecRuleRelative::matchSignerName(), ndn::operator<<(), and rbegin().
|
inline |
Reverse begin iterator (const).
Definition at line 596 of file name.hpp.
References end().
Referenced by wireEncode().
|
inline |
Reverse end iterator (const).
Definition at line 605 of file name.hpp.
References begin().
Referenced by wireEncode().
|
static |
indicates "until the end" in getSubName and compare
Definition at line 617 of file name.hpp.
Referenced by clear(), compare(), and getSubName().