Actions
Task #2088
closedname::Component::is(Segment|Timestamp|SequenceNumber|...)
Start date:
10/24/2014
Due date:
% Done:
100%
Estimated time:
Description
Right now, there is no reliable way to check if the name component follows the specific naming convention. The only way is to try to convert and catch the exception.
The following should be added to name::Component
API:
partial name::Component {
/**
* @brief Check if the component is nonNegativeInteger per NDN naming conventions
*/
bool
isNumber() const;
/**
* @brief Check if the component is NameComponentWithMarker per NDN naming conventions
*/
bool
isNumberWithMarker(uint8_t marker) const;
/**
* @brief Check if the component is version per NDN naming conventions
*/
bool
isVersion() const;
/**
* @brief Check if the component is segment number per NDN naming conventions
*/
bool
isSegment() const;
/**
* @brief Check if the component is segment offset per NDN naming conventions
*/
bool
isSegmentOffset() const;
/**
* @brief Check if the component is timestamp per NDN naming conventions
*/
bool
isTimestamp() const;
/**
* @brief Check if the component is sequence number per NDN naming conventions
*/
bool
isSequenceNumber() const;
/**
* @brief Check if the component is ImplicitSha256DigestComponent
*/
bool
isImplicitSha256Digest() const;
}
Updated by Junxiao Shi about 10 years ago
- Subject changed from API needs to be updated to include is(Segment|Timestamp|SequenceNumber|...) to name::Component::is(Segment|Timestamp|SequenceNumber|...)
- Status changed from Code review to Closed
Actions