|
Aeon Engine c550894
AeonGames Open Source Game Engine
|
Package Class. Implements PKG file handling routines and management. More...
#include <aeongames/Package.hpp>

Public Member Functions | |
| DLL | Package (const std::string &aPath) |
| Construct a Package from a file path. | |
| DLL | ~Package () |
| Destructor. | |
| Package (const Package &)=delete | |
| Package & | operator= (const Package &)=delete |
| Package (Package &&aPackage) noexcept | |
| Move constructor. | |
| Package & | operator= (Package &&)=delete |
| DLL const std::filesystem::path & | GetPath () const |
| Get the path associated with this package. | |
| DLL size_t | GetFileSize (uint32_t crc) const |
| DLL size_t | GetFileSize (const std::string &aFileName) const |
| DLL const std::unordered_map< uint32_t, std::string > & | GetIndexTable () const |
| Get the package index table. | |
| DLL void | LoadFile (uint32_t crc, void *buffer, size_t buffer_size) const |
| DLL void | LoadFile (const std::string &aFileName, void *buffer, size_t buffer_size) const |
Package Class. Implements PKG file handling routines and management.
Definition at line 64 of file Package.hpp.
| AeonGames::Package::Package | ( | const std::string & | aPath | ) |
Construct a Package from a file path.
| aPath | Path to the PKG file or directory to load. |
Definition at line 89 of file Package.cpp.
|
noexcept |
Move constructor.
Definition at line 107 of file Package.cpp.
| size_t AeonGames::Package::GetFileSize | ( | const std::string & | aFileName | ) | const |
Returns the file size referenced by its file name.
Definition at line 131 of file Package.cpp.
| size_t AeonGames::Package::GetFileSize | ( | uint32_t | crc | ) | const |
Returns the file size referenced by its CRC value.
Definition at line 119 of file Package.cpp.
| const std::unordered_map< uint32_t, std::string > & AeonGames::Package::GetIndexTable | ( | ) | const |
Get the package index table.
Definition at line 115 of file Package.cpp.
| const std::filesystem::path & AeonGames::Package::GetPath | ( | ) | const |
Get the path associated with this package.
Definition at line 111 of file Package.cpp.
| void AeonGames::Package::LoadFile | ( | const std::string & | aFileName, |
| void * | buffer, | ||
| size_t | buffer_size ) const |
Loads a specific file referenced by its path into the provided buffer.
Definition at line 135 of file Package.cpp.
| void AeonGames::Package::LoadFile | ( | uint32_t | crc, |
| void * | buffer, | ||
| size_t | buffer_size ) const |
Loads a specific file referenced by its CRC into the provided buffer.
Definition at line 139 of file Package.cpp.