Public Member Functions | Static Public Member Functions

openfluid::base::RuntimeEnvironment Class Reference

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 getMarketBagBinVersionDir () const
std::string getMarketBagSrcVersionDir () const
std::string getDefaultConfigFile () const
std::string getConfigFilePath (std::string Filename) 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 getPluginFullPath (std::string Filename)
void addExtraPluginsPaths (std::string SemicolonSeparatedPaths)
void resetExtraPluginsPaths ()
std::vector< std::string > getDefaultPluginsPaths () const
std::vector< std::string > getExtraPluginsPaths () const
std::vector< std::string > getPluginsPaths () 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 getLocaleDir () 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::EnvironmentPropertiesgetFunctionEnvironment () const
boost::posix_time::ptime getIgnitionDateTime () const
std::string getSimulationID () const
void setSimulationID (const std::string SimID)
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 getFunctionsMaxNumThreads () const
void setFunctionsMaxNumThreads (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 setFilesBufferSize (const unsigned int Bytes)
unsigned int getFilesBufferSize () 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

openfluid::base::RuntimeEnvironment::~RuntimeEnvironment ( )

Destructor


Member Function Documentation

void openfluid::base::RuntimeEnvironment::addExtraPluginsPaths ( 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::detachFromProject ( )
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
std::string openfluid::base::RuntimeEnvironment::getCommonResourcesDir ( ) const

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
std::string openfluid::base::RuntimeEnvironment::getDefaultConfigFile ( ) const [inline]

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::getDefaultPluginsPaths ( ) const [inline]
boost::posix_time::time_duration openfluid::base::RuntimeEnvironment::getEffectiveSimulationDuration ( ) const [inline]
std::vector<std::string> openfluid::base::RuntimeEnvironment::getExtraPluginsPaths ( ) const [inline]
openfluid::base::EnvironmentProperties& openfluid::base::RuntimeEnvironment::getExtraProperties ( ) [inline]

Returns the extra properties list

Returns:
the extra properties list
unsigned int openfluid::base::RuntimeEnvironment::getFilesBufferSize ( ) const [inline]
std::string openfluid::base::RuntimeEnvironment::getFullVersion ( ) const [inline]

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

Returns:
the full version as a std::string
openfluid::base::EnvironmentProperties* openfluid::base::RuntimeEnvironment::getFunctionEnvironment ( ) const [inline]
unsigned int openfluid::base::RuntimeEnvironment::getFunctionsMaxNumThreads ( ) const [inline]
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
std::string openfluid::base::RuntimeEnvironment::getInstallPrefix ( ) const [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).

Returns:
the install prefix path
static RuntimeEnvironment* openfluid::base::RuntimeEnvironment::getInstance ( ) [static]
std::string openfluid::base::RuntimeEnvironment::getLocaleDir ( ) const

Returns the locale directory

Returns:
the path for locale directory
std::string openfluid::base::RuntimeEnvironment::getMajorMinorVersion ( ) const [inline]

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

Returns:
the major.minor version as a std::string
std::string openfluid::base::RuntimeEnvironment::getMarketBagBinVersionDir ( ) const [inline]

Returns the market bag directory for the current OpenFLUID version (i.e. $HOME/.openfluid/market-bag/linux-i386/1.6.2~alpha1)

Returns:
the market bag directory for the current version
std::string openfluid::base::RuntimeEnvironment::getMarketBagDir ( ) const [inline]

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

Returns:
the market bag directory
std::string openfluid::base::RuntimeEnvironment::getMarketBagSrcVersionDir ( ) const [inline]

Returns the market bag directory for the current OpenFLUID version (i.e. $HOME/.openfluid/market-bag/src/1.6)

Returns:
the market bag directory for the current version
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
std::string openfluid::base::RuntimeEnvironment::getPluginFullPath ( std::string  Filename)

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

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

Returns the ordered list of paths used to search for plugins

Returns:
the ordered list of paths
openfluid::core::DateTime openfluid::base::RuntimeEnvironment::getSimulationEndTime ( ) const [inline]
std::string openfluid::base::RuntimeEnvironment::getSimulationID ( ) const [inline]
openfluid::core::DateTime openfluid::base::RuntimeEnvironment::getSimulationStartTime ( ) const [inline]
int openfluid::base::RuntimeEnvironment::getSimulationTimeStep ( ) const [inline]
std::string openfluid::base::RuntimeEnvironment::getTempDir ( ) const [inline]

Returns the path of the temporary directory

Returns:
the path of the temporary 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
std::string openfluid::base::RuntimeEnvironment::getUserID ( ) const [inline]

Returns the local user ID (if could be determined)

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

Returns the version of OpenFLUID

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

Returns the clear output directory flag

bool openfluid::base::RuntimeEnvironment::isLinkedToProject ( ) [inline]
bool openfluid::base::RuntimeEnvironment::isSimulationProfilingEnabled ( ) const [inline]
bool openfluid::base::RuntimeEnvironment::isUserValuesBufferSize ( ) const [inline]
bool openfluid::base::RuntimeEnvironment::isWriteResults ( ) const [inline]

Returns the write results flag

Returns:
the flag as a boolean
bool openfluid::base::RuntimeEnvironment::isWriteSimReport ( ) const [inline]

Returns the write simulation report flag

Returns:
the flag as a boolean
void openfluid::base::RuntimeEnvironment::linkToProject ( )
void openfluid::base::RuntimeEnvironment::resetExtraPluginsPaths ( ) [inline]
void openfluid::base::RuntimeEnvironment::setClearOutputDir ( bool  ClearDir) [inline]

Sets the clear output directory flag

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

void openfluid::base::RuntimeEnvironment::setEffectiveSimulationDuration ( const boost::posix_time::time_duration &  TimeDuration) [inline]
void openfluid::base::RuntimeEnvironment::setFilesBufferSize ( const unsigned int  Bytes) [inline]
void openfluid::base::RuntimeEnvironment::setFunctionsMaxNumThreads ( const unsigned int &  MaxNumThreads) [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::setSimulationID ( const std::string  SimID) [inline]
void openfluid::base::RuntimeEnvironment::setSimulationProfilingEnabled ( bool  Profiling) [inline]
void openfluid::base::RuntimeEnvironment::setSimulationTimeInformation ( openfluid::core::DateTime  StartTime,
openfluid::core::DateTime  EndTime,
int  TimeStep 
)
void openfluid::base::RuntimeEnvironment::setValuesBufferSize ( const unsigned int  StepsNbr) [inline]
void openfluid::base::RuntimeEnvironment::setWriteResults ( bool  WriteIt) [inline]

Sets the write results flag

Parameters:
[in]WriteItThe value of the flag
void openfluid::base::RuntimeEnvironment::setWriteSimReport ( bool  WriteIt) [inline]

Sets the write simulation report flag

Parameters:
[in]WriteItThe value of the flag
void openfluid::base::RuntimeEnvironment::unsetUserValuesBufferSize ( ) [inline]

Generated using Doxygen 1.7.3
Creative Commons License Creative Commons By-NC-ND license