TypeConversionInfo Class Reference

List of all members.

Public Member Functions

bool CanConvertCToSql (simba_int16 in_srcCType, simba_int16 in_targetSqlType)
bool CanConvertSqlToC (simba_int16 in_srcSqlType, simba_int16 in_targetCType)
TDWType GetCDefaultType (TDWType in_srcTDWType)
simba_wstring GetNameStringForTypeMetadata (const TypeMetadata *in_typeMetadata)
bool IsSqlType (TDWType in_tdwType)
bool IsSupportedCType (simba_int16 in_sqlCType)
bool IsSupportedSQLType (simba_int16 in_SQLDataType)
 TypeConversionInfo (SqlCDataTypeUtilities *in_cTypeUtils, SqlDataTypeUtilities *in_sqlTypeUtils, SqlConverterFactory *in_converterFactory)
 Constructor.

Static Public Member Functions

static TypeConversionInfoGetInstance ()
static simba_int16 GetSqlTypeForTDWType (TDWType in_tdwType)

Protected Member Functions

bool CanConvert (TDWType in_sourceType, TDWType in_targetType)
 Returns true if the source data type can be converted to the target data type, else false.

Detailed Description

Encapsulates Conversion Algorithms.


Constructor & Destructor Documentation

TypeConversionInfo ( SqlCDataTypeUtilities in_cTypeUtils,
SqlDataTypeUtilities in_sqlTypeUtils,
SqlConverterFactory in_converterFactory 
)

Constructor.

Parameters:
in_cTypeUtils SqlCDataTypeUtilities this TypeConversionInfo provides info about. NOT OWNED.
in_sqlTypeUtils SqlDataTypeUtilities this TypeConversionInfo provides info about. NOT OWNED.
in_converterFactory Converter factory this TypeConversionInfo provides info about. NOT OWNED.

Member Function Documentation

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

Returns true if the source data type can be converted to the target data type, else false.

Parameters:
in_sourceType 
in_targetType 
bool CanConvertCToSql ( simba_int16  in_srcCType,
simba_int16  in_targetSqlType 
) [inline]

Returns true if the source SQL C type can be converted into the target SQL type. Else returns false.

Parameters:
in_srcCType 
in_targetSqlType 

TODO: http://msdn2.microsoft.com/en-us/library/ms716298.aspx makes it look like there are some SQL types without default C types. Does this mean that SQL_C_DEFAULT isn't always legal here?

TODO: Revise this to take into account signed vs unsigned SQL types!

bool CanConvertSqlToC ( simba_int16  in_srcSqlType,
simba_int16  in_targetCType 
) [inline]

Returns true if the source SQL type can be converted into the target SQL C type. Else returns false.

Parameters:
in_srcSqlType 
in_targetCType 

TODO: When custom type support is added, SQL_C_DEFAULT may not always be legal here.

TODO: Revise this to take into account signed vs unsigned SQL types!

TDWType GetCDefaultType ( TDWType  in_srcTDWType  ) 

Returns the TDW C Type that is the default type for the given TDW SQL type.

Parameters:
in_srcTDWType 
static TypeConversionInfo* GetInstance (  )  [inline, static]

Return instance pointer

simba_wstring GetNameStringForTypeMetadata ( const TypeMetadata in_typeMetadata  ) 

Returns the string representation of the type name for a given type metadata.

Parameters:
in_typeMetadata The type metadata to get a name for. (NOT OWN)
Returns:
the simba_wstring name for the given type metadata.
static simba_int16 GetSqlTypeForTDWType ( TDWType  in_tdwType  )  [static]

Returns the corresponding SQL C or SQL type for the given TDW data type.

Parameters:
in_tdwType The TDW Data Type.
Returns:
The corresponding SQL C or SQL type for the given TDW data type.
bool IsSqlType ( TDWType  in_tdwType  ) 

Indicates if the given TDW data type represents a SQL type.

Parameters:
in_tdwType The TDW type.
Returns:
true if the TDWType represents a SQL type; false otherwise.
bool IsSupportedCType ( simba_int16  in_sqlCType  ) 

Indicates if the given SQL C data type is supported.

Parameters:
in_sqlCType 
bool IsSupportedSQLType ( simba_int16  in_SQLDataType  ) 

Indicates if the given SQL data type is supported.

Parameters:
in_sqlType 

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