![]() |
GemaCoreLib
The GeMA Core library
|
Class used to store releveant system and project paths, providing functions for path macro translations. More...
#include <gmPath.h>
Public Member Functions | |
GmPath () | |
Constructor. Inits the application path. | |
void | setConfigPath (QString path) |
Sets the path used to find configuration files ($APPCONFIG value) | |
void | setScriptsPath (QString path) |
Sets the path used to find utilitary Lua scripts ($SCRIPTS value) | |
QString | scriptsPath () const |
Returns the current scripts path. | |
void | setUserGivenPaths (QString logPath, QString inputPath, QString outputPath) |
Sets paths given by the user as command line parameters. More... | |
void | setSimulationPath (QString simulationDir, QString simulationBaseName) |
Sets the location and base file name for the simulation project ($SIMULATIONDIR and $SIMULATIONNAME values) | |
QString | translatePath (QString path) const |
Utilitary function used to translate macros in a path, replacing them by the appropriate location. More... | |
void | printPathMacros (const GmLogCategory &logger, GmLogLevel level, bool printProjectMacros) |
Prints the contents of the path Macros to the provided logger/level. | |
Static Public Member Functions | |
static QString | toNativeSeparators (QString path) |
Returns a path translated to the format used by the operating system. | |
Private Attributes | |
QString | _appPath |
Directory that contains the executable (stripped of release or debug dirs if present) | |
QString | _initialPath |
The current path when the library was initialized. | |
QString | _buildMode |
'release', 'debug' or '' depending on the presence of those subdirs in the unstripped program path | |
QString | _configPath |
Directory that contains the config file in use. | |
QString | _scriptsPath |
Directory that contains utilitary Lua script files. | |
QString | _simulationDir |
Directory that contains the simulation file in use. | |
QString | _simulationBaseFileName |
Base simulation file name, without extension. | |
QString | _logPath |
The path for the log file. Either a user supplied path (through command line) or equal to _appPath. | |
QString | _inputPath |
An input file path. Either a user supplied path (through command line) or equal to _simulationDir. | |
QString | _outputPath |
An output file path. Either a user supplied path (through command line) or equal to _simulationDir. | |
QDateTime | _simTime |
The time when the simulation started. | |
Class used to store releveant system and project paths, providing functions for path macro translations.
Sets paths given by the user as command line parameters.
logPath | The path used for the log file, queried with the $LOG macro. If empty, its value defaults to the application path ($CURRENT). |
inputPath | Input file path, queried with the $INPUT macro. If empty, its value defaults to the project dir ($SIMULATIONDIR) |
outputPath | Output file path, queried with the $OUTPUT macro. If empty, its value defaults to the project dir ($SIMULATIONDIR) |
Utilitary function used to translate macros in a path, replacing them by the appropriate location.
Understood macros include:
path | Path to be translated |