libIntegra
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Static Public Member Functions | Static Public Attributes | List of all members
integra_api::CGuidHelper Class Reference

Common guid routines. More...

#include "api/guid_helper.h"

Collaboration diagram for integra_api::CGuidHelper:
Collaboration graph
[legend]

Static Public Member Functions

static size_t guid_to_hash (const GUID &guid)
 Guid hash function. More...
 
static string guid_to_string (const GUID &guid)
 Convert guid to string. More...
 
static CError string_to_guid (const string &string, GUID &output)
 Convert string to guid. More...
 
static bool guids_are_equal (const GUID &guid1, const GUID &guid2)
 Compare guids. More...
 
static bool guid_is_null (const GUID &guid)
 Test guid for nullness. More...
 

Static Public Attributes

static const GUID null_guid
 Null guid. Assign guids to this value to mark them as null.
 

Detailed Description

Common guid routines.

libIntegra uses guids to identify modules, so that modules and module revisions can be uniquely identified even though they may be developed offline, asynchromously by 3rd party developers.

Note
CGuidHelper need never be instantiated - all its methods are static and stateless.

Member Function Documentation

static bool integra_api::CGuidHelper::guid_is_null ( const GUID guid)
static

Test guid for nullness.

Parameters
guidguid to test for nullness
Returns
true if guids is null, false if it is not null
static size_t integra_api::CGuidHelper::guid_to_hash ( const GUID guid)
static

Guid hash function.

Parameters
guida guid to hash
Returns
a 32-bit hash of the guid
static string integra_api::CGuidHelper::guid_to_string ( const GUID guid)
static

Convert guid to string.

Parameters
guidguid to convert
Returns
lowercase hexadecimal string representation of the guid, in the form "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
static bool integra_api::CGuidHelper::guids_are_equal ( const GUID guid1,
const GUID guid2 
)
static

Compare guids.

Parameters
guid1first guid to compare
guid2second guid to compare
Returns
true if guids are equal, false if they are not equal
static CError integra_api::CGuidHelper::string_to_guid ( const string &  string,
GUID output 
)
static

Convert string to guid.

Parameters
string.Must be hexadecimal in form "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
[out]output.On success, converted guid is stored here.
Returns
CError::INPUT_ERROR if input was incorrectly formatted. Otherwise CError::SUCCESS

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