All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions
openfluid::base::RuntimeEnvironment Class Reference

#include <base/RuntimeEnv.hpp>

List of all members.

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
std::string getTempDir () const
std::string getInputFullPath (std::string Filename) const
std::string getOutputFullPath (std::string Filename) const
std::string getSimulatorPluginFullPath (std::string Filename)
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 (std::string Filename)
void addExtraObserversPluginsPaths (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::EnvironmentPropertiesgetExtraProperties ()
bool isClearOutputDir () const
void setClearOutputDir (bool ClearDir)
bool isWriteResults () const
void setWriteResults (bool WriteIt)
bool isWriteSimReport () const
void setWriteSimReport (bool WriteIt)
openfluid::base::EnvironmentPropertiesgetWareEnvironment () const
boost::posix_time::ptime getIgnitionDateTime () const
void resetIgnitionDateTime ()
boost::posix_time::time_duration getEffectiveSimulationDuration () const
void setEffectiveSimulationDuration (const boost::posix_time::time_duration &TimeDuration)
std::string getHostName () const
std::string getUserID () const
std::string getArch () const
unsigned int getSimulatorsMaxNumThreads () const
void setSimulatorsMaxNumThreads (const unsigned int &MaxNumThreads)
void setSimulationTimeInformation (openfluid::core::DateTime StartTime, openfluid::core::DateTime EndTime, int TimeStep)
openfluid::core::DateTime getSimulationStartTime () const
openfluid::core::DateTime getSimulationEndTime () const
int getSimulationTimeStep () const
void setValuesBufferSize (const unsigned int StepsNbr)
unsigned int getValuesBufferSize () const
bool isUserValuesBufferSize () const
void unsetUserValuesBufferSize ()
void linkToProject ()
void detachFromProject ()
bool isLinkedToProject ()
bool isSimulationProfilingEnabled () const
void setSimulationProfilingEnabled (bool Profiling)

Static Public Member Functions

static RuntimeEnvironmentgetInstance ()

Constructor & Destructor Documentation

Destructor


Member Function Documentation

void openfluid::base::RuntimeEnvironment::addExtraObserversPluginsPaths ( 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.

Parameters:
[in]SemicolonSeparatedPathsa 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.

Parameters:
[in]SemicolonSeparatedPathsa collection of paths separated by semicolons, as a std::string
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

Parameters:
[in]AppNameThe given application name
[in]RelativeFilePathThe given file
Returns:
the path for a given file in the given application resources
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

Parameters:
[in]AppNameThe given application name
Returns:
the path for resources of a given application
std::string openfluid::base::RuntimeEnvironment::getArch ( ) const [inline]

Returns the local system architecture (if could be determined)

Returns:
the local architecture
std::string openfluid::base::RuntimeEnvironment::getCommonResourceFilePath ( std::string  RelativeFilePath) const

Returns the path for a given file, relative to the common resources path

Parameters:
[in]RelativeFilePathThe given file
Returns:
the path for a given file in the common resources

Returns the path for common resources, taking into account the install prefix path

Returns:
the path for common resources
std::string openfluid::base::RuntimeEnvironment::getConfigFilePath ( std::string  Filename) const [inline]

Returns the path for a given config file (i.e. $HOME/.openfluid/Filename)

Parameters:
[in]Filenamethe given config file name
Returns:
the path

Returns the default config file path (i.e. $HOME/.openfluid/openfluid.conf)

Returns:
the default config file path
std::vector<std::string> openfluid::base::RuntimeEnvironment::getDefaultObserversPluginsPaths ( ) const [inline]
std::vector<std::string> openfluid::base::RuntimeEnvironment::getDefaultSimulatorsPluginsPaths ( ) const [inline]
boost::posix_time::time_duration openfluid::base::RuntimeEnvironment::getEffectiveSimulationDuration ( ) const [inline]
std::vector<std::string> openfluid::base::RuntimeEnvironment::getExtraObserversPluginsPaths ( ) const [inline]

Returns the extra properties list

Returns:
the extra properties list
std::vector<std::string> openfluid::base::RuntimeEnvironment::getExtraSimulatorsPluginsPaths ( ) const [inline]

Returns the full version of OpenFLUID, including status (alpha, beta, rc, ...)

Returns:
the full version as a std::string
std::string openfluid::base::RuntimeEnvironment::getHostName ( ) const [inline]

Returns the local host name (if could be determined)

Returns:
the local host name
boost::posix_time::ptime openfluid::base::RuntimeEnvironment::getIgnitionDateTime ( ) const [inline]
std::string openfluid::base::RuntimeEnvironment::getInputDir ( ) const [inline]

Returns the input directory

Returns:
the input directory
std::string openfluid::base::RuntimeEnvironment::getInputFullPath ( std::string  Filename) const [inline]

Returns the path for a given input file (i.e. InputDir/Filename)

Parameters:
[in]FilenameThe given input file name
Returns:
the path for a given input file

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).

Returns:
the install prefix path

Returns the version of OpenFLUID, composed of major and minor numbers

Returns:
the major.minor version as a std::string
Returns:
the binairies market bag subdirectory
Returns:
the market bag directory for builderexts of the current version (i.e. $HOME/.openfluid/market-bag/2.0.0/builderexts)
Returns:
the market bag directory for datasets of the current version (i.e. $HOME/.openfluid/market-bag/2.0.0/datasets)

Returns the market bag directory (i.e. $HOME/.openfluid/market-bag)

Returns:
the market bag directory
Returns:
the market bag directory for observers of the current version (i.e. $HOME/.openfluid/market-bag/2.0.0/observers)
Returns:
the market bag directory for simulators of the current version (i.e. $HOME/.openfluid/market-bag/2.0.0/simulators)
Returns:
the sources market bag subdirectory
Returns:
the market bag directory for the current OpenFLUID version (i.e. $HOME/.openfluid/market-bag/2.0.0)

Returns the path for a given observer plugin file, taking into account the observer plugins path search order

Parameters:
[in]FilenameThe given observer plugin file name
Returns:
the first path found for a given observer plugin file
std::vector<std::string> openfluid::base::RuntimeEnvironment::getObserversPluginsPaths ( ) const [inline]

Returns the ordered list of paths used to search for observer plugins

Returns:
the ordered list of paths
std::string openfluid::base::RuntimeEnvironment::getOutputDir ( ) const [inline]

Returns the output directory

Returns:
the output directory
std::string openfluid::base::RuntimeEnvironment::getOutputFullPath ( std::string  Filename) const [inline]

Returns the path for a given output file (i.e. OutputDir/Filename)

Parameters:
[in]FilenameThe given output file name
Returns:
the path for a given output file

Returns the path for provided examples, taking into account the install prefix path

Returns:
the path for provided examples

Returns the path for a given simulator plugin file, taking into account the simulator plugins path search order

Parameters:
[in]FilenameThe given simulator plugin file name
Returns:
the first path found for a given simulator plugin file
std::vector<std::string> openfluid::base::RuntimeEnvironment::getSimulatorsPluginsPaths ( ) const [inline]

Returns the ordered list of paths used to search for simulator plugins

Returns:
the ordered list of paths
std::string openfluid::base::RuntimeEnvironment::getTempDir ( ) const [inline]

Returns the path of the temporary directory

Returns:
the path of the temporary directory

Returns the translations directory

Returns:
the path for translationslocale directory
std::string openfluid::base::RuntimeEnvironment::getUserDataPath ( std::string  RelativePath) const [inline]

Returns the absolute path for a given relative path in the user OpenFLUID directory (i.e. $HOME/.openfluid/RelativePath)

Parameters:
[in]RelativePaththe given relative path
Returns:
the absolute path

Returns the path for examples in user's directory

Returns:
the path for user's examples

Returns the absolute path of the home directory

Returns:
the absolute path
std::string openfluid::base::RuntimeEnvironment::getUserID ( ) const [inline]

Returns the local user ID (if could be determined)

Returns:
the local user ID
std::string openfluid::base::RuntimeEnvironment::getVersion ( ) const [inline]

Returns the version of OpenFLUID

Returns:
the version as a std::string

Returns the clear output directory flag

Returns the write results flag

Returns:
the flag as a boolean

Returns the write simulation report flag

Returns:
the flag as a boolean

Sets the clear output directory flag

Parameters:
[in]ClearDirThe value of the flag

Sets the output directory as a directory located in the user data directory, with a name based on the current date-time

void openfluid::base::RuntimeEnvironment::setEffectiveSimulationDuration ( const boost::posix_time::time_duration &  TimeDuration) [inline]
void openfluid::base::RuntimeEnvironment::setInputDir ( const std::string  InputDir) [inline]

Sets the input directory, overriding the default input dir

Parameters:
[in]InputDirThe input directory
void openfluid::base::RuntimeEnvironment::setOutputDir ( const std::string  OutputDir) [inline]

Sets the output directory, overriding the default output dir

Parameters:
[in]OutputDirThe output directory
void openfluid::base::RuntimeEnvironment::setSimulatorsMaxNumThreads ( const unsigned int &  MaxNumThreads) [inline]
void openfluid::base::RuntimeEnvironment::setValuesBufferSize ( const unsigned int  StepsNbr) [inline]

Sets the write results flag

Parameters:
[in]WriteItThe value of the flag

Sets the write simulation report flag

Parameters:
[in]WriteItThe value of the flag

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines