TDWGuid Struct Reference

Structure for guid type, adapted from SQLGUID in sqltypes.h. More...

List of all members.

Public Member Functions

simba_uint64 Hash (const simba_byte *in_buffer, simba_uint32 in_seed) const
 Get the hash code for the given data.
bool operator!= (const TDWGuid &in_guid) const
 Overloaded != operator.
bool operator< (const TDWGuid &in_guid) const
 Overloaded < operator.
bool operator<= (const TDWGuid &in_guid) const
 Overloaded <= operator.
TDWGuidoperator= (const TDWGuid &in_guid)
 Overloaded = operator.
bool operator== (const TDWGuid &in_guid) const
 Overloaded == operator.
bool operator> (const TDWGuid &in_guid) const
 Overloaded > operator.
bool operator>= (const TDWGuid &in_guid) const
 Overloaded >= operator.
void Set (const simba_wstring &in_value, bool in_throwOnError)
 Sets the date with the given string value.
void Set (const simba_string &in_value, bool in_throwOnError)
 Sets the date with the given string value.
void Set (const simba_char *in_value, simba_size_t in_length, bool in_throwOnError)
 Sets the date with the given string value.
void Set (const simba_char *in_value, bool in_throwOnError)
 Sets the date with the given string value.
 TDWGuid (const simba_wstring &in_value, bool in_throwOnError=true)
 Constructor.
 TDWGuid (const simba_string &in_value, bool in_throwOnError=true)
 Constructor.
 TDWGuid (const simba_char *in_value, simba_size_t in_length, bool in_throwOnError=true)
 Constructor.
 TDWGuid (const simba_char *in_value, bool in_throwOnError=true)
 Constructor.
 TDWGuid (simba_uint32 in_data1, simba_uint16 in_data2, simba_uint16 in_data3, const simba_byte *in_data4)
 Constructor.
 TDWGuid (const TDWGuid &in_guid)
 Copy constructor.
 TDWGuid ()
 Constructor.
simba_charToCharArray (simba_size_t &out_length) const
 Return a readable string representation of the GUID.
void ToCharArray (simba_char *out_target, simba_size_t &out_length) const
 Return a readable string representation of the GUID.
void ToCharArray (simba_char *out_target, bool in_nullTerminate=true) const
 Return a readable string representation of the GUID.
simba_string ToString () const
 Return a string representation of the GUID.

Public Attributes

simba_uint32 Data1
 The bytes [0, 3] of the GUID.
simba_uint16 Data2
 The bytes [4, 5] of the GUID.
simba_uint16 Data3
 The bytes [6, 7] of the GUID.
simba_byte Data4 [TDW_GUID_NUM_DATA4_BYTES]
 The bytes [8, 15] of the GUID.
bool IsValid
 Flag indicating if the stored data is valid or not.

Detailed Description

Structure for guid type, adapted from SQLGUID in sqltypes.h.

This structure is used for SQL_GUID and SQL_C_GUID.


Constructor & Destructor Documentation

TDWGuid (  ) 

Constructor.

TDWGuid ( const TDWGuid in_guid  ) 

Copy constructor.

Parameters:
in_guid The GUID to copy to this object.
TDWGuid ( simba_uint32  in_data1,
simba_uint16  in_data2,
simba_uint16  in_data3,
const simba_byte in_data4 
)

Constructor.

Parameters:
in_data1 The bytes [0, 3] of the GUID.
in_data2 The bytes [4, 5] of the GUID.
in_data3 The bytes [6, 7] of the GUID.
in_data4 The bytes [8, 15] of the GUID. It is assumed that there are 8 elements in the array. (NOT OWN)
TDWGuid ( const simba_char in_value,
bool  in_throwOnError = true 
)

Constructor.

Parameters:
in_value The GUID as a NULL-terminated string in the format XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX. May optionally have enclosing {} brackets. (NOT OWN)
in_throwOnError True to throw an exception on error; false otherwise.
TDWGuid ( const simba_char in_value,
simba_size_t  in_length,
bool  in_throwOnError = true 
)

Constructor.

Parameters:
in_value The GUID as a NULL-terminated string in the format XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX. May optionally have enclosing {} brackets. (NOT OWN)
in_length The length of the string in characters.
in_throwOnError True to throw an exception on error; false otherwise.
TDWGuid ( const simba_string in_value,
bool  in_throwOnError = true 
)

