#include <Scheme.h>
Public Types | |
typedef EndpointID::singleton_info_t | singleton_info_t |
Copy of the EndpointID's type structure for determining if the endpoint is, is not, or may be a singleton. | |
Public Member Functions | |
virtual | ~Scheme () |
Destructor -- should be called only at shutdown time. | |
virtual bool | validate (const URI &uri, bool is_pattern=false)=0 |
Validate that the SSP within the given URI is legitimate for this scheme. | |
virtual bool | match (const EndpointIDPattern &pattern, const EndpointID &eid)=0 |
Match the pattern to the endpoint id in a scheme-specific manner. | |
virtual bool | append_service_tag (URI *uri, const char *tag) |
Append the given service tag to the uri in a scheme-specific manner. | |
virtual bool | append_service_wildcard (URI *uri) |
Append wildcard to the uri in a scheme-specific manner. | |
virtual bool | remove_service_tag (URI *uri) |
Reduce URI to node ID in a scheme specific manner. | |
virtual singleton_info_t | is_singleton (const URI &uri)=0 |
Check if the given URI is a singleton endpoint id. |
The class provides two pure virtual methods -- validate() and match() -- that are overridden by the various scheme implementations.
Definition at line 37 of file Scheme.h.
dtn::Scheme::~Scheme | ( | ) | [virtual] |
Append the given service tag to the uri in a scheme-specific manner.
By default, the scheme is not capable of this.
Reimplemented in dtn::DTNScheme, and dtn::TCAScheme.
Definition at line 67 of file Scheme.h.
Referenced by dtn::EndpointID::append_service_tag().
Append wildcard to the uri in a scheme-specific manner.
The default scheme is not capable of this.
Reimplemented in dtn::DTNScheme.
Definition at line 81 of file Scheme.h.
Referenced by dtn::EndpointID::append_service_wildcard().
virtual singleton_info_t dtn::Scheme::is_singleton | ( | const URI & | uri | ) | [pure virtual] |
Check if the given URI is a singleton endpoint id.
Implemented in dtn::DTNScheme, dtn::SessionScheme, dtn::StringScheme, dtn::TCAScheme, and dtn::WildcardScheme.
Referenced by dtn::EndpointID::is_singleton().
virtual bool dtn::Scheme::match | ( | const EndpointIDPattern & | pattern, | |
const EndpointID & | eid | |||
) | [pure virtual] |
Match the pattern to the endpoint id in a scheme-specific manner.
Implemented in dtn::DTNScheme, dtn::SessionScheme, dtn::StringScheme, dtn::TCAScheme, and dtn::WildcardScheme.
Referenced by dtn::EndpointIDPattern::match().
Reduce URI to node ID in a scheme specific manner.
The default scheme is not capable of this.
Reimplemented in dtn::DTNScheme.
Definition at line 94 of file Scheme.h.
Referenced by dtn::EndpointID::remove_service_tag().
Validate that the SSP within the given URI is legitimate for this scheme.
If the 'is_pattern' paraemeter is true, then the ssp is being validated as an EndpointIDPattern.
Implemented in dtn::DTNScheme, dtn::SessionScheme, dtn::StringScheme, dtn::TCAScheme, and dtn::WildcardScheme.
Referenced by dtn::EndpointID::validate().