diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-11 14:33:12 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-11 14:33:12 +0100 |
commit | 68bf20b491b4b7673c2ece7a6497b9faffd44eb1 (patch) | |
tree | ec0aa56081bc744b595f1665f048c4d26242884f /src/crepe/Resource.h | |
parent | f64b793ad8e796458c8e175f298e8d13eb3b3459 (diff) | |
parent | 78c4a8772526f40c531b5402b56932b0a41e22e8 (diff) |
feedback but error after conflict
Diffstat (limited to 'src/crepe/Resource.h')
-rw-r--r-- | src/crepe/Resource.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/crepe/Resource.h b/src/crepe/Resource.h new file mode 100644 index 0000000..eceb15b --- /dev/null +++ b/src/crepe/Resource.h @@ -0,0 +1,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 |