# Class: cUID

### Declaration: NPTrackingTools.h

```
   <syntaxhighlight lang="python"> namespace Core {
   /// <summary>
   /// A platform-neutral 128-bit universal identifier. It is essentially guaranteed to never
   /// generate the same ID twice.
   /// </summary>
   class cUID
   {
   public:
       typedef unsigned long long int uint64;
```

```
       /// <summary>
       /// Create a default UID. In order to create a UID that has a valid unique identifier you
       /// must call Generate().
       /// </summary>
       cUID() : mHighBits( 0 ), mLowBits( 0 ) { }
```

```
       cUID( uint64 high, uint64 low ) : mHighBits( high ), mLowBits( low ) { }
       cUID( const cUID & obj ) : mHighBits( obj.mHighBits ), mLowBits( obj.mLowBits ) { }
       cUID&           operator=( const cUID & rhs ) { mHighBits = rhs.mHighBits; mLowBits = rhs.mLowBits; return *this; }
```

```
       /// <summary>
       /// Set the value of the UID from two long integer values. It is up to the caller to ensure that
       /// the resulting UID is unique.
       /// </summary>
       void            SetValue( uint64 highBits, uint64 lowBits ) { mHighBits = highBits; mLowBits = lowBits; }
```

```
       /// <summary>Get the low 64 bits of the UID.</summary>
       uint64          LowBits() const { return mLowBits; }
```

```
       /// <summary>Get the high 64 bits of the UID.</summary>
       uint64          HighBits() const { return mHighBits; }
```

```
       /// <summary>Returns true if the ID is valid.</summary>
       bool            Valid() const { return ( mHighBits != 0 && mLowBits != 0 ); }
```

```
       /// <summary>Generate a new UID value.</summary>
       static cUID     Generate();
```

```
       //====================================================================================
       // Comparison operators
       //====================================================================================
```

```
       bool            operator<( const cUID & rhs ) const
       {
           return ( ( mHighBits < rhs.mHighBits ) ? true : ( mHighBits == rhs.mHighBits ? ( mLowBits < rhs.mLowBits ) : false ) );
       }
       bool            operator<=( const cUID & rhs ) const
       {
           return ( ( mHighBits < rhs.mHighBits ) ? true : ( mHighBits == rhs.mHighBits ? ( mLowBits <= rhs.mLowBits ) : false ) );
       }
       bool            operator>( const cUID & rhs ) const { return !( *this <= rhs ); }
       bool            operator>=( const cUID & rhs ) const { return !( *this < rhs ); }
       bool            operator==( const cUID & rhs ) const
       {
           return ( ( mHighBits == rhs.mHighBits ) && ( mLowBits == rhs.mLowBits ) );
       }
       bool            operator!=( const cUID & rhs ) const { return !( *this == rhs ); }
```

```
       //====================================================================================
       // Constants
       //====================================================================================
```

```
       static const cUID Invalid;
```

```
   private:
       uint64          mHighBits;
       uint64          mLowBits;
   };
 }</syntaxhighlight>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.optitrack.com/v2.3/developer-tools/camera-sdk/camera-sdk-classes/class-cuid.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
