Project

General

Profile

Actions

Feature #3450

closed

Name.Component API extension: is* methods

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

Status:
Closed
Priority:
Normal
Assignee:
-
Start date:
Due date:
% Done:

100%

Estimated time:

Description

The is* methods are needed in many cases in order to avoid awkward checks that rely on exceptions:

  /**
   * @brief Check if the component is nonNegativeInteger
   * @see http://named-data.net/doc/ndn-tlv/tlv.html#non-negative-integer-encoding
   */
  bool
  isNumber() const;

  /**
   * @brief Check if the component is NameComponentWithMarker per NDN naming conventions
   * @see http://named-data.net/doc/tech-memos/naming-conventions.pdf
   */
  bool
  isNumberWithMarker(uint8_t marker) const;

  /**
   * @brief Check if the component is version per NDN naming conventions
   * @see http://named-data.net/doc/tech-memos/naming-conventions.pdf
   */
  bool
  isVersion() const;

  /**
   * @brief Check if the component is segment number per NDN naming conventions
   * @see http://named-data.net/doc/tech-memos/naming-conventions.pdf
   */
  bool
  isSegment() const;

  /**
   * @brief Check if the component is segment offset per NDN naming conventions
   * @see http://named-data.net/doc/tech-memos/naming-conventions.pdf
   */
  bool
  isSegmentOffset() const;

  /**
   * @brief Check if the component is timestamp per NDN naming conventions
   * @see http://named-data.net/doc/tech-memos/naming-conventions.pdf
   */
  bool
  isTimestamp() const;

  /**
   * @brief Check if the component is sequence number per NDN naming conventions
   * @see http://named-data.net/doc/tech-memos/naming-conventions.pdf
   */
  bool
  isSequenceNumber() const;

  /**
   * @brief Check if the component is GenericComponent
   */
  bool
  isGeneric() const;

  /**
   * @brief Check if the component is ImplicitSha256DigestComponent
   */
  bool
  isImplicitSha256Digest() const;
Actions #1

Updated by Alex Afanasyev about 8 years ago

  • Subject changed from Name.Component API extension to Name.Component API extension: is* methods
  • Description updated (diff)
Actions #2

Updated by Alex Afanasyev about 8 years ago

  • Description updated (diff)
Actions #3

Updated by Alex Afanasyev about 8 years ago

  • Description updated (diff)
Actions #4

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 #5

Updated by Anonymous about 8 years ago

  • Due date deleted (02/29/2016)
  • Status changed from New to In Progress
  • % Done changed from 0 to 80

In all libraries added Name.Component.isSegment, isSegmentOffset, isVersion, isTimestamp and isSequenceNumber.

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 isGeneric and isImplicitSha256Digest.

Actions

Also available in: Atom PDF