aboutsummaryrefslogtreecommitdiff
path: root/src/cachehandler.h
blob: 3b26970a398d8acebf565af18737fd44e00e9bab (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
30
31
32
33
34
#ifndef BU_CACHE_HANDLER_H
#define BU_CACHE_HANDLER_H

#include "bu/cptr.h"

namespace Bu
{
	/**
	 * Handles I/O for data in the cache.  This also assigns ID's to the newly
	 * created objects that are requested through this system.
	 */
	template<class T>
	class CacheHandler
	{
	public:
		CacheHandler()
		{
		}

		virtual ~CacheHandler()
		{
		}

		virtual Bu::CPtr<T> load()=0;
		virtual void unload( Bu::CPtr<T> pObj )=0;
		virtual Bu::CPtr<T> create()=0;
		virtual Bu::CPtr<T> create( T &rSrc )=0;
		virtual void destroy( Bu::CPtr<T> pObj )=0;

	private:
	};
};

#endif