#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 | KIND { NONE, READ_ONLY, PERSISTENT, VERSION, DERIVED, USER } |
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< typename T::ValueType > | Get (const T &attr, const typename T::ValueType &defaultValue=NullValue< const typename T::ValueType & >()) const |
template<typename ATTR > | |
MAXON_FUNCTION Result< Opt< typename ATTR::ValueType > > | Get () const |
MAXON_METHOD Int | GetTimeStamp (const InternedId &metaId) const |
Private Member Functions | |
MAXON_INTERFACE (AssetMetaDataInterface, MAXON_REFERENCE_CONST, "net.maxon.interface.assetmetadata") | |
Static Private Member Functions | |
static const MAXON_METHOD AssetMetaDataInterface * | NullValuePtr () |
|
strong |
This enum defines flags for the kind of a meta data entry.
|
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<typename T::ValueType> Get | ( | const T & | attr, |
const typename T::ValueType & | defaultValue = NullValue<const typename T::ValueType&>() |
||
) | 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 (a null value by default). |
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_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 |