#include <DataChannel.hxx>
Public Member Functions | |
virtual void | input (TableData< DataType > &data, int colNo, ByteArray &bytes)=0 |
virtual void | output (TableData< DataType > &data, int colNo, ByteArray &bytes)=0 |
virtual void | output (DataType &data, ByteArray &bytes)=0 |
virtual int | getWordSize ()=0 |
virtual | ~DataChannel () |
Virtual destructor. |
Abstract base class for channeling data to and from an array of bytes. The concrete sub-classes select the data types of word sizes approriate to a particular SQL data type. I have done it this way because the appropriate data type is selected at run time (not at compile or coding up time) and so I have made use of the polymorphism feature of OO. Although at first, this seems a bit esoteric, it is quite an elegant way of doing it and I can't think of a another way.
virtual DataChannel< DataType >::~DataChannel | ( | ) | [inline, virtual] |
Virtual destructor.
virtual int DataChannel< DataType >::getWordSize | ( | ) | [pure virtual] |
Abtract definition to return the number of bytes for the SQL data type that is implemented in the concrete subclass
Implemented in DataChannel_SQL_tinyint< DataType >, DataChannel_SQL_smallint< DataType >, DataChannel_SQL_int< DataType >, DataChannel_SQL_bigint< DataType >, DataChannel_SQL_real< DataType >, and DataChannel_SQL_float< DataType >.
virtual void DataChannel< DataType >::input | ( | TableData< DataType > & | data, | |
int | colNo, | |||
ByteArray & | bytes | |||
) | [pure virtual] |
Abstract definition of function to extract data from the input byte array and channel them into the given column of the data table.
Implemented in DataChannel_SQL_tinyint< DataType >, DataChannel_SQL_smallint< DataType >, DataChannel_SQL_int< DataType >, DataChannel_SQL_bigint< DataType >, DataChannel_SQL_real< DataType >, and DataChannel_SQL_float< DataType >.
Referenced by CameoSet::readCameoData().
virtual void DataChannel< DataType >::output | ( | DataType & | data, | |
ByteArray & | bytes | |||
) | [pure virtual] |
virtual void DataChannel< DataType >::output | ( | TableData< DataType > & | data, | |
int | colNo, | |||
ByteArray & | bytes | |||
) | [pure virtual] |
Abstract definition of function to extract data from the given column column in the data table and channel it into the output byte array.
Implemented in DataChannel_SQL_tinyint< DataType >, DataChannel_SQL_smallint< DataType >, DataChannel_SQL_int< DataType >, DataChannel_SQL_bigint< DataType >, DataChannel_SQL_real< DataType >, and DataChannel_SQL_float< DataType >.
Referenced by SourceTable::writeAsBinary().