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

MAXON_METHOD const IdGetTypeId () const
 
MAXON_METHOD const IdAndVersionGetIdAndVersion () const
 
MAXON_FUNCTION const IdGetId () const
 
MAXON_FUNCTION const 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()

MAXON_METHOD const Id& GetTypeId ( ) const

Returns the identifier of the AssetType of this asset.

Returns
Identifier of the AssetType of this asset.

◆ GetIdAndVersion()

MAXON_METHOD const IdAndVersion& GetIdAndVersion ( ) const

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

Returns
(identifier, version) of this asset.

◆ GetId()

MAXON_FUNCTION const 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()

MAXON_FUNCTION const 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.