![]() |
Blamite Game Engine - blam!
00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
|
Namespace containing functions for fetching full paths from configuration files. More...
Functions | |
BLAM std::string | GetDefaultEngineDataPath (BlamEngineDataFolder folder) |
Retrieves a default value of a given engine data directory. More... | |
BLAM std::string | GetDefaultUserDataPath (BlamUserDataFolder folder) |
Retrieves a default value of a given user data directory. More... | |
BLAM std::string | GetEngineDataPath (BlamEngineDataFolder folder) |
Retrieves the configured value of a given engine directory. More... | |
BLAM std::string | GetUserDataPath (BlamUserDataFolder folder) |
Retrieves the configured value of a given user directory. More... | |
BLAM BlamUserDataFolder | GetUserDataFolderFromString (std::string folder) |
Attempts to convert a string to the equivalent user data folder. More... | |
BLAM BlamEngineDataFolder | GetEngineDataFolderFromString (std::string folder) |
Attempts to convert a string to the equivalent engine data folder. More... | |
BLAM std::string | ParseFolderPlaceholders (std::string string) |
Parses any engine/user data folder placeholders within a string. More... | |
Namespace containing functions for fetching full paths from configuration files.
std::string Blam::Settings::Paths::GetDefaultEngineDataPath | ( | BlamEngineDataFolder | folder | ) |
Retrieves a default value of a given engine data directory.
Should generally not be used as most paths are configurable, and those paths should be used instead.
folder | - The engine data folder to retrieve the path for. |
std::string Blam::Settings::Paths::GetDefaultUserDataPath | ( | BlamUserDataFolder | folder | ) |
Retrieves a default value of a given user data directory.
Should generally not be used as most paths are configurable, and those paths should be used instead.
folder | - The user data folder to retrieve the path for. |
BlamEngineDataFolder Blam::Settings::Paths::GetEngineDataFolderFromString | ( | std::string | folder | ) |
Attempts to convert a string to the equivalent engine data folder.
folder | - The name of the folder to convert to a BlamEngineDataFolder. |
std::string Blam::Settings::Paths::GetEngineDataPath | ( | BlamEngineDataFolder | folder | ) |
Retrieves the configured value of a given engine directory.
folder | - The engine data folder to retrieve the path for. |
BlamUserDataFolder Blam::Settings::Paths::GetUserDataFolderFromString | ( | std::string | folder | ) |
Attempts to convert a string to the equivalent user data folder.
folder | - The name of the folder to convert to a BlamUserDataFolder. |
std::string Blam::Settings::Paths::GetUserDataPath | ( | BlamUserDataFolder | folder | ) |
Retrieves the configured value of a given user directory.
folder | - The user data folder to retrieve the path for. |
std::string Blam::Settings::Paths::ParseFolderPlaceholders | ( | std::string | string | ) |
Parses any engine/user data folder placeholders within a string.
In some cases, we may want to reference an engine data folder within a string - ex, in a console command, script function, or elsewhere.
This function can be used to parse those out, similar to the old placeholders system.
Placeholders should be the string representations of a path (see GetEngineDataFolderFromString and GetUserDataFolderFromString) prefixed by UserPath:
or EnginePath:
, and surrounded by curly braces.
For example - if you wanted to parse out the 'Maps' engine data folder, the string should contain:
{EnginePath:Maps}
If you wanted to parse out the user screenshots folder, the string should contain:
{UserPath:Screenshots}
The input is case-sensetive.
string | - The string to parse placeholders for. |