Public Member Functions | Static Public Member Functions | List of all members
openfluid::base::RunContextManager Class Reference

#include <base/RunContextManager.hpp>

Inheritance diagram for openfluid::base::RunContextManager:
Inheritance graph
[legend]
Collaboration diagram for openfluid::base::RunContextManager:
Collaboration graph
[legend]

Public Member Functions

std::string getInputDir () const
 
std::string getInputFullPath (const std::string &Filename) const
 
void setInputDir (const std::string &InputDir)
 
std::string getOutputDir () const
 
std::string getOutputFullPath (const std::string &Filename) const
 
void setOutputDir (const std::string &OutputDir)
 
void setDateTimeOutputDir ()
 
bool isClearOutputDir () const
 
void setClearOutputDir (bool Enabled)
 
bool isProfiling () const
 
void setProfiling (bool Enabled)
 
unsigned int getValuesBufferUserSize () const
 
void setValuesBufferUserSize (unsigned int Size)
 
void unsetValuesBufferUserSize ()
 
bool isValuesBufferUserSize () const
 
unsigned int getWaresMaxNumThreads () const
 
void setWaresMaxNumThreads (unsigned int Num)
 
void resetWaresMaxNumThreads ()
 
openfluid::core::MapValueextraProperties ()
 
const openfluid::core::MapValuegetWaresEnvironment () const
 
void processWareParams (openfluid::ware::WareParams_t &Params) const
 
std::string getProjectPath () const
 
std::string getProjectName () const
 
void setProjectName (const std::string &Name)
 
std::string getProjectDescription () const
 
void setProjectDescription (const std::string &Description)
 
std::string getProjectAuthors () const
 
void setProjectAuthors (const std::string &Authors)
 
std::string getProjectCreationDate () const
 
void setProjectCreationDate (const std::string &CreationDate)
 
void setProjectCreationDateAsNow ()
 
std::string getProjectLastModDate () const
 
void setProjectLastModDate (const std::string &LastModDate)
 
bool isProjectIncrementalOutputDir () const
 
void setProjectIncrementalOutputDir (const bool Inc)
 
bool openProject (const std::string &Path)
 
bool createProject (const std::string &Path, const std::string &Name, const std::string &Description, const std::string &Authors, const bool Inc)
 
bool isProjectOpen () const
 
bool saveProject ()
 
void closeProject ()
 
void updateProjectOutputDir ()
 
QVariant getProjectConfigValue (const QString &Group, const QString &Key) const
 
void setProjectConfigValue (const QString &Group, const QString &Key, const QVariant &Value)
 

Static Public Member Functions

static bool isProject (const std::string &Path)
 
static bool getProjectInfos (const std::string &Path, std::string &Name, std::string &Description, std::string &Authors, std::string &CreationDate, std::string &LastModDate)
 
- Static Public Member Functions inherited from openfluid::base::Environment
static void init ()
 
static std::string getHostName ()
 
static std::string getSystemArch ()
 
static int getIdealThreadCount ()
 
static std::string getUserName ()
 
static std::string getVersion ()
 
static std::string getVersionFull ()
 
static std::string getVersionMajorMinor ()
 
static std::string getTempDir ()
 
static std::string getInstallPrefix ()
 
static std::string getUserHomeDir ()
 
static std::string getUserDataDir ()
 
static std::string getUserDataFullPath (const std::string &Path)
 
static std::string getUserExamplesDir ()
 
static std::string getProvidedExamplesDir ()
 
static void prepareUserDataDirectory ()
 
static std::string getConfigFile ()
 
static std::string getTranslationsDir ()
 
static std::string getCommonResourcesDir ()
 
static std::string getCommonResourcesFullPath (const std::string &Path)
 
static std::string getAppResourcesDir (const std::string &AppName)
 
static std::string getAppResourcesFullPath (const std::string &AppName, const std::string &Path)
 
static std::vector< std::string > getSimulatorsDirs ()
 
static std::vector< std::string > getDefaultSimulatorsDirs ()
 
static std::vector< std::string > getExtraSimulatorsDirs ()
 
static void addExtraSimulatorsDirs (const std::string &Paths)
 
static void resetExtraSimulatorsDirs ()
 
static std::string getSimulatorFullPath (const std::string &Filename)
 
static std::vector< std::string > getObserversDirs ()
 
static std::vector< std::string > getDefaultObserversDirs ()
 
static std::vector< std::string > getExtraObserversDirs ()
 
