#include <base/Environment.hpp>
|
static std::string | getWareFullPath (const std::vector< std::string > &Dirs, const std::string &Filename) |
|
◆ Environment()
openfluid::base::Environment::Environment |
( |
| ) |
|
|
inlineprotected |
◆ addExtraBuilderextsDirs()
static void openfluid::base::Environment::addExtraBuilderextsDirs |
( |
const std::string & |
Paths | ) |
|
|
static |
Adds paths to the list of directories where OpenFLUID searches for builder-extensions. The paths are given as a single string of paths separated by ":" (on Unices systems) or ";" (on Windows systems)
- Parameters
-
[in] | Paths | the list of full paths as a single string |
◆ addExtraObserversDirs()
static void openfluid::base::Environment::addExtraObserversDirs |
( |
const std::string & |
Paths | ) |
|
|
static |
Adds paths to the list of directories where OpenFLUID searches for observers. The paths are given as a single string of paths separated by ":" (on Unices systems) or ";" (on Windows systems)
- Parameters
-
[in] | Paths | the list of full paths as a single string |
◆ addExtraSimulatorsDirs()
static void openfluid::base::Environment::addExtraSimulatorsDirs |
( |
const std::string & |
Paths | ) |
|
|
static |
Adds paths to the list of directories where OpenFLUID searches for simulators. The paths are given as a single string of paths separated by ":" (on Unices systems) or ";" (on Windows systems)
- Parameters
-
[in] | Paths | the list of full paths as a single string |
◆ getAppResourcesDir()
static std::string openfluid::base::Environment::getAppResourcesDir |
( |
const std::string & |
AppName | ) |
|
|
static |
Returns the resources directory for a given OpenFLUID software application
- Parameters
-
[in] | AppName | the name of the OpenFLUID application |
- Returns
- the full path to the directory
◆ getAppResourcesFullPath()
static std::string openfluid::base::Environment::getAppResourcesFullPath |
( |
const std::string & |
AppName, |
|
|
const std::string & |
Path |
|
) |
| |
|
static |
Returns the full path of a file or directory relative to the resources directory of a given OpenFLUID software application
- Parameters
-
[in] | AppName | the name of the OpenFLUID application |
[in] | Path | the path relative to the OpenFLUID application resources directory |
- Returns
- the full path to the file or directory
◆ getBuilderextFullPath()
static std::string openfluid::base::Environment::getBuilderextFullPath |
( |
const std::string & |
Filename | ) |
|
|
static |
Returns the full path of a searched builder-extension file
- Returns
- the full path of the searched file, empty if not found
◆ getBuilderextsDirs()
static std::vector<std::string> openfluid::base::Environment::getBuilderextsDirs |
( |
| ) |
|
|
static |
Returns the list of directories full paths where OpenFLUID searches for builder-extensions. Extra directories added at run time are at the beginning of the list, followed by standard search paths.
- Returns
- the list of directories full paths
◆ getCommonResourcesDir()
static std::string openfluid::base::Environment::getCommonResourcesDir |
( |
| ) |
|
|
inlinestatic |
Returns the OpenFLUID common resources directory
- Returns
- the full path to the directory
◆ getCommonResourcesFullPath()
static std::string openfluid::base::Environment::getCommonResourcesFullPath |
( |
const std::string & |
Path | ) |
|
|
static |
Returns the full path of a file or directory relative to the OpenFLUID common resources directory
- Parameters
-
[in] | Path | the path relative to the OpenFLUID common resources directory |
- Returns
- the full path to the file or directory
◆ getDefaultBuilderextsDirs()
static std::vector<std::string> openfluid::base::Environment::getDefaultBuilderextsDirs |
( |
| ) |
|
|
inlinestatic |
Returns the list of default directories full paths where OpenFLUID searches for builder-extensions.
- Returns
- the list of directories full paths
◆ getDefaultObserversDirs()
static std::vector<std::string> openfluid::base::Environment::getDefaultObserversDirs |
( |
| ) |
|
|
inlinestatic |
Returns the list of default directories full paths where OpenFLUID searches for observers.
- Returns
- the list of directories full paths
◆ getDefaultSimulatorsDirs()
static std::vector<std::string> openfluid::base::Environment::getDefaultSimulatorsDirs |
( |
| ) |
|
|
inlinestatic |
Returns the list of default directories full paths where OpenFLUID searches for simulators.
- Returns
- the list of directories full paths
◆ getExtraBuilderextsDirs()
static std::vector<std::string> openfluid::base::Environment::getExtraBuilderextsDirs |
( |
| ) |
|
|
inlinestatic |
Returns the list of extra added directories full paths where OpenFLUID searches for builder-extensions.
- Returns
- the list of directories full paths
◆ getExtraObserversDirs()
static std::vector<std::string> openfluid::base::Environment::getExtraObserversDirs |
( |
| ) |
|
|
inlinestatic |
Returns the list of extra added directories full paths where OpenFLUID searches for observers.
- Returns
- the list of directories full paths
◆ getExtraSimulatorsDirs()
static std::vector<std::string> openfluid::base::Environment::getExtraSimulatorsDirs |
( |
| ) |
|
|
inlinestatic |
Returns the list of extra added directories full paths where OpenFLUID searches for simulators.
- Returns
- the list of directories full paths
◆ getHostName()
static std::string openfluid::base::Environment::getHostName |
( |
| ) |
|
|
inlinestatic |
Returns the current host name
- Returns
- the host name
◆ getIdealJobsCount()
static int openfluid::base::Environment::getIdealJobsCount |
( |
| ) |
|
|
inlinestatic |
Returns the ideal jobs count for the current running system
- Returns
- the number of jobs
◆ getIdealThreadCount()
static int openfluid::base::Environment::getIdealThreadCount |
( |
| ) |
|
|
inlinestatic |
Returns the ideal thread count for the current running system
- Returns
- the number of threads
◆ getInstallPrefix()
static std::string openfluid::base::Environment::getInstallPrefix |
( |
| ) |
|
|
inlinestatic |
Returns the OpenFLUID install prefix directory. It is defined at build time but can be forced using the OPENFLUID_INSTALL_PREFIX environment variable.
- Returns
- the full path to the directory
◆ getObserverFullPath()
static std::string openfluid::base::Environment::getObserverFullPath |
( |
const std::string & |
Filename | ) |
|
|
static |
Returns the full path of a searched observer file
- Returns
- the full path of the searched file, empty if not found
◆ getObserversDirs()
static std::vector<std::string> openfluid::base::Environment::getObserversDirs |
( |
| ) |
|
|
static |
Returns the list of directories full paths where OpenFLUID searches for observers. Extra directories added at run time are at the beginning of the list, followed by standard search paths.
- Returns
- the list of directories full paths
◆ getProvidedExamplesDir()
static std::string openfluid::base::Environment::getProvidedExamplesDir |
( |
| ) |
|
|
inlinestatic |
Returns the full path of the directory where examples provided by OpenFLUID or models installations are stored
- Returns
- the full path to the directory
◆ getSettingsFile()
static std::string openfluid::base::Environment::getSettingsFile |
( |
| ) |
|
|
inlinestatic |
Returns the configuration file path for the current user
- Returns
- the full path to the file
◆ getSimulatorFullPath()
static std::string openfluid::base::Environment::getSimulatorFullPath |
( |
const std::string & |
Filename | ) |
|
|
static |
Returns the full path of a searched simulator file
- Returns
- the full path of the searched file, empty if not found
◆ getSimulatorsDirs()
static std::vector<std::string> openfluid::base::Environment::getSimulatorsDirs |
( |
| ) |
|
|
static |
Returns the list of directories full paths where OpenFLUID searches for simulators. Extra directories added at run time are at the beginning of the list, followed by standard search paths.
- Returns
- the list of directories full paths
◆ getSystemArch()
static std::string openfluid::base::Environment::getSystemArch |
( |
| ) |
|
|
inlinestatic |
Returns the current system architecture. Possible values are defined in the global.hpp file with the OPENFLUID_OS_STRLABEL definition
- Returns
- the system architecture
◆ getTempDir()
static std::string openfluid::base::Environment::getTempDir |
( |
| ) |
|
|
inlinestatic |
Returns the current OpenFLUID temporary directory. It is automatically defined but can be forced using the OPENFLUID_TEMP_PATH environment variable.
- Returns
- the full path to the directory
◆ getTranslationsDir()
static std::string openfluid::base::Environment::getTranslationsDir |
( |
| ) |
|
|
inlinestatic |
Returns the OpenFLUID translations directory
- Returns
- the full path to the directory
◆ getUserDataDir()
static std::string openfluid::base::Environment::getUserDataDir |
( |
| ) |
|
|
inlinestatic |
Returns the OpenFLUID data directory for the current user
- Returns
- the full path to the directory
◆ getUserDataFullPath()
static std::string openfluid::base::Environment::getUserDataFullPath |
( |
const std::string & |
Path | ) |
|
|
static |
Returns the full path of a file or directory relative to the OpenFLUID data directory for the current user
- Parameters
-
[in] | Path | the path relative to the OpenFLUID user data directory |
- Returns
- the full path to the file or directory
◆ getUserExamplesDir()
static std::string openfluid::base::Environment::getUserExamplesDir |
( |
| ) |
|
|
inlinestatic |
Returns the full path of the examples directory for the current user
- Returns
- the full path to the directory
◆ getUserExampleSimulatorsDir()
static std::string openfluid::base::Environment::getUserExampleSimulatorsDir |
( |
| ) |
|
|
inlinestatic |
Returns the full path of the example simulators directory
- Returns
- the full path to the directory
◆ getUserHomeDir()
static std::string openfluid::base::Environment::getUserHomeDir |
( |
| ) |
|
|
inlinestatic |
Returns the current user home directory
- Returns
- the full path to the directory
◆ getUserName()
static std::string openfluid::base::Environment::getUserName |
( |
| ) |
|
|
inlinestatic |
Returns the current user name
- Returns
- the user name
◆ getVersion()
static std::string openfluid::base::Environment::getVersion |
( |
| ) |
|
|
inlinestatic |
Returns the current OpenFLUID version using the MAJOR.MINOR.PATCH format
- Returns
- the version number
◆ getVersionFull()
static std::string openfluid::base::Environment::getVersionFull |
( |
| ) |
|
|
inlinestatic |
Returns the current OpenFLUID version using the MAJOR.MINOR.PATCH~STATUS format
- Returns
- the fully qualified version number
◆ getVersionMajorMinor()
static std::string openfluid::base::Environment::getVersionMajorMinor |
( |
| ) |
|
|
inlinestatic |
Returns the current OpenFLUID version using the MAJOR.MINOR format
- Returns
- the simplified version number
◆ getWareFullPath()
static std::string openfluid::base::Environment::getWareFullPath |
( |
const std::vector< std::string > & |
Dirs, |
|
|
const std::string & |
Filename |
|
) |
| |
|
staticprotected |
◆ init()
static void openfluid::base::Environment::init |
( |
| ) |
|
|
static |
Initializes OpenFLUID environment
◆ prepareUserDataDirectory()
static void openfluid::base::Environment::prepareUserDataDirectory |
( |
| ) |
|
|
static |
Automatically prepares the user data directory
◆ resetExtraBuilderextsDirs()
static void openfluid::base::Environment::resetExtraBuilderextsDirs |
( |
| ) |
|
|
static |
Resets the list of extra directories where OpenFLUID searches for builder-extensions to empty
◆ resetExtraObserversDirs()
static void openfluid::base::Environment::resetExtraObserversDirs |
( |
| ) |
|
|
static |
Resets the list of extra directories where OpenFLUID searches for observers to empty
◆ resetExtraSimulatorsDirs()
static void openfluid::base::Environment::resetExtraSimulatorsDirs |
( |
| ) |
|
|
static |
Resets the list of extra directories where OpenFLUID searches for simulators to empty
◆ m_AppsResourcesDir
std::string openfluid::base::Environment::m_AppsResourcesDir |
|
staticprotected |
◆ m_CommonResourcesDir
std::string openfluid::base::Environment::m_CommonResourcesDir |
|
staticprotected |
◆ m_DefaultBuilderextsDirs
std::vector<std::string> openfluid::base::Environment::m_DefaultBuilderextsDirs |
|
staticprotected |
◆ m_DefaultObserversDirs
std::vector<std::string> openfluid::base::Environment::m_DefaultObserversDirs |
|
staticprotected |
◆ m_DefaultSimulatorsDirs
std::vector<std::string> openfluid::base::Environment::m_DefaultSimulatorsDirs |
|
staticprotected |
◆ m_ExtraBuilderextsDirs
std::vector<std::string> openfluid::base::Environment::m_ExtraBuilderextsDirs |
|
staticprotected |
◆ m_ExtraObserversDirs
std::vector<std::string> openfluid::base::Environment::m_ExtraObserversDirs |
|
staticprotected |
◆ m_ExtraSimulatorsDirs
std::vector<std::string> openfluid::base::Environment::m_ExtraSimulatorsDirs |
|
staticprotected |
◆ m_HostName
std::string openfluid::base::Environment::m_HostName |
|
staticprotected |
◆ m_IdealThreadCount
int openfluid::base::Environment::m_IdealThreadCount |
|
staticprotected |
◆ m_InstallPrefix
std::string openfluid::base::Environment::m_InstallPrefix |
|
staticprotected |
◆ m_ProvidedExamplesDir
std::string openfluid::base::Environment::m_ProvidedExamplesDir |
|
staticprotected |
◆ m_SettingsFile
std::string openfluid::base::Environment::m_SettingsFile |
|
staticprotected |
◆ m_SystemArch
std::string openfluid::base::Environment::m_SystemArch |
|
staticprotected |
◆ m_TempDir
std::string openfluid::base::Environment::m_TempDir |
|
staticprotected |
◆ m_TranslationsDir
std::string openfluid::base::Environment::m_TranslationsDir |
|
staticprotected |
◆ m_UserDataDir
std::string openfluid::base::Environment::m_UserDataDir |
|
staticprotected |
◆ m_UserExamplesDir
std::string openfluid::base::Environment::m_UserExamplesDir |
|
staticprotected |
◆ m_UserExampleSimulatorsDir
std::string openfluid::base::Environment::m_UserExampleSimulatorsDir |
|
staticprotected |
◆ m_UserHomeDir
std::string openfluid::base::Environment::m_UserHomeDir |
|
staticprotected |
◆ m_UserName
std::string openfluid::base::Environment::m_UserName |
|
staticprotected |
◆ m_Version
std::string openfluid::base::Environment::m_Version |
|
staticprotected |
◆ m_VersionFull
std::string openfluid::base::Environment::m_VersionFull |
|
staticprotected |
◆ m_VersionMajorMinor
std::string openfluid::base::Environment::m_VersionMajorMinor |
|
staticprotected |
The documentation for this class was generated from the following file: