00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef __NEFILEMANAGER_H
00028 #define __NEFILEMANAGER_H
00029
00030
00037 #include "base.h"
00038
00039 #include <string>
00040
00041
00042 namespace NeoEngine
00043 {
00044
00045
00046
00047 class Package;
00048 class Directory;
00049 class File;
00050 class FileCodec;
00051
00052
00053
00058 class NEOENGINE_API FileManager
00059 {
00060 protected:
00061
00063 static int s_iFileManagers;
00064
00065
00066 protected:
00067
00069 std::string m_strName;
00070
00072 Directory *m_pkRoot;
00073
00075 bool m_bChanged;
00076
00077
00078 public:
00079
00083 FileManager( const std::string &rstrName );
00084
00088 virtual ~FileManager();
00089
00096 static bool LoadCodec( int iFileFlag, const std::string &rstrName );
00097
00103 static FileCodec *FindCodec( int iFileFlag );
00104
00110 bool AddPackage( const std::string &rstrPackage );
00111
00117 File *GetByName( const std::string &rstrName );
00118
00122 Directory *GetRoot() { return m_pkRoot; }
00123
00127 void Clear();
00128
00133 bool HasChanged();
00134
00139 void PrintHierarchy( int iDepth = 0 );
00140 };
00141
00142
00143 };
00144
00145
00146 #endif