Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

RegexConverterBox Class Reference

#include <RegexConverterBox.h>

Inherits SimpleConverterBox.

Inherited by StockQuoteConverterBox.

List of all members.


Detailed Description

Converts records matching a regular expression to tuples on a single stream.


Public Member Functions

 ~RegexConverterBox ()
 Destructor.
virtual bool convertTuple (const char *data, unsigned int length, char *out) throw (AuroraException)
 Handles data by matching input data against the regex and calling convertTupleFromRegex.
virtual bool convertTupleFromRegex (Subexpr match, const vector< Subexpr > &subexprs, char *out)=0 throw (AuroraException)
 Convert an input record that matches the regex provided in the constructor.

Protected Member Functions

 RegexConverterBox (TupleDescription schema, char delim, string regex) throw ( AuroraException )
 Creates a regex converter box.


Constructor & Destructor Documentation

BOREALIS_NAMESPACE_BEGIN RegexConverterBox::RegexConverterBox TupleDescription  schema,
char  delim,
string  regex
throw ( AuroraException ) [protected]
 

Creates a regex converter box.

Parameters:
schema the schema of tuples generated by the box
delim the terminator of each input record
regex the regex which each input record will match; subexpressions in the regex will be provided to the convertTupleFromRegex() method

RegexConverterBox::~RegexConverterBox  ) 
 

Destructor.


Member Function Documentation

bool RegexConverterBox::convertTuple const char *  data,
unsigned int  length,
char *  out
throw (AuroraException) [virtual]
 

Handles data by matching input data against the regex and calling convertTupleFromRegex.

Should not be overridden by subclasses (if you would need to override this, subclass SimpleConverterBox directly).

Implements SimpleConverterBox.

virtual bool RegexConverterBox::convertTupleFromRegex Subexpr  match,
const vector< Subexpr > &  subexprs,
char *  out
throw (AuroraException) [pure virtual]
 

Convert an input record that matches the regex provided in the constructor.

Must be implemented in the subclass.

Parameters:
match the entire input record matched by the regex
subexprs the vector of subexpressions matched by the regex
out a buffer in which to store the converted tuple
Returns:
true if the record was successfully converted

Implemented in StockQuoteConverterBox.


The documentation for this class was generated from the following files:
Generated on Fri Nov 12 15:15:24 2004 for Borealis by doxygen 1.3.8