Constructor.

Parameters:
in_value The GUID as a string in the format XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX. May optionally have enclosing {} brackets.
in_throwOnError True to throw an exception on error; false otherwise.
TDWGuid ( const simba_wstring in_value,
bool  in_throwOnError = true 
)

Constructor.

Parameters:
in_value The GUID as a string in the format XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX. May optionally have enclosing {} brackets.
in_throwOnError True to throw an exception on error; false otherwise.

Member Function Documentation

simba_uint64 Hash ( const simba_byte in_buffer,
simba_uint32  in_seed 
) const

Get the hash code for the given data.

Parameters:
in_buffer The data buffer. (NOT OWN)
in_seed The seed to use
Returns:
A hash code for the given data.
bool operator!= ( const TDWGuid in_guid  )  const

Overloaded != operator.

bool operator< ( const TDWGuid in_guid  )  const

Overloaded < operator.

bool operator<= ( const TDWGuid in_guid  )  const

Overloaded <= operator.

TDWGuid& operator= ( const TDWGuid in_guid  ) 

Overloaded = operator.

bool operator== ( const TDWGuid in_guid  )  const

Overloaded == operator.

bool operator> ( const TDWGuid in_guid  )  const

Overloaded > operator.

bool operator>= ( const TDWGuid in_guid  )  const

Overloaded >= operator.

void Set ( const simba_wstring in_value,
bool  in_throwOnError 
)

Sets the date with the given string value.

Parameters:
in_value The string value in the format XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX. May optionally have enclosing {} brackets.
in_throwOnError True to throw an exception on error; false otherwise.
void Set ( const simba_string in_value,
bool  in_throwOnError 
)

Sets the date with the given string value.

Parameters:
in_value The string value in the XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX. May optionally have enclosing {} brackets.
in_throwOnError True to throw an exception on error; false otherwise.
void Set ( const simba_char in_value,
simba_size_t  in_length,
bool  in_throwOnError 
)

Sets the date with the given string value.

Parameters:
in_value The string value in the format XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX. May optionally have enclosing {} brackets. (NOT OWN)
in_length The length of the string in characters.
in_throwOnError True to throw an exception on error; false otherwise.
void Set ( const simba_char in_value,
bool  in_throwOnError 
)

Sets the date with the given string value.

Parameters:
in_value The string value in the format XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX. May optionally have enclosing {} brackets. (NOT OWN)
in_throwOnError True to throw an exception on error; false otherwise.
simba_char* ToCharArray ( simba_size_t out_length  )  const

Return a readable string representation of the GUID.

The format that is returned is XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.

Parameters:
out_length The length of the string representation of the GUID. This is the total number of characters in the returned buffer before the NUL-terminator.
Returns:
A NUL-terminated character array representing the GUID. (OWN)
void ToCharArray ( simba_char out_target,
simba_size_t out_length 
) const

Return a readable string representation of the GUID.

The format that is returned is XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.

Parameters:
out_target The target array to place the GUID string in. Assumed to be at least GUID_DISPLAY_SIZE + 1 characters long. (NOT OWN)
out_length The length of the string representation of the GUID. This is the total number of characters in the returned buffer before the NUL-terminator.
void ToCharArray ( simba_char out_target,
bool  in_nullTerminate = true 
) const

Return a readable string representation of the GUID.

The format that is returned is XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.

Parameters:
out_target The target array to place the GUID string in. Assumed to be at least GUID_DISPLAY_SIZE. Add one character for the NUL-terminator if in_nullTerminate is true. (NOT OWN)
in_nullTerminate Flag to indicate if out_target should be NUL-terminated.
simba_string ToString (  )  const

Return a string representation of the GUID.

The format that is returned is XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.

Returns:
The string representation of the GUID.

Member Data Documentation

The bytes [0, 3] of the GUID.

Note that the data fields are taken from the typical structure of a GUID.

The bytes [4, 5] of the GUID.

Note that the data fields are taken from the typical structure of a GUID.

The bytes [6, 7] of the GUID.

Note that the data fields are taken from the typical structure of a GUID.

simba_byte Data4[TDW_GUID_NUM_DATA4_BYTES]

The bytes [8, 15] of the GUID.

Note that the data fields are taken from the typical structure of a GUID.

bool IsValid

Flag indicating if the stored data is valid or not.


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

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