AssetIdentifierInterface Class Reference

#include <assets.h>

Inheritance diagram for AssetIdentifierInterface:

Detailed Description

The base interface of AssetBaseInterface and AssetLinkInterface. It contains their common methods to obtain type, identifier and version.

Public Member Functions

const MAXON_METHOD IdGetTypeId () const
 
const MAXON_METHOD IdAndVersionGetIdAndVersion () const
 
const MAXON_FUNCTION IdGetId () const
 
const MAXON_FUNCTION IdGetVersion () const
 

Static Public Attributes

static const LiteralId VIRTUAL
 

Private Member Functions

 MAXON_INTERFACE (AssetIdentifierInterface, MAXON_REFERENCE_COPY_ON_WRITE, "net.maxon.interface.assetidentifier")
 

Member Function Documentation

◆ MAXON_INTERFACE()

MAXON_INTERFACE ( AssetIdentifierInterface  ,
MAXON_REFERENCE_COPY_ON_WRITE  ,
"net.maxon.interface.assetidentifier"   
)
private

◆ GetTypeId()

const MAXON_METHOD Id& GetTypeId ( ) const

Returns the identifier of the AssetType of this asset.

Returns
Identifier of the AssetType of this asset.

◆ GetIdAndVersion()

const MAXON_METHOD IdAndVersion& GetIdAndVersion ( ) const

Returns the identifier and version of this asset as a tuple.

Returns
(identifier, version) of this asset.

◆ GetId()

const MAXON_FUNCTION Id& GetId ( ) const

Returns the identifier of this asset. Asset identifiers have to be globally unique.

Returns
Asset identifier (empty for an Asset which doesn't belong to a repository).

◆ GetVersion()

const MAXON_FUNCTION Id& GetVersion ( ) const

Returns the version of this asset. Version identifiers are assigned by repositories when assets are stored, typically this is a hash value derived from the asset content or a UUID. In general two assets should have equal version identifiers only if they have equal content.

Returns
Asset version identifier (empty for an Asset which doesn't belong to a repository).

Member Data Documentation

◆ VIRTUAL

const LiteralId VIRTUAL
static

VIRTUAL is used as version identifier for assets which can't be re-obtained from a repository by their identifier. The typical use case is for dynamically created assets which get an identifier just for clarity, but not to actually identify them. References to virtual assets can't be serialized.