summaryrefslogtreecommitdiff
path: root/src/cachestore.h
blob: 5b5235980523b55850ef5168ab01797777429316 (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
#ifndef BU_CACHE_STORE_H
#define BU_CACHE_STORE_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 obtype, class keytype>
	class CacheStore
	{
	public:
		CacheStore()
		{
		}

		virtual ~CacheStore()
		{
		}

		virtual obtype *load( const keytype &key )=0;
		virtual void unload( obtype *pObj, const keytype &key )=0;
		virtual keytype create( obtype *pSrc )=0;
		virtual void destroy( obtype *pObj, const keytype &key )=0;

	private:
	};
};

#endif