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

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

#include <RegexConverterPredicate.h>

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

Public Member Functions

 RegexConverterPredicate (const std::string &regex)
 Construct a new RegexConverterPredicate that matches queries against the regular expression regex.
 RegexConverterPredicate (const boost::regex &regex)
 Construct a new RegexConverterPredicate that matches queries against the regular expression regex.
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

boost::regex regex

Detailed Description

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

Author
jmoringe

Definition at line 43 of file RegexConverterPredicate.h.

Constructor & Destructor Documentation

rsb::converter::RegexConverterPredicate::RegexConverterPredicate ( const std::string &  regex)

Construct a new RegexConverterPredicate that matches queries against the regular expression regex.

Parameters
regexThe regular expression the new predicate should use.

Definition at line 35 of file RegexConverterPredicate.cpp.

rsb::converter::RegexConverterPredicate::RegexConverterPredicate ( const boost::regex &  regex)

Construct a new RegexConverterPredicate that matches queries against the regular expression regex.

Parameters
regexThe regular expression the new predicate should use.

Definition at line 39 of file RegexConverterPredicate.cpp.

Member Function Documentation

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

Definition at line 47 of file RegexConverterPredicate.cpp.

bool rsb::converter::RegexConverterPredicate::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 43 of file RegexConverterPredicate.cpp.

References regex.

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

Definition at line 51 of file RegexConverterPredicate.cpp.

References regex.

Member Data Documentation

boost::regex rsb::converter::RegexConverterPredicate::regex
private

Definition at line 65 of file RegexConverterPredicate.h.

Referenced by match(), and printContents().


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