| Apache Ignite C++

Public Member Functions | Friends | List of all members
ignite::Guid Class Reference

Global universally unique identifier (GUID). More...

`#include <guid.h>`

## Public Member Functions
| Guid ()
| Default constructor.
| Guid (int64_t most, int64_t least)
| Constructor. More...
int64_t | GetMostSignificantBits () const
| Returns the most significant 64 bits of this instance. More...
int64_t | GetLeastSignificantBits () const
| Returns the least significant 64 bits of this instance. More...
int32_t | GetVersion () const
| The version number associated with this instance. More...
int32_t | GetVariant () const
| The variant number associated with this instance. More...
int32_t | GetHashCode () const
| Get hash code of this instance (used in serialization). More...
int64_t | Compare (const Guid &other) const
| Compare to another value. More...

## Friends
bool IGNITE_IMPORT_EXPORT | operator== (const Guid &val1, const Guid &val2)
| Comparison operator override. More...
bool IGNITE_IMPORT_EXPORT | operator== (const Guid &val1, const Guid &val2)
| Comparison operator. More...
bool IGNITE_IMPORT_EXPORT | operator!= (const Guid &val1, const Guid &val2)
| Comparison operator. More...
bool IGNITE_IMPORT_EXPORT | operator< (const Guid &val1, const Guid &val2)
| Comparison operator. More...
bool IGNITE_IMPORT_EXPORT | operator<= (const Guid &val1, const Guid &val2)
| Comparison operator. More...
bool IGNITE_IMPORT_EXPORT | operator> (const Guid &val1, const Guid &val2)
| Comparison operator. More...
bool IGNITE_IMPORT_EXPORT | operator>= (const Guid &val1, const Guid &val2)
| Comparison operator. More...

## Detailed Description

Global universally unique identifier (GUID).

## Constructor & Destructor Documentation

## ◆ Guid()

ignite::Guid::Guid | ( | int64_t | most,
|  | int64_t | least
| ) |  |

Constructor.

Parameters

  most | Most significant bits.
  least | Least significant bits.

## Member Function Documentation

## ◆ Compare()

int64_t ignite::Guid::Compare | ( | const Guid & | other | ) | const

Compare to another value.

Parameters

  other | Instance to compare to.

Returns
  Zero if equals, negative number if less and positive if more.

## ◆ GetHashCode()

int32_t ignite::Guid::GetHashCode | ( |  | ) | const

Get hash code of this instance (used in serialization).

Returns
  Hash code.

## ◆ GetLeastSignificantBits()

int64_t ignite::Guid::GetLeastSignificantBits | ( |  | ) | const

Returns the least significant 64 bits of this instance.

Returns
  The least significant 64 bits of this instance.

## ◆ GetMostSignificantBits()

int64_t ignite::Guid::GetMostSignificantBits | ( |  | ) | const

Returns the most significant 64 bits of this instance.

Returns
  The most significant 64 bits of this instance.

## ◆ GetVariant()

int32_t ignite::Guid::GetVariant | ( |  | ) | const

The variant number associated with this instance.

The variant number describes the layout of the Guid.

The variant number has the following meaning: 0 Reserved for NCS backward compatibility; 2 IETF RFC 4122 (Leach-Salz), used by this class; 6 Reserved, Microsoft Corporation backward compatibility; 7 Reserved for future definition.

Returns
  The variant number of this instance.

## ◆ GetVersion()

int32_t ignite::Guid::GetVersion | ( |  | ) | const

The version number associated with this instance.

The version number describes how this Guid was generated.

The version number has the following meaning: 1 Time-based UUID; 2 DCE security UUID; 3 Name-based UUID; 4 Randomly generated UUID.

Returns
  The version number of this instance.

## Friends And Related Function Documentation

## ◆ operator!=

bool IGNITE_IMPORT_EXPORT operator!= | ( | const Guid & | val1,
|  | const Guid & | val2
| ) |  |
| friend

Comparison operator.

Parameters

  val1 | First value.
  val2 | Second value.

Returns
  True if not equal.

## ◆ operator<

bool IGNITE_IMPORT_EXPORT operator< | ( | const Guid & | val1,
|  | const Guid & | val2
| ) |  |
| friend

Comparison operator.

Parameters

  val1 | First value.
  val2 | Second value.

Returns
  True if less.

## ◆ operator<=

bool IGNITE_IMPORT_EXPORT operator<= | ( | const Guid & | val1,
|  | const Guid & | val2
| ) |  |
| friend

Comparison operator.

Parameters

  val1 | First value.
  val2 | Second value.

Returns
  True if less or equal.

## ◆ operator== [1/2]

bool IGNITE_IMPORT_EXPORT operator== | ( | const Guid & | val1,
|  | const Guid & | val2
| ) |  |
| friend

Comparison operator override.

Parameters

  val1 | First value.
  val2 | Second value.

Returns
  True if equal.

## ◆ operator== [2/2]

bool IGNITE_IMPORT_EXPORT operator== | ( | const Guid & | val1,
|  | const Guid & | val2
| ) |  |
| friend

Comparison operator.

Parameters

  val1 | First value.
  val2 | Second value.

Returns
  True if equal.

## ◆ operator>

bool IGNITE_IMPORT_EXPORT operator> | ( | const Guid & | val1,
|  | const Guid & | val2
| ) |  |
| friend

Comparison operator.

Parameters

  val1 | First value.
  val2 | Second value.

Returns
  True if greater.

## ◆ operator>=

bool IGNITE_IMPORT_EXPORT operator>= | ( | const Guid & | val1,
|  | const Guid & | val2
| ) |  |
| friend

Comparison operator.

Parameters

  val1 | First value.
  val2 | Second value.

Returns
  True if greater or equal.

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

- guid.h
- guid.cpp