static void addExtraObserversDirs (const std::string &Paths)
 
static void resetExtraObserversDirs ()
 
static std::string getObserverFullPath (const std::string &Filename)
 
static std::vector< std::string > getBuilderextsDirs ()
 
static std::vector< std::string > getDefaultBuilderextsDirs ()
 
static std::vector< std::string > getExtraBuilderextsDirs ()
 
static void addExtraBuilderextsDirs (const std::string &Paths)
 
static void resetExtraBuilderextsDirs ()
 
static std::string getBuilderextFullPath (const std::string &Filename)
 
static std::string getMarketBagBinSubDir ()
 
static std::string getMarketBagBuilderextsDir ()
 
static std::string getMarketBagDataDir ()
 
static std::string getMarketBagDir ()
 
static std::string getMarketBagObserversDir ()
 
static std::string getMarketBagSimulatorsDir ()
 
static std::string getMarketBagSrcSubDir ()
 
static std::string getMarketBagVersionDir ()
 

Additional Inherited Members

- Protected Member Functions inherited from openfluid::base::Environment
 Environment ()
 
- Static Protected Member Functions inherited from openfluid::base::Environment
static std::string getWareFullPath (const std::vector< std::string > &Dirs, const std::string &Filename)
 
- Static Protected Attributes inherited from openfluid::base::Environment
static std::string m_SystemArch
 
static std::string m_HostName
 
static std::string m_UserName
 
static std::string m_Version
 
static std::string m_VersionFull
 
static std::string m_VersionMajorMinor
 
static std::string m_InstallPrefix
 
static std::string m_TempDir
 
static std::string m_UserHomeDir
 
static std::string m_UserDataDir
 
static std::string m_ConfigFile
 
static std::vector< std::string > m_DefaultSimulatorsDirs
 
static std::vector< std::string > m_ExtraSimulatorsDirs
 
static std::vector< std::string > m_DefaultObserversDirs
 
static std::vector< std::string > m_ExtraObserversDirs
 
static std::vector< std::string > m_DefaultBuilderextsDirs
 
static std::vector< std::string > m_ExtraBuilderextsDirs
 
static std::string m_ProvidedExamplesDir
 
static std::string m_UserExamplesDir
 
static std::string m_MarketBagDir
 
static std::string m_MarketBagVersionDir
 
static std::string m_MarketBagSimulatorsDir
 
static std::string m_MarketBagObserversDir
 
static std::string m_MarketBagBuilderextsDir
 
static std::string m_MarketBagDataDir
 
static std::string m_MarketBagBinSubDir
 
static std::string m_MarketBagSrcSubDir
 
static std::string m_TranslationsDir
 
static std::string m_CommonResourcesDir
 
static std::string m_AppsResourcesDir
 
static int m_IdealThreadCount
 

Member Function Documentation

void openfluid::base::RunContextManager::closeProject ( )
bool openfluid::base::RunContextManager::createProject ( const std::string &  Path,
const std::string &  Name,
const std::string &  Description,
const std::string &  Authors,
const bool  Inc 
)
openfluid::core::MapValue& openfluid::base::RunContextManager::extraProperties ( )
inline
std::string openfluid::base::RunContextManager::getInputDir ( ) const
inline

Returns the full path of the simulation input directory

Returns
the full path of the directory
std::string openfluid::base::RunContextManager::getInputFullPath ( const std::string &  Filename) const
inline

Returns the full path of a file or directory relative to the simulation input directory

Parameters
[in]Filenamethe path relative to the simulation input directory
Returns
the full path to the file or directory
std::string openfluid::base::RunContextManager::getOutputDir ( ) const
inline

Returns the full path of the simulation output directory

Returns
the full path of the directory
std::string openfluid::base::RunContextManager::getOutputFullPath ( const std::string &  Filename) const
inline

Returns the full path of a file or directory relative to the simulation output directory

Parameters
[in]Filenamethe path relative to the simulation output directory
Returns
the full path to the file or directory
std::string openfluid::base::RunContextManager::getProjectAuthors ( ) const
inline
QVariant openfluid::base::RunContextManager::getProjectConfigValue ( const QString &  Group,
const QString &  Key 
) const
std::string openfluid::base::RunContextManager::getProjectCreationDate ( ) const
inline
std::string openfluid::base::RunContextManager::getProjectDescription ( ) const
inline
static bool openfluid::base::RunContextManager::getProjectInfos ( const std::string &  Path,
std::string &  Name,
std::string &  Description,
std::string &  Authors,
std::string &  CreationDate,
std::string &  LastModDate 
)
static
std::string openfluid::base::RunContextManager::getProjectLastModDate ( ) const
inline
std::string openfluid::base::RunContextManager::getProjectName ( ) const
inline
std::string openfluid::base::RunContextManager::getProjectPath ( ) const
inline
unsigned int openfluid::base::RunContextManager::getValuesBufferUserSize ( ) const
inline

