NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::name::detail::GenericNameComponentType Class Referencefinal

Rules for GenericNameComponent. More...

#include <name-component-types.hpp>

Inheritance diagram for ndn::name::detail::GenericNameComponentType:
Collaboration diagram for ndn::name::detail::GenericNameComponentType:

Public Member Functions

void writeUri (std::ostream &os, const Component &comp) const final
 Write URI representation of comp to os. More...
- Public Member Functions inherited from ndn::name::detail::ComponentType
virtual ~ComponentType ()=default
virtual void check (const Component &comp) const
 Throw Component::Error if comp is invalid. More...
virtual std::pair< bool, ComponentgetSuccessor (const Component &comp) const
 Calculate the successor of comp. More...
virtual const std::vector< uint8_t > & getMinValue () const
 Return the minimum allowable TLV-VALUE of this component type. More...
virtual const char * getAltUriPrefix () const
 Return the prefix of the alternate URI representation. More...
virtual Component parseAltUriValue (const std::string &) const
 Parse component from alternate URI representation. More...

Additional Inherited Members

- Public Types inherited from ndn::name::detail::ComponentType
using Error = Component::Error
- Protected Member Functions inherited from ndn::name::detail::ComponentType
std::pair< bool, BlockgetSuccessorImpl (const Component &comp) const
 Calculate the successor of comp, extending TLV-LENGTH if value overflows. More...
void writeUriEscapedValue (std::ostream &os, const Component &comp) const
 Write TLV-VALUE as <escaped-value> of NDN URI syntax. More...

Detailed Description

Rules for GenericNameComponent.

GenericNameComponent has an alternate URI representation that omits the <type-number> prefix. This must be special-cased in the caller, and is not handled by this class.

Definition at line 159 of file name-component-types.hpp.

Member Function Documentation

◆ writeUri()

void ndn::name::detail::GenericNameComponentType::writeUri ( std::ostream &  os,
const Component comp 
) const

Write URI representation of comp to os.

This base class implementation encodes the component in the plain <type-number>=<escaped-value> syntax.

Reimplemented from ndn::name::detail::ComponentType.

Definition at line 163 of file name-component-types.hpp.

References ndn::name::detail::ComponentType::writeUriEscapedValue().

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