aboutsummaryrefslogtreecommitdiff
path: root/src/filemgr.h
blob: 517e78460b58c93685bb5f0075ce31c286d4f705 (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
#ifndef FILE_MGR_H
#define FILE_MGR_H

#include <bu/singleton.h>
#include <bu/hash.h>
#include <bu/file.h>

class FileMgr : public Bu::Singleton<FileMgr>
{
friend class Bu::Singleton<FileMgr>;
private:
	FileMgr();
	virtual ~FileMgr();

public:
	int open( const Bu::String &sPath, int iMode );
	Bu::File &get( int iId );
	void close( int iId );

private:
	typedef Bu::Hash<int, Bu::File *> FileHash;
	FileHash hFile;
	int iNextId;
};

#endif