12 class ResourceManager;
24 enum class Type : uint8_t {
51 explicit operator uint32_t() {
56 return value == other.
value;
67 template <
typename RhsT>
71 std::is_base_of<Resource, T>::value,
72 "T must inherit from Resource" 76 constexpr
SharedPtr(T* pointer =
nullptr);
87 T* operator->()
const;
89 explicit operator bool()
const {
90 return _resource !=
nullptr;
101 template <
typename RhsT>
105 T* _resource{
nullptr};
113 template <
typename T>
115 template <
typename RhsT>
119 std::is_base_of<Resource, T>::value,
120 "T must inherit from Resource" 124 constexpr
WeakPtr(T* pointer =
nullptr);
146 template <
typename RhsT>
150 T* _resource{
nullptr};
169 Type getType()
const;
183 const std::string& getName()
const;
190 void setName(
const std::string &name);
bool operator==(const Handle &other) const
uint32_t value
Access of the raw value of the above bytefield.
Dummy class for a weak ptr.
Dummy class for a shared pointer.
Handle of the resource. It contains informations such as the type and the index in the ResourceManage...
Class for resource manager. The ResourceManager allows the user to load resources and store them...
Type
Type of the resource.
Matrix< Rows, Columns, T > operator*(const Matrix< Rows, Columns, T > &lhs, T rhs)
uint32_t type
Type of the ressource.
uint32_t index
Index of the Resource in the ResourceManager's internal storage.