![]() |
VR-Forces 4.10 Class Documentation
|
Singleton for resolving path variables (DATA_DIR, USER_DIR, etc) More...
Public Member Functions | |
| void | setDataPath (const DtFilename &dataPath) |
| void | setAppDataPath (const DtFilename &appDataPath) |
| void | setUserDataPath (const DtFilename &userDataPath) |
| DtFilename | dataPath () |
| DtFilename | appDataPath () |
| DtFilename | userDataPath () |
| void | setAdditionalModelDefinitionPaths (const std::vector< DtFilename > &) |
| const std::vector< DtFilename > & | additionalModelDefinitionPaths () const |
| virtual DtString | resolvePath (const DtString &path) |
| Substitute values into string. More... | |
| virtual DtString | markupPath (const DtString &path) |
| If values of variables are contained in string, substitute variable names. More... | |
| virtual void | setSharedSettingsDirectory (const DtFilename &) |
| This will set where the shared settings are to be found. More... | |
| virtual DtFilename | sharedSettingsDirectory () |
| The shared settings directory will be a concatenation of the shared settings directory root and the application name. More... | |
| virtual DtFilename | sharedSettingsDirectory (const DtString &appName) |
| virtual void | setUseSharedSettingsDirectory (bool) |
| Whether or not the call to settingsDirectory() returns the shared or user directory. Default is to return the user directory. More... | |
| virtual bool | useSharedSettingsDirectory () const |
| virtual DtFilename | settingsDirectoryPathFor (const DtString &, bool andSetupFiles=true) |
| 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. More... | |
| virtual DtFilename | settingsDirectory () |
| The settings directory to use. More... | |
| virtual void | setUserSettingsDirectory (const DtFilename &) |
| Override the initial setting of the user settings directory. More... | |
| virtual const DtFilename & | userSettingsDirectory () |
| virtual DtFilename | resolveSettingsFile (const DtFilename &) |
| Given the value of settings directory, return a proper path to the settings file. More... | |
| virtual DtFilename | backupsPath () |
| Given the current settings directory, append backups to that to store backups for settings. If the directory does not exist it will be created. More... | |
| virtual void | setApplication (const DtString &) |
| Sets up the application name and version. More... | |
| virtual const DtString & | application () const |
| virtual void | setVersionString (const DtString &version) |
| virtual const DtString & | versionString () const |
| virtual void | setApplicationRootName (const DtString &) |
| The root to create the settings under. Default is vrforces. More... | |
| virtual const DtString & | applicationRootName () const |
| virtual void | setupUserSettingsDirectory (const DtFilename &userSettings, const DtFilename &rootPath, bool copyIfDateIsLater=true) |
| Copies files from shared to user directory. This will only copy files that don't exist in the settings user settings directory. More... | |
| virtual void | setCopyIfDateIsLater (bool) |
| If a file already exists in the user setting directory, copy it from the shared if the shared date is later. Default is false. More... | |
| bool | copyIfDateIsLater () const |
Static Public Member Functions | |
| static DtAppPathResolver & | Instance () |
Protected Member Functions | |
| DtAppPathResolver () | |
Protected Attributes | |
| DtFilename | myDataPath |
| DtFilename | myAppDataPath |
| DtFilename | myUserDataPath |
| DtFilename | mySharedSettingsDirectory |
| DtFilename | myUserSettingsDirectory |
| DtString | myApplicationRootName |
| bool | myUseSharedSettingsDirectory |
| DtString | myApplicationName |
| bool | myNeedsToSetupSettingsDirectory |
| std::vector< DtFilename > | myAdditonalModelDefinitionPaths |
| bool | myUserSetSettingsDirectory |
| bool | myCopyIfDateIsLater |
| DtString | myVersionString |
Singleton for resolving path variables (DATA_DIR, USER_DIR, etc)
|
protected |
|
static |
| void makVrf::DtAppPathResolver::setDataPath | ( | const DtFilename & | dataPath | ) |
| void makVrf::DtAppPathResolver::setAppDataPath | ( | const DtFilename & | appDataPath | ) |
| void makVrf::DtAppPathResolver::setUserDataPath | ( | const DtFilename & | userDataPath | ) |
| 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.
If values of variables are contained in string, substitute variable names.
|
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 |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |