![]() |
#include <base/RuntimeEnv.hpp>
Public Member Functions | |
~RuntimeEnvironment () | |
std::string | getVersion () const |
std::string | getFullVersion () const |
std::string | getMajorMinorVersion () const |
void | setInputDir (const std::string &InputDir) |
std::string | getInputDir () const |
void | setOutputDir (const std::string &OutputDir) |
std::string | getOutputDir () const |
void | setDateTimeOutputDir () |
std::string | getMarketBagDir () const |
std::string | getMarketBagVersionDir () const |
std::string | getMarketBagSimVersionDir () const |
std::string | getMarketBagObsVersionDir () const |
std::string | getMarketBagBuildVersionDir () const |
std::string | getMarketBagDataVersionDir () const |
std::string | getMarketBagBinSubDir () const |
std::string | getMarketBagSrcSubDir () const |
std::string | getDefaultConfigFile () const |
std::string | getConfigFilePath (std::string Filename) const |
std::string | getUserHomeDir () const |
std::string | getUserDataPath (std::string RelativePath) const |
void | prepareUserDataDirectory () const |
std::string | getTempDir () const |
std::string | getInputFullPath (std::string Filename) const |
std::string | getOutputFullPath (std::string Filename) const |
std::string | getSimulatorPluginFullPath (const std::string &Filename) const |
void | addExtraSimulatorsPluginsPaths (std::string SemicolonSeparatedPaths) |
void | resetExtraSimulatorsPluginsPaths () |
std::vector< std::string > | getDefaultSimulatorsPluginsPaths () const |
std::vector< std::string > | getExtraSimulatorsPluginsPaths () const |
std::vector< std::string > | getSimulatorsPluginsPaths () const |
std::string | getObserverPluginFullPath (const std::string &Filename) const |
void | addExtraObserversPluginsPaths (const std::string &SemicolonSeparatedPaths) |
void | resetExtraObserversPluginsPaths () |
std::vector< std::string > | getDefaultObserversPluginsPaths () const |
std::vector< std::string > | getExtraObserversPluginsPaths () const |
std::vector< std::string > | getObserversPluginsPaths () const |
std::string | getInstallPrefix () const |
std::string | getCommonResourcesDir () const |
std::string | getCommonResourceFilePath (std::string RelativeFilePath) const |
std::string | getAppResourcesDir (std::string AppName) const |
std::string | getAppResourceFilePath (std::string AppName, std::string RelativeFilePath) const |
std::string | getTranslationsDir () const |
std::string | getProvidedExamplesDir () const |
std::string | getUserExamplesDir () const |
openfluid::base::EnvironmentProperties & | extraProperties () |
bool | isClearOutputDir () const |
void | setClearOutputDir (bool ClearDir) |
openfluid::base::EnvironmentProperties * | wareEnvironment () const |
std::string | getHostName () const |
std::string | getUserID () const |
std::string | getArch () const |
unsigned int | getSimulatorsMaxNumThreads () const |
void | setSimulatorsMaxNumThreads (const unsigned int &MaxNumThreads) |
void | setValuesBufferSize (const unsigned int StepsNbr) |
unsigned int | getValuesBufferSize () const |
bool | isUserValuesBufferSize () const |
void | unsetUserValuesBufferSize () |
void | linkToProject () |
void | detachFromProject () |
bool | isLinkedToProject () const |
bool | isSimulationProfilingEnabled () const |
void | setSimulationProfilingEnabled (bool Profiling) |
void | processWareParams (openfluid::ware::WareParams_t &Params) const |
Static Public Member Functions | |
static RuntimeEnvironment * | instance () |
openfluid::base::RuntimeEnvironment::~RuntimeEnvironment | ( | ) |
Destructor
void openfluid::base::RuntimeEnvironment::addExtraObserversPluginsPaths | ( | const std::string & | SemicolonSeparatedPaths | ) |
Adds search paths for plugins, separated by semicolon characters (i.e. /path/to/plugs:another/path/to/plugs). These paths are added at the top of the search paths list.
[in] | SemicolonSeparatedPaths | a collection of paths separated by semicolons, as a std::string |
void openfluid::base::RuntimeEnvironment::addExtraSimulatorsPluginsPaths | ( | std::string | SemicolonSeparatedPaths | ) |
Adds search paths for plugins, separated by semicolon characters (i.e. /path/to/plugs:another/path/to/plugs). These paths are added at the top of the search paths list.
[in] | SemicolonSeparatedPaths | a collection of paths separated by semicolons, as a std::string |
void openfluid::base::RuntimeEnvironment::detachFromProject | ( | ) |
|
inline |
Returns the extra properties list
std::string openfluid::base::RuntimeEnvironment::getAppResourceFilePath | ( | std::string | AppName, |
std::string | RelativeFilePath | ||
) | const |
Returns the path for a given file, relative a given application resources path
[in] | AppName | The given application name |
[in] | RelativeFilePath | The given file |
std::string openfluid::base::RuntimeEnvironment::getAppResourcesDir | ( | std::string | AppName | ) | const |
Returns the path for resources of a given application, taking into account the install prefix path
[in] | AppName | The given application name |
|
inline |
Returns the local system architecture (if could be determined)
std::string openfluid::base::RuntimeEnvironment::getCommonResourceFilePath | ( | std::string | RelativeFilePath | ) | const |
Returns the path for a given file, relative to the common resources path
[in] | RelativeFilePath | The given file |
std::string openfluid::base::RuntimeEnvironment::getCommonResourcesDir | ( | ) | const |
Returns the path for common resources, taking into account the install prefix path
|
inline |
Returns the path for a given config file (i.e. $HOME/.openfluid/Filename)
[in] | Filename | the given config file name |
|
inline |
Returns the default config file path (i.e. $HOME/.openfluid/openfluid.conf)
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns the full version of OpenFLUID, including status (alpha, beta, rc, ...)
|
inline |
Returns the local host name (if could be determined)
|
inline |
Returns the input directory
|
inline |
Returns the path for a given input file (i.e. InputDir/Filename)
[in] | Filename | The given input file name |
|
inline |
Returns the install prefix path. The install prefix is given at compile time, but can be overriden by the OPENFLUID_INSTALL_PREFIX environment variable (recommended on windows systems).
|
inline |
Returns the version of OpenFLUID, composed of major and minor numbers
|
inline |
|
inline |
|
inline |
|
inline |
Returns the market bag directory (i.e. $HOME/.openfluid/market-bag)
|
inline |
|
inline |
|
inline |
|
inline |
std::string openfluid::base::RuntimeEnvironment::getObserverPluginFullPath | ( | const std::string & | Filename | ) | const |
Returns the path for a given observer plugin file, taking into account the observer plugins path search order
[in] | Filename | The given observer plugin file name |
|
inline |
Returns the ordered list of paths used to search for observer plugins
|
inline |
Returns the output directory
|
inline |
Returns the path for a given output file (i.e. OutputDir/Filename)
[in] | Filename | The given output file name |
|
inline |
Returns the path for provided examples, taking into account the install prefix path
std::string openfluid::base::RuntimeEnvironment::getSimulatorPluginFullPath | ( | const std::string & | Filename | ) | const |
Returns the path for a given simulator plugin file, taking into account the simulator plugins path search order
[in] | Filename | The given simulator plugin file name |
|
inline |
|
inline |
Returns the ordered list of paths used to search for simulator plugins
|
inline |
Returns the path of the temporary directory
std::string openfluid::base::RuntimeEnvironment::getTranslationsDir | ( | ) | const |
Returns the translations directory
|
inline |
Returns the absolute path for a given relative path in the user OpenFLUID directory (i.e. $HOME/.openfluid/RelativePath)
[in] | RelativePath | the given relative path |
|
inline |
Returns the path for examples in user's directory
|
inline |
Returns the absolute path of the home directory
|
inline |
Returns the local user ID (if could be determined)
|
inline |
|
inline |
Returns the version of OpenFLUID
|
static |
|
inline |
Returns the clear output directory flag
|
inline |
|
inline |
|
inline |
void openfluid::base::RuntimeEnvironment::linkToProject | ( | ) |
void openfluid::base::RuntimeEnvironment::prepareUserDataDirectory | ( | ) | const |
Checks the user data directory and create missing subdirectories and files
void openfluid::base::RuntimeEnvironment::processWareParams | ( | openfluid::ware::WareParams_t & | Params | ) | const |
|
inline |
|
inline |
|
inline |
Sets the clear output directory flag
[in] | ClearDir | The value of the flag |
void openfluid::base::RuntimeEnvironment::setDateTimeOutputDir | ( | ) |
Sets the output directory as a directory located in the user data directory, with a name based on the current date-time
|
inline |
Sets the input directory, overriding the default input dir
[in] | InputDir | The input directory |
|
inline |
Sets the output directory, overriding the default output dir
[in] | OutputDir | The output directory |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |