Skip to main content

Common Fluids Format 2024 R1

SimBase

Last update: 16.07.2025
1#ifndef CFFSDK_PROJECT_SIMBase_H
2#define CFFSDK_PROJECT_SIMBase_H
3
4#include "Project/LibraryType.hpp"
5#include "Project/Iterator.hpp"
6
7namespace ansys {
8namespace Project {
9
10class Metadata;
11
12class ANSYS_PROJECT_DLL SimBase
13{
14public:
15 bool ok() const;
16 virtual Error isValid() const = 0;
17
18 std::string getName() const;
19
20 // Case
21 virtual Iterator getCase() const;
22 Iterator setCase(Iterator pCaseFile);
23
24 void setMainDataType(const std::string& pDataType);
25 std::string getMainDataType() const;
26
27 // Inputs
28 Iterator copyInput(Path pPath,bool pInInputFolder=false);
29 Iterator setInput(Path pPath);
30 //Error importInput(URL pURL,std::string pName);
31 std::vector<Iterator> getInputs(Error* pErrorPtr=0) const;
32 Iterator getInputByType(const std::string& pType,std::string pSubtype="") const;
33 std::vector<Iterator> getInputsByType(const std::string& pType,std::string pSubtype="",Error* pErrorPtr=0) const;
34
35 Metadata& getMeta();
36 const Metadata& getMeta() const;
37
38 virtual Iterator getIterator() const;
39 operator Iterator() const { return getIterator(); };
40
41protected:
42 SimBase(Iterator pIter);
43 virtual ~SimBase() {};
44
45 Iterator aIter;
46
47 // Utilities
48 Error copyDatafileMeta(const Iterator& pInput,
49 Iterator& pOutput);
50};
51
52}
53}
54
55#endif // CFFSDK_PROJECT_SIMULATION_H
The return state / error value of a Project function call.
Definition: Error.hpp:11
Pointer to a project location.
Definition: Iterator.hpp:20
Dictionary of values associated with an Iterator.
Definition: Metadata.hpp:19
Paths used for internal Project filesystem.
Definition: Path.hpp:11
Base class for Run and Simulation - shared functions.
Definition: SimBase.hpp:13
Definition: API.dox:1

Connect with Ansys