SqlConverterFactory Class Reference

Factory class for creating Sql*Converter*s. More...

List of all members.

Public Member Functions

bool CanConvert (TDWType in_sourceType, TDWType in_targetType)
 Determines if a conversion can be done.
virtual bool CanConvertCustomCTypeToSql (simba_int16 in_srcCType, TDWType in_targetSqlType)
 Determines if a conversion can be done involving a custom C type.
virtual bool CanConvertSqlToCustomCType (TDWType in_srcSqlType, simba_int16 in_targetCType)
 Determines if a conversion can be done involving a custom C type.
AutoPtr< ICToSqlConverterCreateNewCToSqlConverter (const SqlCData &in_source, const SqlData &in_target, IWarningListener *in_warningListener)
 Creates a new CToSqlConverter.
AutoPtr< ISqlToCConverterCreateNewSqlToCConverter (const SqlData &in_source, const SqlCData &in_target, IWarningListener *in_warningListener)
 Creates a new SqlToCConverter.
AutoPtr< ISqlToSqlConverterCreateNewSqlToSqlConverter (const SqlData &in_source, const SqlData &in_target, IWarningListener *in_warningListener)
 Creates a new SqlToSqlConverter.
 SqlConverterFactory ()
 Default constructor.
virtual ~SqlConverterFactory ()
 Destructor.

Protected Member Functions

virtual AutoPtr< ICToSqlConverterCreateNewCustomCToSqlConverter (const SqlCData &in_source, const SqlData &in_target, IWarningListener *in_warningListener)
 Creates a new CToSqlConverter.
virtual AutoPtr< ISqlToCConverterCreateNewCustomSqlToCConverter (const SqlData &in_source, const SqlCData &in_target, IWarningListener *in_warningListener)
 Creates a new SqlToCConverter.
virtual AutoPtr
< ISqlToSqlConverter
CreateNewCustomSqlToSqlConverter (const SqlData &in_source, const SqlData &in_target, IWarningListener *in_warningListener)
 Creates a new SqlToSqlConverter.

Detailed Description

Factory class for creating Sql*Converter*s.

This factory class offers functions for creating converters to handle the following conversion directions:

Access instances via IConnection::GetSqlConverterFactory.


Constructor & Destructor Documentation

Default constructor.

virtual ~SqlConverterFactory (  )  [virtual]

Destructor.


Member Function Documentation

bool CanConvert ( TDWType  in_sourceType,
TDWType  in_targetType 
) [inline]

Determines if a conversion can be done.

This function only looks at the converter tables.

Parameters:
in_sourceType The source type from which to convert.
in_targetType The target type to which to convert.
Returns:
Whether or not the conversion is supported.
virtual bool CanConvertCustomCTypeToSql ( simba_int16  in_srcCType,
TDWType  in_targetSqlType 
) [virtual]

Determines if a conversion can be done involving a custom C type.

Default implementation returns false because there are no default custom types.

Parameters:
in_srcCType The soruce custom C type ID from which to convert.
in_targetType The target TDW SQL type to convert to.
Returns:
Whether or not the conversion is supported.
virtual bool CanConvertSqlToCustomCType ( TDWType  in_srcSqlType,
simba_int16  in_targetCType 
) [virtual]

Determines if a conversion can be done involving a custom C type.

Default implementation returns false because there are no default custom types.

Parameters:
in_srcSqlType The source TDW SQL type from which to convert.
in_targetCType The target custom C type ID to convert to.
Returns:
Whether or not the conversion is supported.
AutoPtr<ICToSqlConverter> CreateNewCToSqlConverter ( const SqlCData in_source,
const SqlData in_target,
IWarningListener in_warningListener 
)

Creates a new CToSqlConverter.

Delegates to CreateNewCustomSqlToSqlConverter() first. If CreateNewCustomSqlToSqlConverter() returns a non-NULL converter, it uses that one.

This function is intentionally non-virtual. DO NOT override this function. See CreateNewCustomSqlToSqlConverter().

Parameters:
in_source The source SqlCData from which to convert.
in_target The target SqlData to which to convert.
in_warningListener The IWarningListener to use for posting warnings. (NOT OWN)
Returns:
A new ICToSqlConverter for the given source and target types. (OWN)
virtual AutoPtr<ICToSqlConverter> CreateNewCustomCToSqlConverter ( const SqlCData in_source,
const SqlData in_target,
IWarningListener in_warningListener 
) [protected, virtual]

Creates a new CToSqlConverter.

This default implementation returns NULL always.

Override this function if you wish to support conversion for the given types.

Parameters:
in_source The source SqlCData from which to convert.
in_target The target SqlData to which to convert.
in_warningListener The IWarningListener to use for posting warnings. (NOT OWN)
Returns:
A new ICToSqlConverter for the given source and target types. (OWN)
virtual AutoPtr<ISqlToCConverter> CreateNewCustomSqlToCConverter ( const SqlData in_source,
const SqlCData in_target,
IWarningListener in_warningListener 
) [protected, virtual]

Creates a new SqlToCConverter.

This default implementation returns NULL always.

Override this function if you wish to support conversion for the given types.

Parameters:
in_source The source SqlData from which to convert.
in_target The target SqlCData to which to convert.
in_warningListener The IWarningListener to use for posting warnings.
Returns:
A new ISqlToCConverter for the given source and target types. (OWN)
virtual AutoPtr<ISqlToSqlConverter> CreateNewCustomSqlToSqlConverter ( const SqlData in_source,
const SqlData in_target,
IWarningListener in_warningListener 
) [protected, virtual]

Creates a new SqlToSqlConverter.

This default implementation returns NULL always.

Override this function if you wish to support conversion for the given types.

Parameters:
in_source The source SqlData from which to convert.
in_target The target SqlData to which to convert.
in_warningListener The IWarningListener to use for posting warnings. (NOT OWN)
Returns:
A new ISqlToSqlConverter for the given source and target types. (OWN)
AutoPtr<ISqlToCConverter> CreateNewSqlToCConverter ( const SqlData in_source,
const SqlCData in_target,
IWarningListener in_warningListener 
)

Creates a new SqlToCConverter.

Delegates to CreateNewCustomSqlToSqlConverter() first. If CreateNewCustomSqlToSqlConverter() returns a non-NULL converter, it uses that one.

This function is intentionally non-virtual. DO NOT override this function. See CreateNewCustomSqlToSqlConverter().

Parameters:
in_source The source SqlData from which to convert.
in_target The target SqlCData to which to convert.
in_warningListener The IWarningListener to use for posting warnings. (NOT OWN)
Returns:
A new ISqlToCConverter for the given source and target types. (OWN)
AutoPtr<ISqlToSqlConverter> CreateNewSqlToSqlConverter ( const SqlData in_source,
const SqlData in_target,
IWarningListener in_warningListener 
)

Creates a new SqlToSqlConverter.

Delegates to CreateNewCustomSqlToSqlConverter() first. If CreateNewCustomSqlToSqlConverter() returns a non-NULL converter, it uses that one.

This function is intentionally non-virtual. DO NOT override this function. See CreateNewCustomSqlToSqlConverter().

Parameters:
in_source The source SqlData from which to convert.
in_target The target SqlData to which to convert.
in_warningListener The IWarningListener to use for posting warnings. (NOT OWN)
Returns:
A new ISqlToSqlConverter for the given source and target types. (OWN)

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

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