From f16f239688b632fc54684c3e0e1430fd89a67db5 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 3 Jun 2011 07:18:23 +0000 Subject: I added basic support for "opaque" type variables. I think there's one more tweak to it that I would like to make, but it's fine for now. I also added open, close, read, and write functions. They work just fine, but I'll also add a readLine function, and maybe even a readToken function later. --- src/filemgr.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/filemgr.h (limited to 'src/filemgr.h') 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 @@ +#ifndef FILE_MGR_H +#define FILE_MGR_H + +#include +#include +#include + +class FileMgr : public Bu::Singleton +{ +friend class Bu::Singleton; +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 FileHash; + FileHash hFile; + int iNextId; +}; + +#endif -- cgit v1.2.3