galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
Loader.hpp
Go to the documentation of this file.
1
7
8#ifndef GALAXY_RESOURCE_LOADER_HPP_
9#define GALAXY_RESOURCE_LOADER_HPP_
10
11#include <memory>
12
14
15namespace galaxy
16{
22 template<typename Resource>
23 requires meta::not_memory<Resource> && meta::is_class<Resource>
24 struct Loader
25 {
35 template<typename... Args>
36 inline std::shared_ptr<Resource> operator()(Args&&... args)
37 {
38 return std::make_shared<Resource>(std::forward<Args>(args)...);
39 }
40 };
41} // namespace galaxy
42
43#endif
Animated.cpp galaxy.
Definition Animated.cpp:16
Loads resources for a resource cache.
Definition Loader.hpp:25
std::shared_ptr< Resource > operator()(Args &&... args)
Overloaded operator() used to load a resource.
Definition Loader.hpp:36