Archicad 28 C++ API
|
Represents a GS::Guid
in the API layer.
More...
#include <API_Guid.hpp>
Public Member Functions | |
ULong | GenerateHashValue () const |
Generate a hash value that's why API_Guid can be used with GS::HashTable. | |
Represents a GS::Guid
in the API layer.
GS::Guid
. It has the same size and structure and only exists because of certain C++ language limitations: namely that a union (like API_Element) cannot contain a class that has a constructor or destructor. Since API_Elem_Head needs to contain a Guid member, and it cannot be a GS::Guid
, the API_Guid structure was introduced. This means that you should treat API_Guid structures as GS::Guid
in your code, and use the following provided functions to convert between the two: ```cpp inline GS::Guid APIGuid2GSGuid (API_Guid guid); inline const GS::Guid APIGuid2GSGuid (const API_Guid guid); inline API_Guid GSGuid2APIGuid (GS::Guid guid); inline const API_Guid GSGuid2APIGuid (const GS::Guid guid); ``` All these functions do two things:GS::Guid
are the same size at compile time andGS::Guid
reference, or vice versa. There are comparison operators (==,!=, <, >=, >, >=) defined to compare API_Guids
with each other or with GS::Guid
s. There's also a macro called APINULLGuid for the API_Guid representation of the GS::NULLGuid constant. From Archicad 12 you are able to use API_Guid for GS::HashTable key because it has GenerateHashValue method.
|
inline |
Generate a hash value that's why API_Guid can be used with GS::HashTable.