12#include "boost/filesystem.hpp"
48using PackEntries = std::unordered_map<std::string, PackEntry>;
146 static std::vector<uint8_t>
ReadPackedFile(
const std::string& entryPath);
150 Utility(
const Utility& rhs );
151 Utility& operator=(
const Utility& rhs );
153 static boost::filesystem::path FindPath( std::string fileOrFolderName, std::string searchingFrom =
"../../" );
216 return mValue == rhs.mValue;
222 return mValue != rhs.mValue;
228 if( mValue > T::End )
230 throw std::runtime_error(
"Cannot dereference end().");
239 if( mValue <= T::End )
241 mValue = T(
static_cast<int>(mValue) + 1);
263 return Iterator(T(
static_cast<int>(T::End) + 1));
std::ptrdiff_t difference_type
Iterator & operator=(const Iterator &)=default
Iterator(Iterator &&)=default
Iterator(const Iterator &)=default
bool operator==(const Iterator &rhs) const
Iterator & operator=(Iterator &&)=default
bool operator!=(const Iterator &rhs) const
std::forward_iterator_tag iterator_category
static boost::filesystem::path GetConfigFilePath()
Returns absolute path to Config/app_config.json.
static boost::filesystem::path GetShadersFolderPath()
Returns absolute path to Content/Shaders.
static std::vector< std::string > GetListOfFileNamesInDirectory(const char *directory, std::string extToSearch)
Returns a list of file names in a directory matching the specified extension.
static std::vector< char > ReadShaderBinaryFile(std::string const &filename)
Reads a binary shader file from disk.
static boost::filesystem::path GetApplicationPath()
Returns the absolute path of the running application.
static boost::filesystem::path GetShadersBinaryPath()
Returns the directory path containing compiled shader binaries.
static boost::filesystem::path sApplicationPath
static boost::filesystem::path sBuildPath
static boost::filesystem::path ResolveProjectRoot()
Resolves project root folder (handles Release/Debug/Binaries layouts).
static boost::filesystem::path GetBuildPath()
Returns the build output directory path.
static boost::filesystem::path const sContentRelativePathFolder
static boost::filesystem::path const sDefaultShadersBinaryRelativePath
static boost::filesystem::path const sAppConfigFilePath
static const PackEntries & GetPackEntries()
Returns the manifest of packed files.
static std::vector< std::string > GetListOfFilesInDirectory(std::string directory)
Returns a list of full file paths in the given directory.
static boost::filesystem::path const sContentPackageFilePath
static AppConfig ReadConfigFile()
Reads application settings from the JSON config file.
static boost::filesystem::path const sTextureRelativePathFolder
static boost::filesystem::path GetTextureFolderPath()
Returns absolute path to Content/Textures.
static boost::filesystem::path const sContentPackEntriesFilePath
static boost::filesystem::path const sShadersRelativePathFolder
static boost::filesystem::path const sModelsRelativePathFolder
static boost::filesystem::path sShadersBinaryPath
static std::vector< uint8_t > ReadPackedFile(const std::string &entryPath)
Reads raw bytes of a file stored inside Pack.bin.
static boost::filesystem::path GetModelsFolderPath()
Returns absolute path to Content/Models.
static bool IsPackageProvided()
Checks whether packed assets (Pack.bin / Pack.json) exist.
static void InitializePaths(int argc, char *argv[])
Initializes engine paths based on the executable location.
std::unordered_map< std::string, PackEntry > PackEntries
Basic application settings loaded from a configuration file.
float screenWidth
Desired window width in pixels (ignored in full-screen mode).
bool isFullScreen
Whether the application should start in full-screen mode.
std::string appName
Name of the application.
float screenHeight
Desired window height in pixels (ignored in full-screen mode).
Metadata describing one file stored inside a packed asset archive.