SqlVarLengthOwnedType Class Reference

Encapsulates variable sized, buffer based SQL Types with an internally allocated buffer. More...

Inherits Simba::Support::SqlData.

List of all members.

Public Member Functions

virtual void AttachBuffer (simba_byte *in_buffer, simba_uint32 in_length)
 Attach an unowned buffer, replacing the owned buffer.
void * GetBuffer ()
 Returns the attached buffer.
void SetBuffer (AutoArrayPtr< simba_byte > in_buffer, simba_uint32 in_sizeUsed=0)
 Replace the internal buffer of this object.
void SetLength (simba_uint32 in_length)
 Sets the length of the buffer in number of bytes.
 SqlVarLengthOwnedType (SqlTypeMetadata *in_metadata)
 Constructor.
AutoArrayPtr< simba_byteTakeBuffer ()
 Take the internal buffer from this object. After the call, this object's data is NULL.

Detailed Description

Encapsulates variable sized, buffer based SQL Types with an internally allocated buffer.


Constructor & Destructor Documentation

SqlVarLengthOwnedType ( SqlTypeMetadata in_metadata  ) 

Constructor.

Parameters:
in_metadata The metadata for the SQL object. (NOT OWN)

Member Function Documentation

virtual void AttachBuffer ( simba_byte in_buffer,
simba_uint32  in_length 
) [virtual]

Attach an unowned buffer, replacing the owned buffer.

This also sets the length. This method has no effect on fixed length types.

Any buffers allocated via SetLength will be released, and calling SetLength() with a buffer already attached will detach the buffer and allocate a new owned buffer. Data will not be copied from attached to owned buffers.

Parameters:
in_buffer Buffer to attach. May be NULL only for in_length 0. (NOT OWN)
in_length Length of in_buffer.

Reimplemented from SqlData.

void* GetBuffer (  )  [virtual]

Returns the attached buffer.

Returns:
The data buffer. (NOT OWN)

Implements SqlData.

void SetBuffer ( AutoArrayPtr< simba_byte in_buffer,
simba_uint32  in_sizeUsed = 0 
)

Replace the internal buffer of this object.

Parameters:
in_buffer The buffer to replace it with.
in_sizeUsed The size in bytes of valid data in in_buffer.
void SetLength ( simba_uint32  in_length  )  [virtual]

Sets the length of the buffer in number of bytes.

This method has no effect for fixed length types.

Parameters:
in_length 

Reimplemented from SqlData.

AutoArrayPtr<simba_byte> TakeBuffer (  ) 

Take the internal buffer from this object. After the call, this object's data is NULL.

Returns:
This object's internal buffer.

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