aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/Resource.h
blob: a0c8859317c251d498fa772afef42a568e7d0aef (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
#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