![]() |
CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
|
Builds up a list of directory paths to search for command line modules. More...
#include <Libs/CommandLineModules/Core/ctkCmdLineModuleDefaultPathBuilder.h>
Public Member Functions | |
virtual void | addApplicationDir (const QString &subFolder=QString()) |
Adds the application installation directory, or if specified a sub-directory. More... | |
virtual void | addCtkModuleLoadPath () |
Adds the directories denoted by the environment variable CTK_MODULE_LOAD_PATH. More... | |
virtual void | addCurrentDir (const QString &subFolder=QString()) |
Adds the current working directory, or if specified a sub-directory. More... | |
virtual void | addHomeDir (const QString &subFolder=QString()) |
Adds the users home directory, or if specified a sub-directory. More... | |
virtual void | clear () |
Clears the current list of directories. More... | |
ctkCmdLineModuleDefaultPathBuilder () | |
virtual QStringList | getDirectoryList () const |
Returns the QStringList containing directories. More... | |
virtual void | setStrictMode (const bool &strict) |
Sets strict mode which checks that all directories already exist. More... | |
virtual bool | strictMode () const |
Returns the strict mode flag. More... | |
~ctkCmdLineModuleDefaultPathBuilder () | |
Builds up a list of directory paths to search for command line modules.
Simple class to enable the user to easily add various directories to a list of directories. You create this object, add a load of directories by repeatedly calling add..() functions, and then call getDirectoryList() to get the final StringList of directory locations.
The choices are:
1. The directory or list of directories defined by the CTK_MODULE_LOAD_PATH environment variable. Uses usual PATH semantics such as colon separator on *nix systems and semi-colon on Windows. 2. The directory defined by the users HOME directory, or any sub-directory under this. 3. The directory defined by the current working directory, or any sub-directory under this. 4. The directory defined by the application installation directory or any sub-directory under this.
A strictMode flag exists to decide if this class only returns directories that already exist.
Definition at line 52 of file ctkCmdLineModuleDefaultPathBuilder.h.
ctkCmdLineModuleDefaultPathBuilder::ctkCmdLineModuleDefaultPathBuilder | ( | ) |
ctkCmdLineModuleDefaultPathBuilder::~ctkCmdLineModuleDefaultPathBuilder | ( | ) |
|
virtual |
Adds the application installation directory, or if specified a sub-directory.
|
virtual |
Adds the directories denoted by the environment variable CTK_MODULE_LOAD_PATH.
Semi-colon separated lists of directories are allowed.
|
virtual |
Adds the current working directory, or if specified a sub-directory.
This depends on QDir::current() existing. If this is not the case, then this method will do nothing and ignore the request.
|
virtual |
Adds the users home directory, or if specified a sub-directory.
This depends on QDir::home() existing. If this is not the case, then this method will do nothing and ignore the request.
|
virtual |
Clears the current list of directories.
|
virtual |
Returns the QStringList containing directories.
|
virtual |
Sets strict mode which checks that all directories already exist.
strict | if true this object will only return existing directories, if false, the return StringList is un-checked. |
|
virtual |
Returns the strict mode flag.