ArchiveGenerator Class Reference
[Core]
Utility class used to pack files together into an Archive file.
More...
Classes | |
| struct | DirectoryEntry |
| struct | FileEntry |
| struct | ProgressData |
Public Types | |
| enum | Phase { Phase_NotStarted, Phase_Initializing, Phase_ScanningDirectory, Phase_AddingFile, Phase_CreatingHeaders, Phase_WritingArchive, Phase_GeneratingArray, Phase_Done } |
| typedef void(* | ProgressCallback )(ProgressData &data) |
Public Member Functions | |
| ArchiveGenerator (ProgressCallback progressCallback=0) | |
| void | GenerateCPP (const char *directoryPath, const char *archiveFilename, const char *archiveName) |
| void | GenerateFile (const char *directoryPath, const char *archiveFilename) |
Detailed Description
Utility class used to pack files together into an Archive file.With this utility class, you can very easily pack your game data together in one big Archive file, which can be used to speed up loading times.
Definition at line 24 of file ArchiveGenerator.h.
Member Typedef Documentation
| typedef void(* ArchiveGenerator::ProgressCallback)(ProgressData &data) |
Definition at line 43 of file ArchiveGenerator.h.
Member Enumeration Documentation
- Enumerator:
-
Phase_NotStarted Phase_Initializing Phase_ScanningDirectory Phase_AddingFile Phase_CreatingHeaders Phase_WritingArchive Phase_GeneratingArray Phase_Done
Definition at line 27 of file ArchiveGenerator.h.
Constructor & Destructor Documentation
| ArchiveGenerator::ArchiveGenerator | ( | ProgressCallback | progressCallback = 0 |
) |
Constructor
Definition at line 15 of file ArchiveGenerator.cpp.
Member Function Documentation
| void ArchiveGenerator::GenerateCPP | ( | const char * | directoryPath, | |
| const char * | archiveFilename, | |||
| const char * | archiveName | |||
| ) |
Creates an archive containting all the files in the specified directory and all its subdirectories. Generates a cpp file which defines an array initialized with the archive data, so it can be included in the project and used as a static buffer for the Asset::SetArchive method.
- Parameters:
-
directoryPath Directory to build archive from
Definition at line 25 of file ArchiveGenerator.cpp.
| void ArchiveGenerator::GenerateFile | ( | const char * | directoryPath, | |
| const char * | archiveFilename | |||
| ) |
Creates an archive containting all the files in the specified directory and all its subdirectories. Generates a binary file with the archive data, so it can be loaded on startup, and used with the Asset::SetArchive method.
- Parameters:
-
directoryPath Directory to build archive from
Definition at line 138 of file ArchiveGenerator.cpp.
Reproduction/republishing of any material on this site without permission is strictly prohibited.
