aboutsummaryrefslogtreecommitdiff
path: root/src/filemgr.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/filemgr.h')
-rw-r--r--src/filemgr.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/filemgr.h b/src/filemgr.h
new file mode 100644
index 0000000..517e784
--- /dev/null
+++ b/src/filemgr.h
@@ -0,0 +1,26 @@
1#ifndef FILE_MGR_H
2#define FILE_MGR_H
3
4#include <bu/singleton.h>
5#include <bu/hash.h>
6#include <bu/file.h>
7
8class FileMgr : public Bu::Singleton<FileMgr>
9{
10friend class Bu::Singleton<FileMgr>;
11private:
12 FileMgr();
13 virtual ~FileMgr();
14
15public:
16 int open( const Bu::String &sPath, int iMode );
17 Bu::File &get( int iId );
18 void close( int iId );
19
20private:
21 typedef Bu::Hash<int, Bu::File *> FileHash;
22 FileHash hFile;
23 int iNextId;
24};
25
26#endif