You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Core/GameEngine/Include/Common/ArchiveFile.h
+20-20Lines changed: 20 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -35,13 +35,13 @@
35
35
classFile;
36
36
37
37
/**
38
-
* An archive file is itself a collection of sub files. Each file inside the archive file
39
-
* has a unique name by which it can be accessed. The ArchiveFile object class is the
40
-
* runtime interface to the mix file and the sub files. Each file inside the mix
41
-
* file can be accessed by the openFile().
42
-
*
43
-
* ArchiveFile interfaces can be created by the TheArchiveFileSystem object.
44
-
*/
38
+
* An archive file is itself a collection of sub files. Each file inside the archive file
39
+
* has a unique name by which it can be accessed. The ArchiveFile object class is the
40
+
* runtime interface to the mix file and the sub files. Each file inside the mix
41
+
* file can be accessed by the openFile().
42
+
*
43
+
* ArchiveFile interfaces can be created by the TheArchiveFileSystem object.
44
+
*/
45
45
//===============================
46
46
47
47
classArchiveFile
@@ -50,23 +50,23 @@ class ArchiveFile
50
50
ArchiveFile();
51
51
virtual~ArchiveFile();
52
52
53
-
virtual BoolgetFileInfo(const AsciiString& filename, FileInfo *fileInfo) const = 0;///< fill in the fileInfo struct with info about the file requested.
54
-
virtual File*openFile(const Char *filename, Int access = 0) = 0;///< Open the specified file within the archive file
55
-
virtualvoidcloseAllFiles() = 0;///< Close all file opened in this archive file
56
-
virtual AsciiStringgetName() = 0;///< Returns the name of the archive file
57
-
virtual AsciiStringgetPath() = 0;///< Returns full path and name of archive file
58
-
virtualvoidsetSearchPriority(Int new_priority) = 0;///< Set this archive file's search priority
59
-
virtualvoidclose() = 0;///< Close this archive file
60
-
voidattachFile(File *file);
53
+
virtual BoolgetFileInfo(const AsciiString& filename, FileInfo* fileInfo) const = 0;///< fill in the fileInfo struct with info about the file requested.
54
+
virtual File*openFile(const Char* filename, Int access = 0) = 0;///< Open the specified file within the archive file
55
+
virtualvoidcloseAllFiles() = 0;///< Close all file opened in this archive file
56
+
virtual AsciiStringgetName() = 0;///< Returns the name of the archive file
57
+
virtual AsciiStringgetPath() = 0;///< Returns full path and name of archive file
58
+
virtualvoidsetSearchPriority(Int new_priority) = 0;///< Set this archive file's search priority
59
+
virtualvoidclose() = 0;///< Close this archive file
* Creates and manages ArchiveFile interfaces. ArchiveFiles can be accessed
74
-
* by calling the openArchiveFile() member. ArchiveFiles can be accessed by
75
-
* name or by File interface.
76
-
*
77
-
* openFile() member searches all Archive files for the specified sub file.
78
-
*/
72
+
* Creates and manages ArchiveFile interfaces. ArchiveFiles can be accessed
73
+
* by calling the openArchiveFile() member. ArchiveFiles can be accessed by
74
+
* name or by File interface.
75
+
*
76
+
* openFile() member searches all Archive files for the specified sub file.
77
+
*/
79
78
//===============================
80
79
classArchivedDirectoryInfo;
81
80
classDetailedArchivedDirectoryInfo;
82
81
classArchivedFileInfo;
83
82
84
83
typedef std::map<AsciiString, DetailedArchivedDirectoryInfo> DetailedArchivedDirectoryInfoMap; // Archived directory name to detailed archived directory info
85
-
typedef std::map<AsciiString, ArchivedDirectoryInfo> ArchivedDirectoryInfoMap; // Archived directory name to archived directory info
86
-
typedef std::map<AsciiString, ArchivedFileInfo> ArchivedFileInfoMap; // Archived file name to archived file info
87
-
typedef std::map<AsciiString, ArchiveFile*> ArchiveFileMap; // Archive file name to archive data
88
-
typedef std::multimap<AsciiString, ArchiveFile*> ArchivedFileLocationMap; // Archived file name to archive data
84
+
typedef std::map<AsciiString, ArchivedDirectoryInfo> ArchivedDirectoryInfoMap; // Archived directory name to archived directory info
85
+
typedef std::map<AsciiString, ArchivedFileInfo> ArchivedFileInfoMap; // Archived file name to archived file info
86
+
typedef std::map<AsciiString, ArchiveFile*> ArchiveFileMap;// Archive file name to archive data
87
+
typedef std::multimap<AsciiString, ArchiveFile*> ArchivedFileLocationMap;// Archived file name to archive data
89
88
90
89
classArchivedDirectoryInfo
91
90
{
92
91
public:
93
-
AsciiStringm_path; // The full path to this directory
94
-
AsciiStringm_directoryName; // The current directory
@@ -132,19 +130,19 @@ class ArchiveFileSystem : public SubsystemInterface
132
130
virtualvoidpostProcessLoad() = 0;
133
131
134
132
// ArchiveFile operations
135
-
virtual ArchiveFile*openArchiveFile(const Char *filename ) = 0;///< Create new or return existing Archive file from file name
136
-
virtualvoidcloseArchiveFile(const Char *filename ) = 0;///< Close the one specified big file.
137
-
virtualvoidcloseAllArchiveFiles() = 0;///< Close all Archive files currently open
133
+
virtual ArchiveFile*openArchiveFile(const Char* filename) = 0;///< Create new or return existing Archive file from file name
134
+
virtualvoidcloseArchiveFile(const Char* filename) = 0;///< Close the one specified big file.
135
+
virtualvoidcloseAllArchiveFiles() = 0;///< Close all Archive files currently open
138
136
139
137
// File operations
140
-
virtual File*openFile(const Char *filename, Int access = 0, FileInstance instance = 0);///< Search Archive files for specified file name and open it if found
141
-
virtualvoidcloseAllFiles() = 0;///< Close all files associated with Archive files
142
-
virtual BooldoesFileExist(const Char *filename, FileInstance instance = 0) const;///< return true if that file exists in an archive file somewhere.
138
+
virtual File*openFile(const Char* filename, Int access = 0, FileInstance instance = 0);///< Search Archive files for specified file name and open it if found
139
+
virtualvoidcloseAllFiles() = 0;///< Close all files associated with Archive files
140
+
virtual BooldoesFileExist(const Char* filename, FileInstance instance = 0) const;///< return true if that file exists in an archive file somewhere.
143
141
144
-
voidgetFileListInDirectory(const AsciiString& currentDirectory, const AsciiString& originalDirectory, const AsciiString& searchName, FilenameList &filenameList, Bool searchSubdirectories) const; ///< search the given directory for files matching the searchName (egs. *.ini, *.rep). Possibly search subdirectories. Scans each Archive file.
virtualvoidloadIntoDirectoryTree(ArchiveFile *archiveFile, Bool overwrite = FALSE);///< load the archive file's header information and apply it to the global archive directory tree.
168
+
virtualvoidloadIntoDirectoryTree(ArchiveFile* archiveFile, Bool overwrite = FALSE);///< load the archive file's header information and apply it to the global archive directory tree.
0 commit comments