Public Member Functions | Static Public Member Functions | Protected Member Functions

vtkKWEUUID Class Reference

(Static) Class for generating/constructing UUIDs More...

#include <vtkKWEUUID.h>

Inheritance diagram for vtkKWEUUID:
Inheritance graph
[legend]
Collaboration diagram for vtkKWEUUID:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 vtkTypeRevisionMacro (vtkKWEUUID, vtkObject)
void PrintSelf (ostream &os, vtkIndent indent)

Static Public Member Functions

static vtkKWEUUIDNew ()
static int GenerateUUID (unsigned char uuid[16])
static void ConstructUUID (unsigned char uuid[16])
static int GetMACAddress (unsigned char addr[6])

static void ConvertBinaryUUIDToString (unsigned char uuid[16], vtkstd::string &uuidString)

Protected Member Functions

 vtkKWEUUID ()
 ~vtkKWEUUID ()

Detailed Description

(Static) Class for generating/constructing UUIDs

This class provides ability to "generate" (using system/platform calls) a UUID, as well as to "construct" a UUID from MAC address, hostname, and random number generation. The main Generate/Construct methods returns the uuid as binary, which can be converted to the 26 character string by calling ConvertBinaryUUIDToString. Note: The MAC address code comes from gdcm (see the copyright above).

Definition at line 49 of file vtkKWEUUID.h.


Constructor & Destructor Documentation

vtkKWEUUID::vtkKWEUUID (  )  [inline, protected]

Definition at line 78 of file vtkKWEUUID.h.

vtkKWEUUID::~vtkKWEUUID (  )  [inline, protected]

Definition at line 79 of file vtkKWEUUID.h.


Member Function Documentation

static vtkKWEUUID* vtkKWEUUID::New (  )  [static]

Reimplemented from vtkObject.

vtkKWEUUID::vtkTypeRevisionMacro ( vtkKWEUUID  ,
vtkObject   
)
void vtkKWEUUID::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Reimplemented from vtkObject.

static int vtkKWEUUID::GenerateUUID ( unsigned char  uuid[16]  )  [static]

Generate a (binary) UUID using system/platform method call. Note, it may fail (return value -1), in which case you can call ConstructUUID.

static void vtkKWEUUID::ConstructUUID ( unsigned char  uuid[16]  )  [static]

Construct a (binary) UUID from MAC address (if can successfully acquire), hostname, and random # generation. This fn is guaranteed to create an "uuid" (a semi-unique number) based on random # generation, regardless of whether the MAC address and/or hostname is obtained.

static void vtkKWEUUID::ConvertBinaryUUIDToString ( unsigned char  uuid[16],
vtkstd::string &  uuidString 
) [static]

Convert a (16-byte) binary UUID to its string form (in hexadecimal): XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

static int vtkKWEUUID::GetMACAddress ( unsigned char  addr[6]  )  [static]

Get the 6-byte binary MAC address. Returns -1 on failure.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines