#include <Scheme.h>
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. |
dtn::Scheme::~Scheme | ( | ) | [virtual] |
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.
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.
Reimplemented in dtn::DTNScheme, and dtn::TCAScheme.
Definition at line 63 of file Scheme.h.
Referenced by dtn::EndpointID::append_service_tag().