Alientech 0.01
An extendable game engine
C:/Alientech/TestWTF/CACHDirectory.h
Go to the documentation of this file.
00001 #ifndef C_ACH_DIRECTORY_H
00002 #define C_ACH_DIRECTORY_H
00003 #include <vector>
00004 #include "ACHCommonUtils.h"
00005 #include "CACHFile.h"
00006 using namespace std;
00007 
00014 class ACHDirectory
00015 {
00016 private:
00017         vector<ACHDirectory*> subdirectories;
00018         vector<ACHFile*> files;
00019 
00020         string name;
00021         ACHDirectory* parent;
00022 public:
00027         ACHDirectory(ACHDirectory* Parent=NULL, string Name="root");
00028 
00030         string getName();
00031 
00033         ACHDirectory* getParent();
00034 
00036         vector<string> getListOfFiles();
00037 
00039         vector<string> getListOfSubdirs();
00040 
00044         void print(string pre="");
00045 
00049         void setName(string NewName);
00050 
00054         void setParent(ACHDirectory* NewParent);
00055 
00059         void addSubdir(ACHDirectory* subdirectory);
00060 
00064         void addFile(ACHFile* file);
00065 
00070         bool containsSubdir(string DirectoryName);
00071 
00076         bool containsFile(string FileName);
00077 
00081         static ACHDirectory* readDirectory(ifstream* file);
00082 
00087         void destroy();
00088 };
00089 
00090 
00091 #endif //C_ACH_DIRECTORY_H