Project

General

Profile

Feature #3451

Updated by Alex Afanasyev almost 9 years ago

Currently, Name.Component has only two versions of `from*` method: `fromNumber` and `fromNumberWithMarker`.    All other helpers should be implemented as well: 

 ```cpp ``` 
   /** 
    * @brief Create version component using NDN naming conventions 
    * 
    * @see http://named-data.net/doc/tech-memos/naming-conventions.pdf 
    */ 
   static Component 
   fromVersion(uint64_t version); 

   /** 
    * @brief Create segment number component using NDN naming conventions 
    * 
    * @see http://named-data.net/doc/tech-memos/naming-conventions.pdf 
    */ 
   static Component 
   fromSegment(uint64_t segmentNo); 

   /** 
    * @brief Create segment offset component using NDN naming conventions 
    * 
    * @see http://named-data.net/doc/tech-memos/naming-conventions.pdf 
    */ 
   static Component 
   fromSegmentOffset(uint64_t offset); 

   /** 
    * @brief Create sequence number component using NDN naming conventions 
    * 
    * @see http://named-data.net/doc/tech-memos/naming-conventions.pdf 
    */ 
   static Component 
   fromTimestamp(const time::system_clock::TimePoint& timePoint); 

   /** 
    * @brief Create sequence number component using NDN naming conventions 
    * 
    * @see http://named-data.net/doc/tech-memos/naming-conventions.pdf 
    */ 
   static Component 
   fromSequenceNumber(uint64_t seqNo); 

   /** 
    * @brief Create ImplicitSha256DigestComponent component 
    */ 
   static Component 
   fromImplicitSha256Digest(const ConstBufferPtr& digest); 

   /** 
    * @brief Create ImplicitSha256DigestComponent component 
    */ 
   static Component 
   fromImplicitSha256Digest(const uint8_t* digest, size_t digestSize); 

 ```

Back