SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
Public Member Functions | List of all members
SDL::GUID Struct Reference

An GUID is a 128-bit identifier for an input device that identifies that device across runs of SDL programs on the same platform. More...

Inheritance diagram for SDL::GUID:
Inheritance graph
[legend]
Collaboration diagram for SDL::GUID:
Collaboration graph
[legend]

Public Member Functions

constexpr GUID (const GUIDRaw &gUID={})
 Wraps GUID. More...
 
 GUID (StringParam pchGUID)
 Convert a GUID string into a GUID structure. More...
 
std::string ToString () const
 Get an ASCII string representation for a given GUID. More...
 

Detailed Description

If the device is detached and then re-attached to a different port, or if the base system is rebooted, the device should still report the same GUID.

GUIDs are as precise as possible but are not guaranteed to distinguish physically distinct but equivalent devices. For example, two game controllers from the same vendor with the same product ID and revision may have the same GUID.

GUIDs may be platform-dependent (i.e., the same device may report different GUIDs on different operating systems).

Since
This struct is available since SDL 3.2.0.

Constructor & Destructor Documentation

◆ GUID() [1/2]

constexpr SDL::GUID::GUID ( const GUIDRaw gUID = {})
inlineconstexpr
Parameters
gUIDthe value to be wrapped

◆ GUID() [2/2]

SDL::GUID::GUID ( StringParam  pchGUID)
inline

Performs no error checking. If this function is given a string containing an invalid GUID, the function will silently succeed, but the GUID generated will not be useful.

Parameters
pchGUIDstring containing an ASCII representation of a GUID.
Postcondition
a GUID structure.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.
See also
GUID.ToString

The documentation for this struct was generated from the following file: