dtn::Scheme Class Reference

#include <Scheme.h>

Inheritance diagram for dtn::Scheme:

dtn::DTNScheme 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 32 of file Scheme.h.

Public Member Functions

virtual ~Scheme ()
 Destructor -- should be called only at shutdown time.
virtual bool validate (const std::string &ssp, bool is_pattern=false)=0
 Validate that the given ssp 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 (std::string *ssp, const char *tag)
 Append the given service tag to the ssp in a scheme-specific manner.


Constructor & Destructor Documentation

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

Destructor -- should be called only at shutdown time.

Definition at line 26 of file Scheme.cc.


Member Function Documentation

virtual bool dtn::Scheme::validate ( const std::string &  ssp,
bool  is_pattern = false 
) [pure virtual]

Validate that the given ssp 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::StringScheme, dtn::TCAScheme, and dtn::WildcardScheme.

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

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::StringScheme, dtn::TCAScheme, and dtn::WildcardScheme.

Referenced by dtn::EndpointIDPattern::match().

virtual bool dtn::Scheme::append_service_tag ( std::string *  ssp,
const char *  tag 
) [inline, virtual]

Append the given service tag to the ssp 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 63 of file Scheme.h.

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


The documentation for this class was generated from the following files:
Generated on Thu Jun 7 12:54:33 2007 for DTN Reference Implementation by  doxygen 1.5.1