-
Notifications
You must be signed in to change notification settings - Fork 0
/
ccp4_parser_fem.hpp
89 lines (77 loc) · 1.37 KB
/
ccp4_parser_fem.hpp
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#ifndef CCP4IO_ADAPTBX_CCP4_PARSER_FEM_HPP
#define CCP4IO_ADAPTBX_CCP4_PARSER_FEM_HPP
#include <fem.hpp> // Fortran EMulation library of fable module
extern "C" {
typedef unsigned int ccp4_ftn_logical;
void
parser_(
char* key,
char* line,
int* ibeg,
int* iend,
int* ityp,
float* fvalue,
/*str_arr_ref<>*/ char* cvalue,
int* idec,
int* ntok,
ccp4_ftn_logical* lend,
ccp4_ftn_logical const* print,
int key_len,
int line_len,
int cvalue_len);
} // extern "C"
namespace ccp4_parser_fem {
using namespace fem::major_types;
inline
void
lerror(
int const& errflg,
int const& ifail,
str_cref errmsg)
{
throw TBXX_NOT_IMPLEMENTED();
}
inline
void
parser(
str_ref key,
str_ref line,
arr_ref<int> ibeg,
arr_ref<int> iend,
arr_ref<int> ityp,
arr_ref<float> fvalue,
str_arr_ref<> cvalue,
arr_ref<int> idec,
int& ntok,
bool& lend,
bool const& print)
{
ccp4_ftn_logical lend_ = lend;
ccp4_ftn_logical print_ = print;
parser_(
key.elems(),
line.elems(),
ibeg.begin(),
iend.begin(),
ityp.begin(),
fvalue.begin(),
cvalue.begin(),
idec.begin(),
&ntok,
&lend_,
&print_,
key.len(),
line.len(),
cvalue.len());
lend = static_cast<bool>(lend_);
}
inline
void
putlin(
str_cref strout,
str_cref outwin)
{
throw TBXX_NOT_IMPLEMENTED();
}
} // namespace ccp4_parser_fem
#endif // GUARD