Interface Technology Basics VST 3.7 SDK for developing VST plug-in

Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
FUID Class Reference
Basic Interfaces

Handling 16 Byte Globally Unique Identifiers. More...

`#include <funknown.h>`

## Public Types
enum | UIDPrintStyle { kINLINE_UID , kDECLARE_UID , kFUID , kCLASS_UID }
typedef char8 | String[33]

## Public Member Functions
| FUID ()
| FUID (uint32 l1, uint32 l2, uint32 l3, uint32 l4)
| FUID (const FUID &)
virtual | ~FUID ()
bool | generate ()
| Generates a new Unique Identifier (UID). More...
bool | isValid () const
| Checks if the UID data is valid. More...
FUID & | operator= (const FUID &f)
bool | operator== (const FUID &f) const
bool | operator< (const FUID &f) const
bool | operator!= (const FUID &f) const
uint32 | getLong1 () const
uint32 | getLong2 () const
uint32 | getLong3 () const
uint32 | getLong4 () const
void | from4Int (uint32 d1, uint32 d2, uint32 d3, uint32 d4)
void | to4Int (uint32 &d1, uint32 &d2, uint32 &d3, uint32 &d4) const
void | toString (char8 *string) const
| Converts UID to a string. More...
bool | fromString (const char8 *string)
| Sets the UID data from a string. More...
void | toRegistryString (char8 *string) const
| Converts UID to a string in Microsoft(R) OLE format. More...
bool | fromRegistryString (const char8 *string)
| Sets the UID data from a string in Microsoft(R) OLE format. More...
void | print (int32 style, char8 *string=nullptr, size_t stringBufferSize=0) const
| Prints the UID to a string (or debug output if string is NULL). More...
template<size_t N>
| FUID (const char(&uid)[N])
void | toTUID (TUID result) const
| operator const TUID & () const
const TUID & | toTUID () const

## Static Public Member Functions
static FUID | fromTUID (const TUID uid)

## Protected Attributes
TUID | data

## Detailed Description

Handling 16 Byte Globally Unique Identifiers.

Each interface declares its identifier as static member inside the interface namespace (e.g. FUnknown::iid).

## Member Typedef Documentation

## ◆ String

typedef char8 String[33]

## Member Enumeration Documentation

## ◆ UIDPrintStyle

enum UIDPrintStyle

Enumerator
kINLINE_UID | "INLINE_UID (0x00000000, 0x00000000, 0x00000000, 0x00000000)"
kDECLARE_UID | "DECLARE_UID (0x00000000, 0x00000000, 0x00000000, 0x00000000)"
kFUID | "FUID (0x00000000, 0x00000000, 0x00000000, 0x00000000)"
kCLASS_UID | "DECLARE_CLASS_IID (Interface, 0x00000000, 0x00000000, 0x00000000, 0x00000000)"

## Constructor & Destructor Documentation

## ◆ FUID() [1/4]

FUID | ( |  | ) |

## ◆ FUID() [2/4]

FUID | ( | uint32 | l1,
|  | uint32 | l2,
|  | uint32 | l3,
|  | uint32 | l4
| ) |  |

## ◆ FUID() [3/4]

FUID | ( | const FUID & | f | ) |

## ◆ ~FUID()

virtual ~FUID | ( |  | ) |
| inline virtual

## ◆ FUID() [4/4]

FUID | ( | const char(&) | uid[N] | ) |
| inline explicit

## Member Function Documentation

## ◆ generate()

bool generate | ( |  | ) |

Generates a new Unique Identifier (UID).

Will return true for success. If the return value is false, either no UID is generated or the UID is not guaranteed to be unique worldwide.

## ◆ isValid()

bool isValid | ( |  | ) | const

Checks if the UID data is valid.

The default constructor initializes the memory with zeros.

## ◆ operator=()

FUID & operator= | ( | const FUID & | f | ) |

## ◆ operator==()

bool operator== | ( | const FUID & | f | ) | const
| inline

## ◆ operator<()

bool operator< | ( | const FUID & | f | ) | const
| inline

## ◆ operator!=()

bool operator!= | ( | const FUID & | f | ) | const
| inline

## ◆ getLong1()

uint32 getLong1 | ( |  | ) | const

## ◆ getLong2()

uint32 getLong2 | ( |  | ) | const

## ◆ getLong3()

uint32 getLong3 | ( |  | ) | const

## ◆ getLong4()

uint32 getLong4 | ( |  | ) | const

## ◆ from4Int()

void from4Int | ( | uint32 | d1,
|  | uint32 | d2,
|  | uint32 | d3,
|  | uint32 | d4
| ) |  |

## ◆ to4Int()

void to4Int | ( | uint32 & | d1,
|  | uint32 & | d2,
|  | uint32 & | d3,
|  | uint32 & | d4
| ) |  | const

## ◆ toString()

void toString | ( | char8 * | string | ) | const

Converts UID to a string.

The string will be 32 characters long, representing the hexadecimal values of each data byte (e.g. "9127BE30160E4BB69966670AA6087880").

Typical use-case is:

char8[33] strUID = {0};
FUID uid;
if (uid.generate ())
uid.toString (strUID);
Steinberg::FUID::FUID
FUID()
Definition: funknown.cpp:119
Steinberg::char8
char char8
Definition: ftypes.h:83

## ◆ fromString()

bool fromString | ( | const char8 * | string | ) |

Sets the UID data from a string.

The string has to be 32 characters long, where each character-pair is the ASCII-encoded hexadecimal value of the corresponding data byte.

## ◆ toRegistryString()

void toRegistryString | ( | char8 * | string | ) | const

Converts UID to a string in Microsoft(R) OLE format.

(e.g. "{c200e360-38c5-11ce-ae62-08002b2b79ef}")

## ◆ fromRegistryString()

bool fromRegistryString | ( | const char8 * | string | ) |

Sets the UID data from a string in Microsoft(R) OLE format.

## ◆ print()

void print | ( | int32 | style,
|  | char8 * | string = `nullptr`,
|  | size_t | stringBufferSize = `0`
| ) |  | const

Prints the UID to a string (or debug output if string is NULL).

Parameters

  style | can be chosen from the FUID::UIDPrintStyle enumeration.
  string | is the output string if not NULL.
  stringBufferSize | is the size of the output string

## ◆ toTUID() [1/2]

void toTUID | ( | TUID | result | ) | const
| inline

## ◆ operator const TUID &()

operator const TUID & | ( |  | ) | const
| inline

## ◆ toTUID() [2/2]

const TUID & toTUID | ( |  | ) | const
| inline

## ◆ fromTUID()

static FUID fromTUID | ( | const TUID | uid | ) |
| inline static

## Member Data Documentation

## ◆ data

TUID data
| protected

Empty

Copyright © Steinberg Media Technologies GmbH. All Rights Reserved. This documentation is under this license.