SqlCData Class Reference

Encapsulates application-side data (octet length and buffer pointer) as well as the SqlCTypeMetadata* for SQL C data. More...

List of all members.

Public Member Functions

 DEPRECATED ("Use SqlConverterFactory.") void Convert(SqlData &in_from
 Copies and converts the data stored in in_from into this data type's buffer. This function only uses the deprecated global converter factory singleton.
void DetachBuffer ()
 Detaches the buffer.
void * GetBuffer () const
 Returns the attached buffer.
void * GetBufferAtOffset ()
 Returns the attached buffer at the current offset.
simba_signed_native GetConvertedLength () const
 Based on the last Convert(), returns the amount of bytes that all of the converted data would have taken up without truncation, not including space for a possible null terminator.
simba_signed_native GetLength () const
 Gets the length of the attached buffer in bytes.
const SqlCTypeMetadataGetMetadata () const
 Const metadata accessor. (NOT OWN).
SqlCTypeMetadataGetMetadata ()
 Metadata accessor. (NOT OWN).
simba_signed_native GetOffset ()
 Returns the offset in bytes which is to be added to the buffer pointer to get the actual location where data begins.
void IncrementOffset (simba_signed_native in_offset)
 Increments the current offset by the given value.
bool IsBufferValid () const
 Whether a buffer has been bound on this object.
bool IsNull () const
 Indicates if the buffer should be treated as holding NULL data.
void SetBuffer (void *in_buffer)
 Attaches a buffer to the TypedDataWrapper.
void SetBufferIsValid (bool in_bufferIsValid)
 Sets whether the buffer on this object can be read from or written to.
void SetConvertedLength (simba_signed_native in_convertedLength)
 Set the converted length.
void SetLength (simba_signed_native in_length)
 Sets the length of the attached buffer in bytes.
void SetNull (bool in_isNull)
 Indicates whether or not the buffer should be treated as holding NULL data.
void SetOffset (simba_signed_native in_offset)
 Sets the offset in bytes to be applied to the buffer pointer indicating where to begin the conversion.
void SetSqlCType (simba_int16 in_sqlCType)
 Resets metadata associated with the data wrapper to defaults for the given type, and also resets the buffer to NULL and other buffer-related values to defaults.
 SqlCData (SqlCTypeMetadataFactory &in_metadataFactory, simba_int16 in_sqlCType)
 Constructor.
 ~SqlCData ()
 Destructor.

Public Attributes

IWarningListenerin_warningListener

Detailed Description

Encapsulates application-side data (octet length and buffer pointer) as well as the SqlCTypeMetadata* for SQL C data.


Constructor & Destructor Documentation

SqlCData ( SqlCTypeMetadataFactory in_metadataFactory,
simba_int16  in_sqlCType 
)

Constructor.

Parameters:
in_metadataFactory 
in_sqlCType 
~SqlCData (  ) 

Destructor.


Member Function Documentation

DEPRECATED ( "Use SqlConverterFactory."   ) 

Copies and converts the data stored in in_from into this data type's buffer. This function only uses the deprecated global converter factory singleton.

Parameters:
in_from 
in_warningListener The warning listener to post warnings to. (NOT OWN)
Exceptions:
ErrorException if there is an error performing the conversion.
void DetachBuffer (  ) 

Detaches the buffer.

void* GetBuffer (  )  const [inline]

Returns the attached buffer.

Returns:
The attached buffer. (NOT OWN)
void* GetBufferAtOffset (  )  [inline]

Returns the attached buffer at the current offset.

simba_signed_native GetConvertedLength (  )  const [inline]

Based on the last Convert(), returns the amount of bytes that all of the converted data would have taken up without truncation, not including space for a possible null terminator.

simba_signed_native GetLength (  )  const [inline]

Gets the length of the attached buffer in bytes.

const SqlCTypeMetadata* GetMetadata (  )  const [inline]

Const metadata accessor. (NOT OWN).

SqlCTypeMetadata* GetMetadata (  )  [inline]

Metadata accessor. (NOT OWN).

simba_signed_native GetOffset (  )  [inline]

Returns the offset in bytes which is to be added to the buffer pointer to get the actual location where data begins.

void IncrementOffset ( simba_signed_native  in_offset  )  [inline]

Increments the current offset by the given value.

Parameters:
in_offset indicates number of bytes to increment in the buffer.
bool IsBufferValid (  )  const [inline]

Whether a buffer has been bound on this object.

bool IsNull (  )  const [inline]

Indicates if the buffer should be treated as holding NULL data.

void SetBuffer ( void *  in_buffer  )  [inline]

Attaches a buffer to the TypedDataWrapper.

Parameters:
in_buffer Pointer to the data buffer. (NOT OWN)
void SetBufferIsValid ( bool  in_bufferIsValid  )  [inline]

Sets whether the buffer on this object can be read from or written to.

Parameters:
in_bufferIsValid Whether the buffer on this object can be read from or written to.
void SetConvertedLength ( simba_signed_native  in_convertedLength  )  [inline]

Set the converted length.

Parameters:
in_convertedLength The converted length, in bytes.
void SetLength ( simba_signed_native  in_length  )  [inline]

Sets the length of the attached buffer in bytes.

Parameters:
in_length The length in bytes.
void SetNull ( bool  in_isNull  )  [inline]

Indicates whether or not the buffer should be treated as holding NULL data.

Parameters:
in_isNull 
void SetOffset ( simba_signed_native  in_offset  )  [inline]

Sets the offset in bytes to be applied to the buffer pointer indicating where to begin the conversion.

Parameters:
in_offset indicates number of bytes from buffer start to begin conversion operation.
void SetSqlCType ( simba_int16  in_sqlCType  ) 

Resets metadata associated with the data wrapper to defaults for the given type, and also resets the buffer to NULL and other buffer-related values to defaults.

Parameters:
in_sqlCType 

Member Data Documentation


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