DSISqlToCBulkConverterFactory< BuilderFuncGenerator > Class Template Reference

Factory class for creating SQL -> C bulk converters. More...

Inherits Simba::DSI::ISqlToCBulkConverterFactory.

List of all members.

Public Member Functions

virtual AutoPtr
< ISqlToCBulkConverter
Create (const SqlTypeMetadata &in_source, const SqlCTypeMetadata &in_target, IWarningListener &in_warningListener) const
 Creates a new SQL -> C bulk converter.
 DSISqlToCBulkConverterFactory (Simba::DSI::IConnection &in_connection)
 Constructor.

Protected Member Functions

DSISqlToCBulkConverterFactoryoperator= (const DSISqlToCBulkConverterFactory &in_other)
 Disabled assignment operator.

Protected Attributes

Simba::DSI::IConnectionm_connection
SqlToCBulkBuilderFunction m_converterTable [TDW_SQL_MAX+1][TDW_SQL_MAX+1]

Detailed Description

template<template< TDWType SqlType, TDWType SqlCType > class BuilderFuncGenerator>
class Simba::DSI::DSISqlToCBulkConverterFactory< BuilderFuncGenerator >

Factory class for creating SQL -> C bulk converters.

Template Parameters:
BuilderFuncGenerator This template parameter is used to initialize the converter builder table. Internally, each cell of m_converterTable is filled by (conceptually) doing the following:

m_converterTable[SQL_TYPE][C_TYPE] = BuilderFuncGenerator<SQL_TYPE, C_TYPE>::GetBuilder(Conn);

Where Conn is the factory's parent connection (Simba::DSI::IConnection&).

Create() then simply looks in the given cell of the table, and if it is non-NULL, calls that function. This means that if a conversion from SQL_TYPE to C_TYPE is not supported, then BuilderFuncGenerator<SQL_TYPE, C_TYPE>::GetBuilder() should return NULL.

Additionally, if a conversion from SQL_TYPE to C_TYPE is sometimes supported (based on other facets of the metadata), then the function stored in the corresponding cell of the table may return NULL for some values of in_connection, in_source, and in_target.


Constructor & Destructor Documentation

DSISqlToCBulkConverterFactory ( Simba::DSI::IConnection in_connection  )  [inline]

Constructor.

Parameters:
in_connection The parent connection.

Member Function Documentation

AutoPtr< ISqlToCBulkConverter > Create ( const SqlTypeMetadata in_source,
const SqlCTypeMetadata in_target,
IWarningListener in_warningListener 
) const [inline, virtual]

Creates a new SQL -> C bulk converter.

Parameters:
in_source The source SqlTypeMetadata from which to convert.
in_target The target SqlCTypeMetadata to which to convert.
in_warningListener The IWarningListener to use for posting warnings.
Returns:
A new ISqlToCBulkConverter for the given source and target types, or a NULL AutoPtr if the conversion is not supported. (OWN)
DSISqlToCBulkConverterFactory& operator= ( const DSISqlToCBulkConverterFactory< BuilderFuncGenerator > &  in_other  )  [protected]

Disabled assignment operator.

Parameters:
in_other The object to assign to the current object.
Returns:
A reference to the current object.

Member Data Documentation

SqlToCBulkBuilderFunction m_converterTable[TDW_SQL_MAX+1][TDW_SQL_MAX+1] [protected]

The documentation for this class was generated from the following files:

Generated on Wed May 17 14:21:15 2017 for SimbaEngine 10.1.3.1011 by simba