#include <InstanceId.h>
Public Member Functions | |
AZ_TYPE_INFO (InstanceId, "{0E59A635-07E8-419F-A0F2-90E0CE9C0AD6}") | |
InstanceId (const Uuid &guid) | |
InstanceId (const Uuid &guid, uint32_t subId) | |
InstanceId (const Uuid &guid, uint32_t subId, void *versionId) | |
bool | IsValid () const |
bool | operator< (const InstanceId &rhs) const |
bool | operator== (const InstanceId &rhs) const |
bool | operator!= (const InstanceId &rhs) const |
template<class StringType > | |
StringType | ToString () const |
template<class StringType > | |
void | ToString (StringType &result) const |
Static Public Member Functions | |
static InstanceId | CreateFromAsset (const Asset< AssetData > &asset) |
static InstanceId | CreateFromAssetId (const AssetId &assetId) |
static InstanceId | CreateName (const char *name) |
static InstanceId | CreateData (const void *data, size_t dataSize) |
static InstanceId | CreateRandom () |
Public Attributes | |
Uuid | m_guid = Uuid::CreateNull() |
uint32_t | m_subId = 0 |
void * | m_versionId = nullptr |
InstanceId is a unique identifier for an Instance in an InstanceDatabase. Instances are used primarily to control de-duplication of 'instances' created from 'assets'. As a result, this class mirrors the structure of asset id (by including the sub-id) in order to make translation easy. However, the types are not related in order to add some type safety to the system.
|
static |
Creates an InstanceId by hashing the provided data.
|
static |
Creates an instance id from an asset. The instance id will share the same guid, sub id, and an opaque pointer value to identify a specific version of an asset. This is a create method rather than a constructor in order to make it explicit.
|
static |
Creates an instance id from an asset id. The two will share the same guid and sub id. This is a create method rather than a constructor in order to make it explicit.
|
static |
Creates an InstanceId by hashing the provided name.
|
static |
Creates a random InstanceId.