Project

General

Profile

Actions

Feature #3451

closed

Name.Component API extension: from* methods

Added by Alex Afanasyev about 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Start date:
Due date:
03/31/2016
% Done:

100%

Estimated time:

Description

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

  /**
   * @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);

Actions #1

Updated by Alex Afanasyev about 8 years ago

  • Description updated (diff)
Actions #2

Updated by Alex Afanasyev about 8 years ago

  • Tracker changed from Task to Feature
Actions #3

Updated by Anonymous about 8 years ago

  • Due date set to 02/29/2016
  • Assignee set to Anonymous

The due date is for all except ImplicitSha256Digest methods which we'll address after discussions at the NDN Retreat.

Actions #4

Updated by Anonymous about 8 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 30

Implemented in jNDN. Working on the other CCL libraries.

Actions #5

Updated by Anonymous about 8 years ago

  • Due date changed from 02/29/2016 to 03/31/2016
  • % Done changed from 30 to 80

In all libraries, added Name.Component.fromSegment, fromSegmentOffset, fromVersion, fromTimestamp and fromSequenceNumber.

Actions #6

Updated by Anonymous almost 8 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 80 to 100

In all libraries, added fromImplicitSha256Digest.

Actions

Also available in: Atom PDF