00001
00002
#ifndef CONVERTER_BOX_H
00003
#define CONVERTER_BOX_H
00004
00005
#include <NMSTL/io>
00006
00007
#include "TupleDescription.h"
00008
#include "Stream.h"
00009
#include "Registry.h"
00010
00011 BOREALIS_NAMESPACE_BEGIN;
00012
00060
00061 class ConverterBox {
00062
protected:
00065
ConverterBox(TupleDescription schema);
00066
00067
public:
00069
virtual ~ConverterBox();
00070
00074 TupleDescription
getSchema()
const {
return _schema; }
00075
00085
virtual unsigned int handleData(constbuf input)
00086
throw (
AuroraException) = 0;
00087
00090
void setStream(ptr<Stream> stream);
00091
00094 ptr<Stream>
getStream() {
return _stream; }
00095
00096
private:
00097 TupleDescription _schema;
00098 ptr<Stream> _stream;
00099 };
00100
00101 #define AURORA_DECLARE_CONVERTER_BOX(ClassName) AURORA_DECLARE_REG_CLASS(ConverterBox, ClassName)
00102 #define AURORA_DEFINE_CONVERTER_BOX(ClassName) AURORA_DEFINE_REG_CLASS(ConverterBox, ClassName)
00103
00104 BOREALIS_NAMESPACE_END;
00105
00106
#endif