#include <engine/assets/asset.hpp>
template<typename T>
Asset class
Handle to an asset of a specific type.
Template parameters | |
---|---|
T | Type of the asset. |
Base classes
- class AnyAsset
- Handle to an asset of any type. May either be weak or strong. Weak handles do not guarantee the asset is loaded, while strong handles do.
Constructors, destructors, conversion operators
- AnyAsset(std::nullptr_t ptr = nullptr)
- Constructs a null handle.
- AnyAsset(uuids::uuid id)
- Constructs a weak handle.
- AnyAsset(std::string_view str)
- Constructs a weak handle. If the string is not a valid UUID, the handle will be null.
- AnyAsset(const AnyAsset& other)
- Constructs a copy of the given handle.
- AnyAsset(AnyAsset&& other) noexcept
- Constructs a handle from the given handle.
Public functions
Function documentation
template<typename T>
cubos:: engine:: Asset<T>:: AnyAsset(uuids::uuid id)
Constructs a weak handle.
Parameters | |
---|---|
id | UUID of the asset. |
template<typename T>
cubos:: engine:: Asset<T>:: AnyAsset(std::string_view str)
Constructs a weak handle. If the string is not a valid UUID, the handle will be null.
Parameters | |
---|---|
str | String representation of the UUID. |