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

SimpleConverterBox Class Reference

#include <SimpleConverterBox.h>

Inherits ConverterBox.

Inherited by RegexConverterBox.

List of all members.


Detailed Description

Converts delimited or fixed-length records to tuples on a single stream.


Protected Member Functions

 SimpleConverterBox (TupleDescription schema, char delim)
 Create a converter box where each input record is terminated with a specific character.
 SimpleConverterBox (TupleDescription schema, unsigned int length)
 Create a converter box where each input is of a fixed size.
 ~SimpleConverterBox ()
 Destructor.
virtual unsigned int handleData (constbuf input) throw (AuroraException)
 Handles data by converting input records and enqueueing resultant data.
virtual bool convertTuple (const char *data, unsigned int length, char *out)=0 throw (AuroraException)
 Convert an input record.


Constructor & Destructor Documentation

SimpleConverterBox::SimpleConverterBox TupleDescription  schema,
char  delim
[protected]
 

Create a converter box where each input record is terminated with a specific character.

Parameters:
schema the schema generated by the converter box
delim the input delimiter (e.g., '
')

SimpleConverterBox::SimpleConverterBox TupleDescription  schema,
unsigned int  length
[protected]
 

Create a converter box where each input is of a fixed size.

Parameters:
schema the schema generated by the converter box
length the length of each input tuple

SimpleConverterBox::~SimpleConverterBox  )  [protected]
 

Destructor.


Member Function Documentation

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

Convert an input record.

Must be implemented in the subclass.

Parameters:
data the beginning of an input record
length the length of the input record
out a pointer to a buffer in which to store the converted data
Returns:
true if the record was successfully converted

Implemented in RegexConverterBox.

unsigned int SimpleConverterBox::handleData constbuf  input  )  throw (AuroraException) [protected, virtual]
 

Handles data by converting input records and enqueueing resultant data.

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

Implements ConverterBox.


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