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
13
#include "
galaxy/meta/Concepts.hpp
"
14
15
namespace
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
Concepts.hpp
galaxy::meta::is_class
Only class concept.
Definition
Concepts.hpp:27
galaxy::meta::not_memory
Concept to restrict templates to not pointers and not references.
Definition
Concepts.hpp:37
galaxy
Application.hpp galaxy.
Definition
Application.cpp:35
galaxy::Loader
Loads resources for a resource cache.
Definition
Loader.hpp:25
galaxy::Loader::operator()
std::shared_ptr< Resource > operator()(Args &&... args)
Overloaded operator() used to load a resource.
Definition
Loader.hpp:36
galaxy
src
galaxy
resource
Loader.hpp
Generated on
for galaxy by
1.17.0