#include <assets.h>
AssetMetaData allows to query the meta data of an asset. It is returned by AssetDescriptionInterface::GetMetaData. The methods of this interface are thread-safe, but the meta data of an asset may be changed concurrently, so the returned values may differ from call to call even when the calling thread made no modification inbetween.
You can't modify the meta data of an asset through this interface, you have to use AssetDescriptionInterface::StoreMetaData instead.
Public Types | |
enum class | KIND { NONE , READ_ONLY , PERSISTENT , VERSION , DERIVED , USER , MASK , IGNORE_READ_ONLY } |
Public Member Functions | |
enum maxon::AssetMetaDataInterface::KIND | MAXON_ENUM_FLAGS_CLASS (KIND) |
MAXON_METHOD Result< BaseArray< Tuple< InternedId, KIND > > > | GetExistingEntries () const |
MAXON_METHOD Result< Data > | Get (const InternedId &metaId) const |
template<typename T > | |
MAXON_FUNCTION Result< Opt< T > > | Get (const InternedId &metaId) const |
template<typename ATTR > | |
MAXON_FUNCTION Result< Opt< typename ATTR::ValueType > > | Get () const |
template<typename ATTR > | |
MAXON_FUNCTION Result< Opt< typename ATTR::ValueType > > | Get (const ATTR &attr) const |
template<typename ATTR > | |
MAXON_FUNCTION Result< typename ATTR::ValueType > | Get (const ATTR &attr, const typename ATTR::ValueType &defaultValue) const |
MAXON_METHOD Int | GetTimeStamp (const InternedId &metaId) const |
MAXON_METHOD Result< void > | PrivateGet (const InternedId &metaId, const DataType &type, Generic *mem) const |
Private Member Functions | |
MAXON_INTERFACE (AssetMetaDataInterface, MAXON_REFERENCE_CONST, "net.maxon.interface.assetmetadata") | |
Static Private Member Functions | |
static MAXON_METHOD const AssetMetaDataInterface * | NullValuePtr () |
|
strong |
This enum defines flags for the kind of a meta data entry.
Enumerator | |
---|---|
NONE | No flag set. |
READ_ONLY | The meta data is read-only, for example the AssetTimeStamp. |
PERSISTENT | The meta data is persistent. |
VERSION | The meta data is tied to the version so that it isn't copied to a new version, for example the AssetVersionTag. |
DERIVED | The meta data is derived from the asset and other meta data. |
USER | The meta data should be stored in user folder. |
MASK | A mask for all regular flags. |
IGNORE_READ_ONLY | This flag is only used as argument for AssetRepositoryInterface::StoreMetaData to ignore the READ_ONLY flag. |
|
private |
enum maxon::AssetMetaDataInterface::KIND MAXON_ENUM_FLAGS_CLASS | ( | KIND | ) |
MAXON_METHOD Result<BaseArray<Tuple<InternedId, KIND> > > GetExistingEntries | ( | ) | const |
Returns an array with the current set of meta data entries.
MAXON_METHOD Result<Data> Get | ( | const InternedId & | metaId | ) | const |
Returns the current value of the meta data entry for the meta data attribute #metaId.
[in] | metaId | The identifier of the meta data attribute. |
MAXON_FUNCTION Result<Opt<T> > Get | ( | const InternedId & | metaId | ) | const |
Returns the current value of the meta data entry for the meta data attribute #metaId.
[in] | metaId | The identifier of the meta data attribute. |
T | The type of the meta data attribute. |
MAXON_FUNCTION Result<Opt<typename ATTR::ValueType> > Get | ( | ) | const |
Returns the current value of the meta data entry for the meta data attribute ATTR.
ATTR | The attribute for which the value shall be returned (has to be declared with MAXON_ATTRIBUTE). |
MAXON_FUNCTION Result<Opt<typename ATTR::ValueType> > Get | ( | const ATTR & | attr | ) | const |
Returns the current value of the meta data entry for the meta data attribute #attr.
[in] | attr | The attribute for which the value shall be returned (has to be declared with MAXON_ATTRIBUTE). |
MAXON_FUNCTION Result<typename ATTR::ValueType> Get | ( | const ATTR & | attr, |
const typename ATTR::ValueType & | defaultValue | ||
) | const |
Returns the current value of the meta data entry for the meta data attribute #attr.
[in] | attr | The attribute for which the value shall be returned (has to be declared with MAXON_ATTRIBUTE). |
[in] | defaultValue | The default value to use when there is no entry. |
MAXON_METHOD Int GetTimeStamp | ( | const InternedId & | metaId | ) | const |
Returns the time stamp for the meta data attribute #metaId. The time stamp is increased each time the value changes.
[in] | metaId | The identifier of the meta data attribute. |
|
staticprivate |
MAXON_METHOD Result<void> PrivateGet | ( | const InternedId & | metaId, |
const DataType & | type, | ||
Generic * | mem | ||
) | const |