#include <MUuid.h>
Class to manipulate UUIDs.
Provides a class to manipulate UUIDs (Universally Unique Identifiers).
UUIDs (as implemented here) are 128-bit values, used to identify objects 'practically' uniquely. Their main use in Maya is to identify DG nodes. Nodes have a UUID which persists even if the node's name is changed, or its DAG relationship alters, and which is stored in the Maya scene file.
See http://en.wikipedia.org/wiki/Universally_unique_identifier
Public Member Functions | |
MUuid () | |
Class constructor. More... | |
MUuid (const MUuid &other) | |
Copy constructor. More... | |
MUuid (const unsigned int *uuid) | |
Constructor. More... | |
MUuid (const unsigned char *uuid) | |
Constructor. More... | |
MUuid (const MString &value, MStatus *ReturnStatus=NULL) | |
Constructor from string. More... | |
~MUuid () | |
Class destructor. | |
MUuid & | operator= (const MUuid &rhs) |
Assignment operator. More... | |
bool | operator== (const MUuid &rhs) const |
Equality operator. More... | |
bool | operator!= (const MUuid &rhs) const |
Inequality operator. More... | |
MStatus | get (unsigned char *uuid) const |
Gets the UUID as an array of sixteen bytes. More... | |
MString | asString () const |
Gets the UUID as a string. More... | |
operator MString () const | |
Cast to string. More... | |
void | copy (const MUuid &rhs) |
Copy method. More... | |
bool | valid () const |
Queries whether the UUID is valid. More... | |
MStatus | generate () |
Generates a new random UUID and stores it in this class instance. More... | |
Static Public Member Functions | |
static const char * | className () |
Returns the name of this class. More... | |
MUuid | ( | const unsigned int * | uuid | ) |
Constructor.
Creates a new MUuid object and initializes it with the given UUID.
[in] | uuid | The UUID as an array of four 32 bit integers. |
MUuid | ( | const unsigned char * | uuid | ) |
Constructor.
Creates a new MUuid object and initializes it with the given UUID.
[in] | uuid | The UUID as an array of sixteen bytes. |
Constructor from string.
Creates a new MUuid object and initializes it with the value translated from the string representation of the UUID value.
This string should be of the form XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX where 'X' is a hex digit. For example 3F2504E0-4F89-11D3-9A0C-0305E82C3301 So, the string is always exactly 36 characters long. See http://en.wikipedia.org/wiki/Universally_unique_identifier
[in] | value | The value of the new object. |
[out] | ReturnStatus | The status code. |
bool operator== | ( | const MUuid & | rhs | ) | const |
Equality operator.
Compares two MUuid objects to see if they contain the same value.
[in] | rhs | Right operand. |
bool operator!= | ( | const MUuid & | rhs | ) | const |
Inequality operator.
Compares two MUuid objects to see if they differ.
[in] | rhs | Right operand. |
MStatus get | ( | unsigned char * | dest | ) | const |
Gets the UUID as an array of sixteen bytes.
[out] | dest | The array to populate with the UUID value. |
MString asString | ( | ) | const |
Gets the UUID as a string.
operator MString | ( | ) | const |
Cast to string.
void copy | ( | const MUuid & | rhs | ) |
bool valid | ( | ) | const |
Queries whether the UUID is valid.
MStatus generate | ( | ) |
Generates a new random UUID and stores it in this class instance.
|
static |
Returns the name of this class.