CreatePresetAssetStruct Class Reference

#include <base_preset_asset.h>

Inheritance diagram for CreatePresetAssetStruct:

Detailed Description

Helper class to create a new preset asset.

Public Member Functions

 CreatePresetAssetStruct (const String &name, const PresetSaveArgs &sourceData, ResolveAssetDependenciesStruct::ResolveDelegate &&resolveDependenciesDelegate, const Id &parentCategory, const AssetRepositoryRef &saveRepository, const AssetRepositoryRef &lookupRepository)
 
Result< void > StoreMetaData (const InternedId &attr, ForwardingDataPtr &&data, AssetMetaDataInterface::KIND kind)
 
template<typename ATTR >
MAXON_FUNCTION Result< void > StoreMetaData (const ATTR &attr, typename ATTR::ValueType &&data, AssetMetaDataInterface::KIND kind)
 
template<typename ATTR >
MAXON_FUNCTION Result< void > StoreMetaData (const ATTR &attr, const typename ATTR::ValueType &data, AssetMetaDataInterface::KIND kind)
 
- Public Member Functions inherited from AddAssetDepencendyStruct
 AddAssetDepencendyStruct ()
 
 AddAssetDepencendyStruct (const Id &parentCategory, const AssetRepositoryRef &saveRepository, const AssetRepositoryRef &lookupRepository)
 
 AddAssetDepencendyStruct (AddAssetDepencendyStruct &&src)=default
 
 MAXON_OPERATOR_MOVE_ASSIGNMENT (AddAssetDepencendyStruct)
 
maxon::Result< void > CopyFrom (const AddAssetDepencendyStruct &src)
 
Result< void > AddDependency (AssetDependencyStruct &&assetDependency)
 
Result< void > AddDependency (const AssetDescription &depAsset)
 
Result< AssetDescription > AddDependency (const Id &depAssetId)
 
const HashSet< AssetDependencyStruct > & GetDependencies () const
 
- Public Member Functions inherited from StoreAssetStruct
 StoreAssetStruct ()
 
 StoreAssetStruct (const Id &parentCategory, const AssetRepositoryRef &saveRepository, const AssetRepositoryRef &lookupRepository)
 

Public Attributes

String _name
 
PresetSaveArgs _sourceData
 
ResolveAssetDependenciesStruct _resolveAssets
 
BasePresetAsset _resAsset
 
Url _resPreviewUrl
 
AddAssetMetaData _resMetaData
 
- Public Attributes inherited from StoreAssetStruct
Id _parentCategory
 
AssetRepositoryRef _saveRepository
 
AssetRepositoryRef _lookupRepository
 

Constructor & Destructor Documentation

◆ CreatePresetAssetStruct()

CreatePresetAssetStruct ( const String name,
const PresetSaveArgs sourceData,
ResolveAssetDependenciesStruct::ResolveDelegate &&  resolveDependenciesDelegate,
const Id parentCategory,
const AssetRepositoryRef &  saveRepository,
const AssetRepositoryRef &  lookupRepository 
)

CreatePresetAssetStruct description.

Parameters
[in]nameName of the asset/preset.
[in]sourceDataSource data to copy into the asset.
[in]resolveDependenciesDelegatehelper delegate to resolve dependencies.
[in]parentCategoryParent category to set.
[in]saveRepositoryRepository to save the asset in.
[in]lookupRepositoryRepository to search for dependencies.

Member Function Documentation

◆ StoreMetaData() [1/3]

Result<void> StoreMetaData ( const InternedId attr,
ForwardingDataPtr &&  data,
AssetMetaDataInterface::KIND  kind 
)

StoreMetaData stores additional metadata for this preset.

Parameters
[in]attrAttribute Id.
[in]dataData to store.
[in]kindAsset Kind.
Returns
OK on success.

◆ StoreMetaData() [2/3]

MAXON_FUNCTION Result<void> StoreMetaData ( const ATTR &  attr,
typename ATTR::ValueType &&  data,
AssetMetaDataInterface::KIND  kind 
)

StoreMetaData stores additional metadata for this preset.

Parameters
[in]attrAttribute Id.
[in]dataData to store.
[in]kindAsset Kind.
Returns
OK on success.

◆ StoreMetaData() [3/3]

MAXON_FUNCTION Result<void> StoreMetaData ( const ATTR &  attr,
const typename ATTR::ValueType &  data,
AssetMetaDataInterface::KIND  kind 
)

StoreMetaData stores additional metadata for this preset.

Parameters
[in]attrAttribute Id.
[in]dataData to store.
[in]kindAsset Kind.
Returns
OK on success.

Member Data Documentation

◆ _name

String _name

◆ _sourceData

PresetSaveArgs _sourceData

◆ _resolveAssets

◆ _resAsset

BasePresetAsset _resAsset

◆ _resPreviewUrl

Url _resPreviewUrl

◆ _resMetaData

AddAssetMetaData _resMetaData