Returns the size of the buffer set by the user for simulation variables values

Returns
the size of the buffer
const openfluid::core::MapValue& openfluid::base::RunContextManager::getWaresEnvironment ( ) const
inline
unsigned int openfluid::base::RunContextManager::getWaresMaxNumThreads ( ) const
inline

Returns the value for maximum threads count to be used in OpenFLUID wares (simulators, observers, ...)

Returns
the maximum threads count
bool openfluid::base::RunContextManager::isClearOutputDir ( ) const
inline

Returns the status of automatic cleaning of output directory before simulation run

Returns
true if enabled, false if disabled
bool openfluid::base::RunContextManager::isProfiling ( ) const
inline

Returns the status of simulation profiling

Returns
true if enabled, false if disabled
static bool openfluid::base::RunContextManager::isProject ( const std::string &  Path)
static
bool openfluid::base::RunContextManager::isProjectIncrementalOutputDir ( ) const
inline
bool openfluid::base::RunContextManager::isProjectOpen ( ) const
inline
bool openfluid::base::RunContextManager::isValuesBufferUserSize ( ) const
inline

Returns true if the size of the buffer for simulation variables values has been set by the user

Returns
true if set by user (size > 0), false otherwise
bool openfluid::base::RunContextManager::openProject ( const std::string &  Path)
void openfluid::base::RunContextManager::processWareParams ( openfluid::ware::WareParams_t Params) const
void openfluid::base::RunContextManager::resetWaresMaxNumThreads ( )

Resets the value for maximum threads count to be used in OpenFLUID wares (simulators, observers, ...). The value is reset to the ideal thread count given by the OpenFLUID environment

bool openfluid::base::RunContextManager::saveProject ( )
void openfluid::base::RunContextManager::setClearOutputDir ( bool  Enabled)
inline

Sets the status of automatic cleaning of output directory before simulation run

Parameters
Enabledset to true to enable
void openfluid::base::RunContextManager::setDateTimeOutputDir ( )
void openfluid::base::RunContextManager::setInputDir ( const std::string &  InputDir)

Sets the full path of the simulation input directory

Returns
the full path of the directory
void openfluid::base::RunContextManager::setOutputDir ( const std::string &  OutputDir)

Sets the full path of the simulation output directory

Returns
the full path of the directory
void openfluid::base::RunContextManager::setProfiling ( bool  Enabled)
inline

Sets the status of simulation profiling

Parameters
Enabledset to true to enable
void openfluid::base::RunContextManager::setProjectAuthors ( const std::string &  Authors)
inline
void openfluid::base::RunContextManager::setProjectConfigValue ( const QString &  Group,
const QString &  Key,
const QVariant &  Value 
)
void openfluid::base::RunContextManager::setProjectCreationDate ( const std::string &  CreationDate)
inline
void openfluid::base::RunContextManager::setProjectCreationDateAsNow ( )
inline
void openfluid::base::RunContextManager::setProjectDescription ( const std::string &  Description)
inline
void openfluid::base::RunContextManager::setProjectIncrementalOutputDir ( const bool  Inc)
inline
void openfluid::base::RunContextManager::setProjectLastModDate ( const std::string &  LastModDate)
inline
void openfluid::base::RunContextManager::setProjectName ( const std::string &  Name)
inline
void openfluid::base::RunContextManager::setValuesBufferUserSize ( unsigned int  Size)
inline

Sets the size of the buffer set by the user for simulation variables values

Parameters
[in]Sizethe size of the buffer
void openfluid::base::RunContextManager::setWaresMaxNumThreads ( unsigned int  Num)
inline

Sets the value for maximum threads count to be used in OpenFLUID wares (simulators, observers, ...)

Parameters
[in]Numthe maximum threads count
void openfluid::base::RunContextManager::unsetValuesBufferUserSize ( )
inline

Unsets the size of the buffer set by the user for simulation variables values

Returns
the size of the buffer
void openfluid::base::RunContextManager::updateProjectOutputDir ( )

The documentation for this class was generated from the following file: