33#ifndef DVD_RESOURCE_H_
34#define DVD_RESOURCE_H_
70 explicit Resource( std::string_view resourceName, std::string_view typeName );
111 template<
typename T>
requires std::is_base_of_v<CachedResource, T>
132 [[nodiscard]]
size_t getHash()
const override;
145 template <
typename T>
153 [[nodiscard]]
size_t getHash() const final;
friend struct ResourceLoader
PROPERTY_RW(ResourcePath, assetLocation)
PROPERTY_RW(Str< 256 >, assetName)
void setState(ResourceState currentState) final
PROPERTY_R(size_t, descriptorHash)
Utility class that adds basic GUID management to objects.
PROPERTY_R(Str< 32 >, typeName)
std::atomic< ResourceState > _resourceState
ResourceState getState() const noexcept
PROPERTY_R(Str< 256 >, resourceName)
virtual void setState(ResourceState currentState)
Handle console commands that start with a forward slash.
FORCE_INLINE bool operator!=(const GUIDWrapper &lhs, const GUIDWrapper &rhs) noexcept
bool SafeToDelete(Resource *res)
@ RES_UNLOADING
The resource is unloading, deleting data, etc.
@ RES_LOADED
The resource is available for usage.
@ RES_THREAD_LOADED
The resource is loaded but not yet available.
@ RES_CREATED
The pointer has been created and instantiated, but no data has been loaded.
@ RES_LOADING
The resource is loading, creating data, parsing scripts, etc.
@ RES_UNKNOWN
The resource exists, but it's state is undefined.
size_t GetHash(const PropertyDescriptor< T > &descriptor) noexcept
void WaitForReady(Resource *res)
bool operator==(const DisplayManager::OutputDisplayProperties &lhs, const DisplayManager::OutputDisplayProperties &rhs) noexcept
static const vec3< F32 > VECTOR3_ZERO
PROPERTY_RW(bool, flag, false)
PROPERTY_RW(bool, waitForReady, true)
PROPERTY_RW(vec3< U32 >, data, VECTOR3_ZERO)
general data
PROPERTY_RW(P32, mask)
4 bool values representing ... anything ...
PROPERTY_RW(ResourcePath, assetLocation)
Can't be fixed size due to the need to handle array textures, cube maps, etc.
size_t getHash() const override
PROPERTY_RW(Str< 256 >, assetName)
Resource instance name (for lookup)
PROPERTY_RW(Str< 256 >, resourceName)
PROPERTY_RW(U32, enumValue, 0u)
size_t getHash() const final
PropertyDescriptor< T > _propertyDescriptor