-
Notifications
You must be signed in to change notification settings - Fork 2
/
h5cgnspolydatasolution.h
65 lines (48 loc) · 2.17 KB
/
h5cgnspolydatasolution.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef H5CGNSPOLYDATASOLUTION_H
#define H5CGNSPOLYDATASOLUTION_H
#include "iriclib_global.h"
#include "h5util.h"
#include <hdf5.h>
#include <string>
#include <vector>
namespace iRICLib {
class H5CgnsZone;
class IRICLIBDLL H5CgnsPolyDataSolution
{
public:
const static int POLYGON = 1;
const static int POLYLINE = 2;
H5CgnsPolyDataSolution(const std::string& name, hid_t groupId, H5CgnsZone* zone);
~H5CgnsPolyDataSolution();
std::string name() const;
void writeBegin(const std::string& groupName);
int writeEnd();
void writePolygon(std::vector<double>& x, std::vector<double>& y);
void writePolyline(std::vector<double>& x, std::vector<double>& y);
void writeValue(const std::string& name, int value);
void writeValue(const std::string& name, double value);
int readGroupNames(std::vector<std::string>* names) const;
int dataCount(const std::string& groupName, int* count);
int coordinatesCount(const std::string& groupName, int* count);
int readValueNames(const std::string& groupName, std::vector<std::string>* names) const;
int readValueNames(const std::string& groupName, std::unordered_set<std::string>* names) const;
int readCoordinatesX(const std::string& groupName, std::vector<double>* values) const;
int readCoordinatesY(const std::string& groupName, std::vector<double>* values) const;
int readTypes(const std::string& groupName, std::vector<int>* values) const;
int readSizes(const std::string& groupName, std::vector<int>* values) const;
int readValueType(const std::string& groupName, const std::string& valueName, H5Util::DataArrayValueType *type) const;
int readValue(const std::string& groupName, const std::string& valueName, std::vector<int>* values) const;
int readValue(const std::string& groupName, const std::string& valueName, std::vector<double>* values) const;
int readValueAsDouble(const std::string& groupName, const std::string& valueName, std::vector<double>* values) const;
H5CgnsZone* zone() const;
class GroupReader;
GroupReader groupReader(const std::string& name);
private:
class Impl;
Impl* impl;
};
} // namespace iRICLib
#ifdef _DEBUG
#include "private/h5cgnspolydatasolution_impl.h"
#endif // _DEBUG
#endif // H5CGNSPOLYDATASOLUTION_H