RSB  0.7.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rsb::converter::TypeNameConverterPredicate Class Reference

Objects of this class select Converter s by matching the query wire-schema or data-type against a stored string. More...

#include <TypeNameConverterPredicate.h>

Inheritance diagram for rsb::converter::TypeNameConverterPredicate:
Inheritance graph
Collaboration diagram for rsb::converter::TypeNameConverterPredicate:
Collaboration graph

Public Member Functions

 TypeNameConverterPredicate (const std::string &typeName)
 Construct a new TypeNameConverterPredicate that matches queries against the wanted type name typeName.
bool match (const std::string &key) const
 Return true if the Converter associated to this predicate should be selected for key.
- Public Member Functions inherited from rsb::converter::ConverterPredicate
virtual ~ConverterPredicate ()

Private Member Functions

std::string getClassName () const
void printContents (std::ostream &) const

Private Attributes

std::string typeName

Detailed Description

Objects of this class select Converter s by matching the query wire-schema or data-type against a stored string.

The functionality of this class is a subset of RegexConverterPredicate. Using this class you do not need to care to replace special characters for regular expressions and the implementation is probably much faster.

Author
jwienke

Definition at line 44 of file TypeNameConverterPredicate.h.

Constructor & Destructor Documentation

rsb::converter::TypeNameConverterPredicate::TypeNameConverterPredicate ( const std::string &  typeName)

Construct a new TypeNameConverterPredicate that matches queries against the wanted type name typeName.

Parameters
regexThe regular expression the new predicate should use.

Definition at line 35 of file TypeNameConverterPredicate.cpp.

Member Function Documentation

string rsb::converter::TypeNameConverterPredicate::getClassName ( ) const
private

Definition at line 44 of file TypeNameConverterPredicate.cpp.

bool rsb::converter::TypeNameConverterPredicate::match ( const std::string &  key) const
virtual

Return true if the Converter associated to this predicate should be selected for key.

Parameters
keyDepending on the context, either a wire-schema or a data-type for which a converter has to be selected.
Returns
true if the associated converter should be selected; false otherwise.

Implements rsb::converter::ConverterPredicate.

Definition at line 40 of file TypeNameConverterPredicate.cpp.

References typeName.

void rsb::converter::TypeNameConverterPredicate::printContents ( std::ostream &  stream) const
private

Definition at line 48 of file TypeNameConverterPredicate.cpp.

References typeName.

Member Data Documentation

std::string rsb::converter::TypeNameConverterPredicate::typeName
private

Definition at line 58 of file TypeNameConverterPredicate.h.

Referenced by match(), and printContents().


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