dtn::Scheme Class Reference

#include <Scheme.h>

Inheritance diagram for dtn::Scheme:

dtn::DTNScheme dtn::SessionScheme dtn::StringScheme dtn::TCAScheme dtn::WildcardScheme

List of all members.


Detailed Description

The base class for various endpoint id schemes.

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.


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.

Member Typedef Documentation

Copy of the EndpointID's type structure for determining if the endpoint is, is not, or may be a singleton.

Definition at line 104 of file Scheme.h.


Constructor & Destructor Documentation

dtn::Scheme::~Scheme (  )  [virtual]

Destructor -- should be called only at shutdown time.

Definition at line 29 of file Scheme.cc.


Member Function Documentation

virtual bool dtn::Scheme::validate ( const URI uri,
bool  is_pattern = false 
) [pure virtual]

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.

Returns:
true if valid

Implemented in dtn::DTNScheme, dtn::SessionScheme, dtn::StringScheme, dtn::TCAScheme, and dtn::WildcardScheme.

Referenced by dtn::EndpointID::validate().

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().

virtual bool dtn::Scheme::append_service_tag ( URI uri,
const char *  tag 
) [inline, virtual]

Append the given service tag to the uri in a scheme-specific manner.

By default, the scheme is not capable of this.

Returns:
true if this scheme is capable of service tags and the tag is a legal one, false otherwise.

Reimplemented in dtn::DTNScheme, and dtn::TCAScheme.

Definition at line 67 of file Scheme.h.

Referenced by dtn::EndpointID::append_service_tag().

virtual bool dtn::Scheme::append_service_wildcard ( URI uri  )  [inline, virtual]

Append wildcard to the uri in a scheme-specific manner.

The default scheme is not capable of this.

Returns:
true if this scheme is capable of wildcards and the wildcard is successfully appended, else false.

Reimplemented in dtn::DTNScheme.

Definition at line 81 of file Scheme.h.

Referenced by dtn::EndpointID::append_service_wildcard().

virtual bool dtn::Scheme::remove_service_tag ( URI uri  )  [inline, virtual]

Reduce URI to node ID in a scheme specific manner.

The default scheme is not capable of this.

Returns:
true if this scheme is capable of this reduction and the reduction is successful, else false.

Reimplemented in dtn::DTNScheme.

Definition at line 94 of file Scheme.h.

Referenced by dtn::EndpointID::remove_service_tag().

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().


The documentation for this class was generated from the following files:

Generated on Mon Jul 21 14:12:21 2008 for DTN Reference Implementation by  doxygen 1.5.6