My Project
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes
Uuid Struct Reference

#include <rpl_gtid.h>

List of all members.

Public Member Functions

enum_return_status parse (const char *string)
void clear ()
 Set to all zeros.
void copy_from (const uchar *data)
 Copies the given 16-byte data to this UUID.
void copy_from (const Uuid &data)
 Copies the given UUID object to this UUID.
void copy_to (uchar *data) const
 Copies the given UUID object to this UUID.
bool equals (const Uuid &other) const
 Returns true if this UUID is equal the given UUID.
size_t to_string (char *buf) const
void print () const
 Debugging only: Print this Uuid to stdout.
void dbug_print (const char *text="") const
 Print this Uuid to the trace file if debug is enabled; no-op otherwise.

Static Public Member Functions

static size_t to_string (const uchar *bytes_arg, char *buf)
 Convert the given binary buffer to a UUID.
static bool is_valid (const char *string)

Public Attributes

uchar bytes [BYTE_LENGTH]
 The data for this Uuid.

Static Public Attributes

static const size_t TEXT_LENGTH = 36
 The number of bytes in the textual representation of a Uuid.
static const size_t BYTE_LENGTH = 16
 The number of bytes in the data of a Uuid.
static const size_t BIT_LENGTH = 128
 The number of bits in the data of a Uuid.

Detailed Description

Represents a UUID.

This is a POD. It has to be a POD because it is a member of Sid_map::Node which is stored in both HASH and DYNAMIC_ARRAY.


Member Function Documentation

bool Uuid::is_valid ( const char *  string) [static]

Return true if parse() would return succeed, but don't actually store the result anywhere.

enum_return_status Uuid::parse ( const char *  string)

Stores the UUID represented by a string on the form XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX in this object.

Returns:
RETURN_STATUS_OK or RETURN_STATUS_UNREPORTED_ERROR.
size_t Uuid::to_string ( char *  buf) const

Generates a 36+1 character long representation of this UUID object in the given string buffer.

Return values:
36- the length of the resulting string.

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