blob: eceb15b9e7b0d229a21213d616d9ddf199dc669f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#pragma once
namespace crepe {
class ResourceManager;
class Asset;
/**
* \brief Resource interface
*
* Resource is an interface class used to represent a (deserialized) game resource (e.g.
* textures, sounds). Resources are always created from \ref Asset "assets" by ResourceManager.
*
* The game programmer has the ability to use the ResourceManager to keep instances of concrete
* resources between scenes, preventing them from being reinstantiated during a scene
* transition.
*/
class Resource {
public:
Resource(const Asset & src);
virtual ~Resource() = default;
Resource(const Resource &) = delete;
Resource(Resource &&) = delete;
Resource & operator=(const Resource &) = delete;
Resource & operator=(Resource &&) = delete;
};
} // namespace crepe
|