![]() |
VR-Forces Developer's Guide
|
Singleton for resolving path variables (DATA_DIR, USER_DIR, etc)
Public Member Functions | |
| void | setDataPath (const DtFilename &dataPath) |
| void | setAppDataPath (const DtFilename &appDataPath) |
| void | setUserDataPath (const DtFilename &userDataPath) |
| void | setMakLuaPath (const DtFilename &makLuaPath) |
| DtFilename | dataPath () |
| DtFilename | appDataPath () |
| DtFilename | userDataPath () |
| void | setAdditionalModelDefinitionPaths (const std::vector< DtFilename > &) |
| const std::vector< DtFilename > & | additionalModelDefinitionPaths () const |
| virtual DtString | resolvePath (const DtString &path) const |
| virtual std::string | resolvePathStdString (const std::string &path) const |
| virtual DtString | markupPath (const DtString &path) const |
| virtual std::string | markupPathStdString (const std::string &path) const |
| virtual void | setSharedSettingsDirectory (const DtFilename &) |
| virtual DtFilename | sharedSettingsDirectory () |
| virtual DtFilename | sharedSettingsDirectory (const DtString &appName) |
| virtual void | setUseSharedSettingsDirectory (bool) |
| virtual bool | useSharedSettingsDirectory () const |
| virtual DtFilename | settingsDirectoryPathFor (const DtString &, bool andSetupFiles=true) |
| virtual DtFilename | settingsDirectory () |
| virtual void | setUserSettingsDirectory (const DtFilename &) |
| virtual const DtFilename & | userSettingsDirectory () |
| virtual DtFilename | resolveSettingsFile (const DtFilename &) |
| virtual DtFilename | backupsPath () |
| virtual void | setApplication (const DtString &) |
| virtual const DtString & | application () const |
| virtual void | setVersionString (const DtString &version) |
| virtual const DtString & | versionString () const |
| virtual void | setApplicationRootName (const DtString &) |
| virtual const DtString & | applicationRootName () const |
| virtual void | setupUserSettingsDirectory (const DtFilename &userSettings, const DtFilename &rootPath, bool copyIfDateIsLater=true) |
| virtual void | setCopyIfDateIsLater (bool) |
| bool | copyIfDateIsLater () const |
| virtual DtFilename | sharedDataPath () const |
| virtual void | setSharedDataPath (const DtFilename &path) |
| virtual DtFilename | sharedDataRoot () const |
| virtual void | setSharedDataRoot (const DtFilename &path) |
| virtual DtString | sharedDataStem () const |
| virtual void | setSharedDataStem (const DtString &path) |
| virtual const DtFilename & | rawTerrainPath () const |
| virtual DtFilename | terrainPath () const |
| virtual void | setTerrainPath (const DtFilename &path) |
| virtual DtString | convertQuickIcon (const DtString &) const |
| virtual DtString | markupTerrainDirectory (const DtString &orig) const |
Static Public Member Functions | |
| static DtAppPathResolver & | Instance () |
Protected Member Functions | |
| virtual void | replaceAll (std::string &searchText, const std::string &stringToFind, const std::string &stringToReplace) const |
| virtual void | setupSharedDataPath () |
| DtAppPathResolver () | |
Protected Attributes | |
| DtFilename | myDataPath |
| DtFilename | myAppDataPath |
| DtFilename | myUserDataPath |
| DtFilename | myMakLuaPath |
| DtFilename | mySharedSettingsDirectory |
| DtFilename | myUserSettingsDirectory |
| DtFilename | mySharedDataRoot |
| DtFilename | mySharedDataPath |
| DtFilename | myTerrainPath |
| DtString | mySharedDataStem |
| DtString | myApplicationRootName |
| bool | myUseSharedSettingsDirectory |
| DtString | myApplicationName |
| bool | myNeedsToSetupSettingsDirectory |
| std::vector< DtFilename > | myAdditonalModelDefinitionPaths |
| bool | myUserSetSettingsDirectory |
| bool | myCopyIfDateIsLater |
| DtString | myVersionString |
|
protected |
|
static |
| void makVrf::DtAppPathResolver::setDataPath | ( | const DtFilename & | dataPath | ) |
| void makVrf::DtAppPathResolver::setAppDataPath | ( | const DtFilename & | appDataPath | ) |
| void makVrf::DtAppPathResolver::setUserDataPath | ( | const DtFilename & | userDataPath | ) |
| void makVrf::DtAppPathResolver::setMakLuaPath | ( | const DtFilename & | makLuaPath | ) |
| DtFilename makVrf::DtAppPathResolver::dataPath | ( | ) |
| DtFilename makVrf::DtAppPathResolver::appDataPath | ( | ) |
| DtFilename makVrf::DtAppPathResolver::userDataPath | ( | ) |
| void makVrf::DtAppPathResolver::setAdditionalModelDefinitionPaths | ( | const std::vector< DtFilename > & | ) |
| const std::vector<DtFilename>& makVrf::DtAppPathResolver::additionalModelDefinitionPaths | ( | ) | const |
Substitute values into string.
|
virtual |
If values of variables are contained in string, substitute variable names.
|
virtual |
|
virtual |
This will set where the shared settings are to be found. This will be the same as the directory used for settings if useSharedSettingsDirectory is true, else this will be the directory references when needing to copy settings file to the user directory.
|
virtual |
The shared settings directory will be a concatenation of the shared settings directory root and the application name.
|
virtual |
|
virtual |
Whether or not the call to settingsDirectory() returns the shared or user directory. Default is to return the user directory.
|
virtual |
|
virtual |
Returns the settings directory for the given name with the given settings directory path. Will create all the necessary files if the directory does not exist.
|
virtual |
The settings directory to use. Note that the first time this method is called, this will look at the shared settings flag, and, if that is false, will look at the shared settings directory and copy any necessary files to the user settings directory.
|
virtual |
Override the initial setting of the user settings directory. This must be the first call made if you wish to actually effect what settings directory is used.
|
virtual |
|
virtual |
Given the value of settings directory, return a proper path to the settings file.
|
virtual |
Given the current settings directory, append backups to that to store backups for settings. If the directory does not exist it will be created.
|
virtual |
Sets up the application name and version. By default the application name is vrforces and the version is the current value of the MAJOR and MINOR version defines in versions.h.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
The root to create the settings under. Default is vrforces.
|
virtual |
|
virtual |
Copies files from shared to user directory. This will only copy files that don't exist in the settings user settings directory.
|
virtual |
If a file already exists in the user setting directory, copy it from the shared if the shared date is later. Default is false.
|
inline |
|
virtual |
Get the shared data directory. The shared directory can be referenced in other directories using The macro string "$(SHARED_DATA_DIR)".
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Returns the unresolved terrain path.
|
virtual |
Returns the resolved terrain pathf.
|
virtual |
Given what was the filename of a quick icon (global plan/scenario event), convert it to a new possible location if it does not exist in the given.
|
virtual |
Tries to convert a terrain path to the shared data location.
|
protectedvirtual |
|
protectedvirtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |