40 #ifndef __OPENFLUID_BASE_RUNCONTEXTMANAGER_HPP__ 41 #define __OPENFLUID_BASE_RUNCONTEXTMANAGER_HPP__ 53 #include <openfluid/ware/TypeDefs.hpp> 68 std::string m_OutputDir;
70 std::string m_InputDir;
72 bool m_IsClearOutputDir;
76 unsigned int m_ValuesBufferSize;
78 unsigned int m_WaresMaxNumThreads;
84 QSettings* mp_ProjectFile;
86 std::string m_ProjectPath;
88 std::string m_ProjectName;
90 std::string m_ProjectDescription;
92 std::string m_ProjectAuthors;
94 std::string m_ProjectCreationDate;
96 std::string m_ProjectLastModDate;
98 bool m_ProjectIncOutputDir;
100 bool m_ProjectIsOpen;
102 static QString m_ProjectFileGroupName;
108 static std::string getNow();
110 void updateWaresEnvironment();
112 static std::string getFilePathFromProjectPath(
const std::string& ProjectPath);
114 static std::string getInputDirFromProjectPath(
const std::string& ProjectPath);
116 static std::string getOuputDirFromProjectPath(
const std::string& ProjectPath);
118 static bool checkProject(
const std::string& ProjectPath);
139 return m_InputDir +
"/" + Filename;
146 void setInputDir(
const std::string& InputDir);
164 return m_OutputDir +
"/" + Filename;
171 void setOutputDir(
const std::string& OutputDir);
173 void setDateTimeOutputDir();
181 return m_IsClearOutputDir;
190 m_IsClearOutputDir = Enabled;
199 return m_IsProfiling;
208 m_IsProfiling = Enabled;
217 return m_ValuesBufferSize;
226 m_ValuesBufferSize = Size;
234 { m_ValuesBufferSize = 0; }
242 return (m_ValuesBufferSize > 0);
251 return m_WaresMaxNumThreads;
260 m_WaresMaxNumThreads = Num;
267 void resetWaresMaxNumThreads();
271 return m_ExtraProperties;
276 return m_WaresSharedEnvironment;
283 return m_ProjectPath;
288 return m_ProjectName;
293 m_ProjectName = Name;
298 return m_ProjectDescription;
303 m_ProjectDescription = Description;
308 return m_ProjectAuthors;
313 m_ProjectAuthors = Authors;
318 return m_ProjectCreationDate;
323 m_ProjectCreationDate = CreationDate;
328 m_ProjectCreationDate = getNow();
333 return m_ProjectLastModDate;
338 m_ProjectLastModDate = LastModDate;
343 return m_ProjectIncOutputDir;
348 m_ProjectIncOutputDir = Inc;
351 bool openProject(
const std::string& Path);
353 bool createProject(
const std::string& Path,
const std::string& Name,
354 const std::string& Description,
const std::string& Authors,
359 return m_ProjectIsOpen;
366 static bool isProject(
const std::string& Path);
368 static bool getProjectInfos(
const std::string& Path,
369 std::string& Name, std::string& Description, std::string& Authors,
370 std::string& CreationDate, std::string& LastModDate);
372 void updateProjectOutputDir();
374 QVariant getProjectConfigValue(
const QString& Group,
const QString& Key)
const;
376 void setProjectConfigValue(
const QString& Group,
const QString& Key,
const QVariant& Value);
Definition: RunContextManager.hpp:60
unsigned int getValuesBufferUserSize() const
Definition: RunContextManager.hpp:215
void setProjectCreationDateAsNow()
Definition: RunContextManager.hpp:326
std::string getProjectLastModDate() const
Definition: RunContextManager.hpp:331
std::string getProjectPath() const
Definition: RunContextManager.hpp:281
std::string getInputDir() const
Definition: RunContextManager.hpp:127
void setProjectDescription(const std::string &Description)
Definition: RunContextManager.hpp:301
bool isProjectOpen() const
Definition: RunContextManager.hpp:357
bool isClearOutputDir() const
Definition: RunContextManager.hpp:179
std::string getProjectDescription() const
Definition: RunContextManager.hpp:296
void setProjectLastModDate(const std::string &LastModDate)
Definition: RunContextManager.hpp:336
std::map< WareParamKey_t, WareParamValue_t > WareParams_t
Definition: TypeDefs.hpp:128
void setProjectCreationDate(const std::string &CreationDate)
Definition: RunContextManager.hpp:321
void setClearOutputDir(bool Enabled)
Definition: RunContextManager.hpp:188
std::string getOutputFullPath(const std::string &Filename) const
Definition: RunContextManager.hpp:162
std::string getProjectName() const
Definition: RunContextManager.hpp:286
const openfluid::core::MapValue & getWaresEnvironment() const
Definition: RunContextManager.hpp:274
void setProjectAuthors(const std::string &Authors)
Definition: RunContextManager.hpp:311
void setProjectIncrementalOutputDir(const bool Inc)
Definition: RunContextManager.hpp:346
unsigned int getWaresMaxNumThreads() const
Definition: RunContextManager.hpp:249
Definition: MapValue.hpp:92
std::string getOutputDir() const
Definition: RunContextManager.hpp:152
Definition: ApplicationException.hpp:47
#define OPENFLUID_SINGLETON_DEFINITION(T)
Definition: SingletonMacros.hpp:55
void setProfiling(bool Enabled)
Definition: RunContextManager.hpp:206
#define OPENFLUID_API
Definition: dllexport.hpp:86
std::string getProjectCreationDate() const
Definition: RunContextManager.hpp:316
std::string getInputFullPath(const std::string &Filename) const
Definition: RunContextManager.hpp:137
Definition: Environment.hpp:52
bool isProjectIncrementalOutputDir() const
Definition: RunContextManager.hpp:341
void setWaresMaxNumThreads(unsigned int Num)
Definition: RunContextManager.hpp:258
void setProjectName(const std::string &Name)
Definition: RunContextManager.hpp:291
void setValuesBufferUserSize(unsigned int Size)
Definition: RunContextManager.hpp:224
bool isValuesBufferUserSize() const
Definition: RunContextManager.hpp:240
bool isProfiling() const
Definition: RunContextManager.hpp:197
std::string getProjectAuthors() const
Definition: RunContextManager.hpp:306
void unsetValuesBufferUserSize()
Definition: RunContextManager.hpp:233
openfluid::core::MapValue & extraProperties()
Definition: RunContextManager.hpp:269