Open Search
    UpdatableAssetInterface Class Reference

    #include <assets.h>

    Inheritance diagram for UpdatableAssetInterface:

    Detailed Description

    An UpdatableAsset is an Asset which supports the update of its updatable references to other assets to newer versions. Such an update doesn't create a new repository version of the asset because the asset definition itself isn't changed, only the references (represented by AssetLink) point to newer assets.

    Public Member Functions

    MAXON_METHOD Result< void > Update (const Block< const Tuple< AssetReference, AssetBase >> &updates, const AssetRepositoryRef &repository)
     

    Private Member Functions

     MAXON_INTERFACE (UpdatableAssetInterface, MAXON_REFERENCE_COPY_ON_WRITE, "net.maxon.interface.updatableasset")
     

    Member Function Documentation

    ◆ MAXON_INTERFACE()

    MAXON_INTERFACE ( UpdatableAssetInterface  ,
    MAXON_REFERENCE_COPY_ON_WRITE  ,
    "net.maxon.interface.updatableasset"   
    )
    private

    ◆ Update()

    MAXON_METHOD Result<void> Update ( const Block< const Tuple< AssetReference, AssetBase >> &  updates,
    const AssetRepositoryRef &  repository 
    )

    Updates the given references of this asset to point to the corresponding assets. The references have to use updatable AssetLink objects (their update policy must not be ASSET_UPDATE_POLICY::NEVER). Afterwards the update counter is incremented.

    Parameters
    [in]updatesThe updates to apply as a block of the references and their new targets.
    [in]repositoryThe repository to which this asset belongs. {asset.GetRepository()} will be nullptr during the update because the asset is in mutable state.