NodeDescriptionAssetTypeInterface Class Reference

#include <nodedescription_asset.h>

Inheritance diagram for NodeDescriptionAssetTypeInterface:

Detailed Description

Type interface for NodeDescriptionAsset. Allows to create new assets from a description and load descriptions from existing assets.

Public Member Functions

MAXON_METHOD Id GetSuggestedCategory () const
 

Static Public Member Functions

static MAXON_METHOD Result< AssetDescription > StoreAsset (const DataDescriptionDefinitionWithUIAndLanguageStrings &desc, const AssetRepositoryRef &repo, const Id &assetId)
 
static MAXON_METHOD Result< NodeDescriptionAsset > LoadAsset (const AssetDescription &desc)
 

Private Member Functions

 MAXON_INTERFACE (NodeDescriptionAssetTypeInterface, MAXON_REFERENCE_CONST, "net.maxon.node.interface.asset.nodedescriptiontype")
 

Member Function Documentation

◆ MAXON_INTERFACE()

MAXON_INTERFACE ( NodeDescriptionAssetTypeInterface  ,
MAXON_REFERENCE_CONST  ,
"net.maxon.node.interface.asset.nodedescriptiontype"   
)
private

◆ GetSuggestedCategory()

MAXON_METHOD Id GetSuggestedCategory ( ) const

Reads the default category identifier as suggested by the asset type.

Returns
The category identifier. Empty if no default suggestion.

◆ StoreAsset()

static MAXON_METHOD Result<AssetDescription> StoreAsset ( const DataDescriptionDefinitionWithUIAndLanguageStrings desc,
const AssetRepositoryRef &  repo,
const Id assetId 
)
static

Creates and stores a complete description in a new NodeDescriptionAsset with identifier #assetId. AssetUtilitiesInterface::AssetSetMetaData can be called afterwards to setup name, version, ...

Parameters
[in]descThe description to store. Categories are all optional.
[in]repoThe destination repository.
[in]assetIdThe final NodeDescriptionAsset's identifier.
Returns
The new AssetDescription on success.

◆ LoadAsset()

static MAXON_METHOD Result<NodeDescriptionAsset> LoadAsset ( const AssetDescription &  desc)
static

Loads the asset with all categories (including string languages).

Parameters
[in]descThe asset to load.
Returns
The asset with all categories reading to be used.