aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/Resource.h
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-11-30 17:27:16 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-11-30 17:27:16 +0100
commitb8194e02679dc88f5c0a240da83a4700ec5200cf (patch)
tree216e2e28793fce2d468b23fa9b5d2a17db32012b /src/crepe/Resource.h
parent9eff2e24fa4cf0ffad2b47cc922a6558bc1a9fa1 (diff)
add doxygen comments + clean up
Diffstat (limited to 'src/crepe/Resource.h')
-rw-r--r--src/crepe/Resource.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/crepe/Resource.h b/src/crepe/Resource.h
index a0c8859..a2d65df 100644
--- a/src/crepe/Resource.h
+++ b/src/crepe/Resource.h
@@ -6,21 +6,19 @@ class ResourceManager;
class Asset;
/**
- * Resource is an interface class used to represent a (deserialized) game
- * resource (e.g. textures, sounds).
+ * \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;
-
-private:
- /**
- * The resource manager uses \c clone to create new instances of the concrete
- * resource class. This may be used to inherit references to classes that
- * would otherwise need to be implemented as singletons.
- */
- friend class ResourceManager;
};
} // namespace crepe