DataChannel< DataType > Class Template Reference

#include <DataChannel.hxx>

Inheritance diagram for DataChannel< DataType >:
Inheritance graph
[legend]

List of all members.

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.

Detailed Description

template<typename DataType>
class DataChannel< DataType >

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.


Constructor & Destructor Documentation

template<typename DataType>
virtual DataChannel< DataType >::~DataChannel (  )  [inline, virtual]

Virtual destructor.


Member Function Documentation

template<typename DataType>
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 >.

template<typename 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().

template<typename DataType>
virtual void DataChannel< DataType >::output ( DataType &  data,
ByteArray bytes 
) [pure virtual]
template<typename DataType>
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().


The documentation for this class was generated from the following file:
Generated on Mon Oct 4 10:39:24 2010 for WfcamSrc by  doxygen 1.6.3