xref: /phasta/phSolver/common/phio_stream.h (revision 7acde132a6def0fe2daaec0d1a712dff0e5c6636)
147926302SCameron Smith #ifndef PHSOLVER_PHIO_STREAM_H
247926302SCameron Smith #define PHSOLVER_PHIO_STREAM_H
347926302SCameron Smith #include "phio_base.h"
447926302SCameron Smith #include "phstream.h"
547926302SCameron Smith struct streamio_file : phio_file {
6ecf8d2a9SCameron Smith   RStream* rs;
7ecf8d2a9SCameron Smith   GRStream* grs;
847926302SCameron Smith };
947926302SCameron Smith typedef struct streamio_file* stream_fp;
10ecf8d2a9SCameron Smith void stream_openfile(
1147926302SCameron Smith     const char filename[],
1247926302SCameron Smith     phio_fp fileDescriptor);
13a486e66cSCameron Smith void stream_readheader(
14a486e66cSCameron Smith     int* fileDescriptor,
15a486e66cSCameron Smith     const  char keyphrase[],
16a486e66cSCameron Smith     void* valueArray,
17a486e66cSCameron Smith     int*  nItems,
18a486e66cSCameron Smith     const char  datatype[],
19a486e66cSCameron Smith     const char  iotype[] );
20*ea868eb1SCameron Smith void stream_writeheader(
21*ea868eb1SCameron Smith     const int* fileDescriptor,
22*ea868eb1SCameron Smith     const char keyphrase[],
23*ea868eb1SCameron Smith     const void* valueArray,
24*ea868eb1SCameron Smith     const int* nItems,
25*ea868eb1SCameron Smith     const int* ndataItems,
26*ea868eb1SCameron Smith     const char datatype[],
27*ea868eb1SCameron Smith     const char iotype[] );
28a486e66cSCameron Smith void stream_readdatablock(
29a486e66cSCameron Smith     int* fileDescriptor,
30a486e66cSCameron Smith     const  char keyphrase[],
31a486e66cSCameron Smith     void* valueArray,
32a486e66cSCameron Smith     int*  nItems,
33a486e66cSCameron Smith     const char  datatype[],
34a486e66cSCameron Smith     const char  iotype[] );
35*ea868eb1SCameron Smith void stream_writedatablock(
36*ea868eb1SCameron Smith     const int* fileDescriptor,
37*ea868eb1SCameron Smith     const char keyphrase[],
38*ea868eb1SCameron Smith     const void* valueArray,
39*ea868eb1SCameron Smith     const int* nItems,
40*ea868eb1SCameron Smith     const char datatype[],
41*ea868eb1SCameron Smith     const char iotype[]);
4247926302SCameron Smith void stream_closefile(
4347926302SCameron Smith     phio_fp fileDescriptor);
4447926302SCameron Smith void stream_constructname(
4547926302SCameron Smith     const char* in,
4647926302SCameron Smith     char* out);
4747926302SCameron Smith #endif
48