Open Search
    CategoryAssetInterface Class Reference

    #include <category_asset.h>

    Inheritance diagram for CategoryAssetInterface:

    Detailed Description

    Implementation of category assets.

    Static Public Member Functions

    static MAXON_METHOD Result< CategoryAsset > Create ()
     
    static MAXON_METHOD Id GetParentCategory (const AssetDescription &asset)
     
    static MAXON_METHOD Result< void > SetAssetCategory (const AssetDescription &asset, const Id &category)
     
    static MAXON_METHOD Result< BaseArray< String > > GetAssetBreadcrumbString (const AssetDescription &asset, const AssetRepositoryRef &repository)
     

    Private Member Functions

     MAXON_INTERFACE (CategoryAssetInterface, MAXON_REFERENCE_COPY_ON_WRITE, "net.maxon.interface.categoryasset")
     

    Member Function Documentation

    ◆ MAXON_INTERFACE()

    MAXON_INTERFACE ( CategoryAssetInterface  ,
    MAXON_REFERENCE_COPY_ON_WRITE  ,
    "net.maxon.interface.categoryasset"   
    )
    private

    ◆ Create()

    static MAXON_METHOD Result<CategoryAsset> Create ( )
    static

    Create creates a new category asset.

    Returns
    CategoryAsset on success.

    ◆ GetParentCategory()

    static MAXON_METHOD Id GetParentCategory ( const AssetDescription &  asset)
    static

    GetParentCategory returns the category id of the given asset.

    Parameters
    [in]assetAsset to investigate.
    Returns
    Category id on success.

    ◆ SetAssetCategory()

    static MAXON_METHOD Result<void> SetAssetCategory ( const AssetDescription &  asset,
    const Id category 
    )
    static

    SetAssetCategory allows to move an asset into a category.

    Parameters
    [in]assetasset to move.
    [in]categoryCategory to use.
    Returns
    OK on success.

    ◆ GetAssetBreadcrumbString()

    static MAXON_METHOD Result<BaseArray<String> > GetAssetBreadcrumbString ( const AssetDescription &  asset,
    const AssetRepositoryRef &  repository 
    )
    static

    GetAssetBreadcrumbString returns the asset parent categories as string.

    Parameters
    [in]assetAsset to investigate.
    [in]repositoryRepository to use.
    Returns
    Breadcrumb as string array. Example: "Category3, Category2, Category1". You can use this to create the final string: String x = JoinElements(array, " > "_s)