3 std::lock_guard<std::mutex> resourcesGuard(_mutex);
6 std::is_base_of<Resource, T>::value,
7 "T must inherit from Resource" 10 if (_resources.size() <= handle.
index) {
14 if (_resources[handle.
index]->getHandle() == handle) {
15 return _resources[handle.
index].get();
23 std::lock_guard<std::mutex> resourcesGuard(_mutex);
26 std::is_base_of<Resource, T>::value,
27 "T must inherit from Resource" 30 resource->_handle.index = _resources.size();
31 _resources.push_back(std::move(resource));
33 return dynamic_cast<T*
>(_resources.back().get());
Dummy class for a shared pointer.
Handle of the resource. It contains informations such as the type and the index in the ResourceManage...
uint32_t index
Index of the Resource in the ResourceManager's internal storage.