aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/Resource.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/Resource.h')
-rw-r--r--src/crepe/Resource.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/crepe/Resource.h b/src/crepe/Resource.h
new file mode 100644
index 0000000..a0c8859
--- /dev/null
+++ b/src/crepe/Resource.h
@@ -0,0 +1,26 @@
+#pragma once
+
+namespace crepe {
+
+class ResourceManager;
+class Asset;
+
+/**
+ * Resource is an interface class used to represent a (deserialized) game
+ * resource (e.g. textures, sounds).
+ */
+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