File indexing completed on 2026-06-02 08:51:49
0001 #ifndef RESOURCE_MANAGER_H
0002 #define RESOURCE_MANAGER_H
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include <ctime>
0012 #include <map>
0013 #include <memory>
0014 #include <string>
0015 #include <utility>
0016
0017 #include "beans/automation/Scenario.h"
0018 #include "beans/Computation.h"
0019
0020 namespace PARTONS {
0021
0022
0023
0024
0025
0026
0027 class ResourceManager: public BaseObject {
0028 public:
0029
0030
0031
0032
0033
0034 static ResourceManager* getInstance();
0035
0036
0037
0038
0039 virtual ~ResourceManager();
0040
0041 Scenario* getScenarioByHashSum(const std::string &hashSum) const;
0042
0043 Scenario* registerScenario(Scenario* pScenario);
0044 Scenario* registerScenario(
0045 const std::string &description,
0046 const std::string &filePath, const std::string &hashSum,
0047 const std::string &file);
0048
0049 Computation* getComputationPointer(const time_t &datetime);
0050 Computation* newComputationObject();
0051
0052 private:
0053
0054
0055
0056 static ResourceManager* m_pInstance;
0057
0058
0059
0060
0061 ResourceManager();
0062
0063
0064
0065
0066 std::map<std::string, std::pair<Scenario*, unsigned int> > m_scenarioResourceList;
0067
0068
0069
0070
0071 std::map<time_t, std::pair<std::unique_ptr<Computation>, unsigned int> > computationList;
0072 };
0073
0074 }
0075
0076 #endif