Orxonox
0.0.5 Codename: Arcturus
|
The ApplicationPaths class is a singleton which provides static paths of the application. More...
#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/libraries/core/ApplicationPaths.h>
Public Member Functions | |
ApplicationPaths () | |
Retrieves the executable path and sets all hard coded fixed paths (currently only the module and the plugin paths) Also checks for "orxonox_dev_build.keep_me" in the executable directory. More... | |
~ApplicationPaths () | |
std::map< std::string, std::string > | getModulePaths () |
Returns a map with all modules declared by a *.module file in the module folder; key = module-name, value = library-path (content of the file). More... | |
std::map< std::string, std::string > | getPluginPaths () |
Returns a map with all plugins declared by a *.plugin file in the plugin folder; key = plugin-name, value = library-path (content of the file). More... | |
Static Public Member Functions | |
static bool | buildDirectoryRun () |
Return true for runs in the build directory (not installed) More... | |
static const boost::filesystem::path & | getExecutablePath () |
Returns the path to the executable folder as boost::filesystem::path. More... | |
static std::string | getExecutablePathString () |
Returns the path to the executable folder as std::string. More... | |
static const boost::filesystem::path & | getModulePath () |
Returns the path to the modules as boost::filesystem::path. More... | |
static std::string | getModulePathString () |
Returns the path to the modules as std::string. More... | |
static const boost::filesystem::path & | getPluginPath () |
Returns the path to the plugins as boost::filesystem::path. More... | |
static std::string | getPluginPathString () |
Returns the path to the plugins as std::string. More... | |
static const boost::filesystem::path & | getRootPath () |
Returns the path to the root folder as boost::filesystem::path. More... | |
static std::string | getRootPathString () |
Returns the path to the root folder as std::string. More... | |
Static Public Member Functions inherited from orxonox::Singleton< ApplicationPaths > | |
static bool | exists () |
Tells whether the singleton has been created. More... | |
static ApplicationPaths & | getInstance () |
Returns a reference to the singleton instance. More... | |
Private Member Functions | |
ApplicationPaths (const ApplicationPaths &)=delete | |
std::map< std::string, std::string > | getModuleOrPluginPaths (boost::filesystem::path &directory, const std::string &extension) |
ApplicationPaths & | operator= (const ApplicationPaths &)=delete |
Private Attributes | |
bool | bBuildDirectoryRun_ |
True for runs in the build directory (not installed) More... | |
boost::filesystem::path & | executablePath_ |
Path to the executable. More... | |
boost::filesystem::path & | modulePath_ |
Path to the modules. More... | |
boost::filesystem::path & | pluginPath_ |
Path to the plugins. More... | |
boost::filesystem::path & | rootPath_ |
Path to the parent directory of the ones above if program was installed with relative paths. More... | |
Static Private Attributes | |
static ApplicationPaths * | singletonPtr_s = nullptr |
Static pointer to the singleton. More... | |
Friends | |
class | Singleton< ApplicationPaths > |
Additional Inherited Members | |
Protected Member Functions inherited from orxonox::Singleton< ApplicationPaths > | |
Singleton () | |
Constructor sets the singleton instance pointer. More... | |
virtual | ~Singleton () |
Destructor resets the singleton instance pointer. More... | |
The ApplicationPaths class is a singleton which provides static paths of the application.
The class provides information about the executable, root and module/plugin path. It determines those by the use of platform specific functions.
orxonox::ApplicationPaths::ApplicationPaths | ( | ) |
Retrieves the executable path and sets all hard coded fixed paths (currently only the module and the plugin paths) Also checks for "orxonox_dev_build.keep_me" in the executable directory.
If found it means that this is not an installed run, hence we don't write the logs and config files to ~/.orxonox
GeneralException |
orxonox::ApplicationPaths::~ApplicationPaths | ( | ) |
|
privatedelete |
|
inlinestatic |
Return true for runs in the build directory (not installed)
|
inlinestatic |
Returns the path to the executable folder as boost::filesystem::path.
|
static |
Returns the path to the executable folder as std::string.
|
private |
|
inlinestatic |
Returns the path to the modules as boost::filesystem::path.
std::map< std::string, std::string > orxonox::ApplicationPaths::getModulePaths | ( | ) |
Returns a map with all modules declared by a *.module file in the module folder; key = module-name, value = library-path (content of the file).
|
static |
Returns the path to the modules as std::string.
|
inlinestatic |
Returns the path to the plugins as boost::filesystem::path.
std::map< std::string, std::string > orxonox::ApplicationPaths::getPluginPaths | ( | ) |
Returns a map with all plugins declared by a *.plugin file in the plugin folder; key = plugin-name, value = library-path (content of the file).
|
static |
Returns the path to the plugins as std::string.
|
inlinestatic |
Returns the path to the root folder as boost::filesystem::path.
|
static |
Returns the path to the root folder as std::string.
|
privatedelete |
|
friend |
|
private |
True for runs in the build directory (not installed)
|
private |
Path to the executable.
|
private |
Path to the modules.
|
private |
Path to the plugins.
|
private |
Path to the parent directory of the ones above if program was installed with relative paths.
|
staticprivate |
Static pointer to the singleton.