-
Notifications
You must be signed in to change notification settings - Fork 2
/
h5cgnssolverinformation.cpp
64 lines (51 loc) · 1.92 KB
/
h5cgnssolverinformation.cpp
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
#include "error_macros.h"
#include "h5cgnssolverinformation.h"
#include "h5util.h"
#include "iriclib_errorcodes.h"
#include "internal/iric_logger.h"
#include "private/h5cgnssolverinformation_impl.h"
using namespace iRICLib;
H5CgnsSolverInformation::H5CgnsSolverInformation(hid_t groupId) :
impl {new Impl {}}
{
impl->m_groupId = groupId;
_IRIC_LOGGER_TRACE_CALL_START("H5Util::getGroupNames");
int ier = H5Util::getGroupNames(impl->m_groupId, &(impl->m_names));
_IRIC_LOGGER_TRACE_CALL_END_WITHVAL("H5Util::getGroupNames", ier);
}
H5CgnsSolverInformation::~H5CgnsSolverInformation()
{
delete impl;
}
int H5CgnsSolverInformation::readSolverName(std::string* name)
{
_IRIC_LOGGER_TRACE_CALL_START("H5Util::readDataArrayValue");
int ier = H5Util::readDataArrayValue(impl->m_groupId, "Name", name);
_IRIC_LOGGER_TRACE_CALL_END_WITHVAL("H5Util::readDataArrayValue", ier);
RETURN_IF_ERR;
return IRIC_NO_ERROR;
}
int H5CgnsSolverInformation::readSolverVersion(std::string* version)
{
_IRIC_LOGGER_TRACE_CALL_START("H5Util::readDataArrayValue");
int ier = H5Util::readDataArrayValue(impl->m_groupId, "Version", version);
_IRIC_LOGGER_TRACE_CALL_END_WITHVAL("H5Util::readDataArrayValue", ier);
RETURN_IF_ERR;
return IRIC_NO_ERROR;
}
int H5CgnsSolverInformation::writeSolverName(const std::string& name)
{
_IRIC_LOGGER_TRACE_CALL_START("H5Util::updateOrCreateDataArray");
int ier = H5Util::updateOrCreateDataArray(impl->m_groupId, "Name", name, &(impl->m_names));
_IRIC_LOGGER_TRACE_CALL_END_WITHVAL("H5Util::updateOrCreateDataArray", ier);
RETURN_IF_ERR;
return IRIC_NO_ERROR;
}
int H5CgnsSolverInformation::writeSolverVersion(const std::string& version)
{
_IRIC_LOGGER_TRACE_CALL_START("H5Util::updateOrCreateDataArray");
int ier = H5Util::updateOrCreateDataArray(impl->m_groupId, "Version", version, &(impl->m_names));
_IRIC_LOGGER_TRACE_CALL_END_WITHVAL("H5Util::updateOrCreateDataArray", ier);
RETURN_IF_ERR;
return IRIC_NO_ERROR;
}