VAPOR3 3.9.4
CalcEngineMgr.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4#include <vapor/DataMgr.h>
5
6namespace VAPoR {
7
8class DataStatus;
9class ParamsMgr;
10class PyEngine;
11
15//
17public:
22 //
23 CalcEngineMgr(DataStatus *dataStatus, ParamsMgr *paramsMgr)
24 {
25 VAssert(dataStatus != NULL);
26 VAssert(paramsMgr != NULL);
27
28 _dataStatus = dataStatus;
29 _paramsMgr = paramsMgr;
30 }
31
33
34 int AddFunction(string scriptType, string dataSetName, string scriptName, string script, const vector<string> &inputVarNames, const vector<string> &outputVarNames,
35 const vector<string> &outputVarMeshes, bool coordFlag = false);
36
37 void RemoveFunction(string scriptType, string dataSetName, string scriptName);
38
39 bool GetFunctionScript(string scriptType, string datasetName, string scriptName, string &script, vector<string> &inputVarNames, vector<string> &outputVarNames, vector<string> &outputVarMeshes,
40 bool &coordFlag);
41
42 string GetFunctionStdout(string scriptType, string dataSetName, string scriptName);
43
44 std::vector<string> GetFunctionNames(string scriptType, string datasetName);
45
50 //
51 void ReinitFromState() { _sync(); }
52
56 void Clean() { _clean(); }
57
58private:
59 const DataStatus *_dataStatus;
60 const ParamsMgr * _paramsMgr;
61
62 CalcEngineMgr() {}
63 void _sync();
64 void _clean();
65
66 std::map<string, PyEngine *> _pyScripts;
67};
68}; // namespace VAPoR
#define VAssert(expr)
Definition: VAssert.h:9
A class for managing CalcEngine class instances.
Definition: CalcEngineMgr.h:16
std::vector< string > GetFunctionNames(string scriptType, string datasetName)
CalcEngineMgr(DataStatus *dataStatus, ParamsMgr *paramsMgr)
Definition: CalcEngineMgr.h:23
int AddFunction(string scriptType, string dataSetName, string scriptName, string script, const vector< string > &inputVarNames, const vector< string > &outputVarNames, const vector< string > &outputVarMeshes, bool coordFlag=false)
bool GetFunctionScript(string scriptType, string datasetName, string scriptName, string &script, vector< string > &inputVarNames, vector< string > &outputVarNames, vector< string > &outputVarMeshes, bool &coordFlag)
string GetFunctionStdout(string scriptType, string dataSetName, string scriptName)
void RemoveFunction(string scriptType, string dataSetName, string scriptName)
A class for describing the currently loaded dataset.
Definition: DataStatus.h:50
A singleton class for managing Params instances.
Definition: ParamsMgr.h:53
Wasp base class.
Definition: MyBase.h:67
#define RENDER_API
Definition: common.h:78