xref: /phasta/phSolver/common/phio_base.h (revision 7acde132a6def0fe2daaec0d1a712dff0e5c6636) !
1 #ifndef PHSOLVER_PHIO_BASE_H
2 #define PHSOLVER_PHIO_BASE_H
3 struct phio_file {
4   struct phio_ops const* ops;
5   int* file;
6   char mode;
7 };
8 typedef struct phio_file* phio_fp;
9 struct phio_ops {
10   void (*openfile)(
11       const  char keyphrase[],
12       phio_fp fileDescriptor);
13   void (*closefile)(
14       phio_fp fileDescriptor);
15   void (*readheader)(
16       int* fileDescriptor,
17       const  char keyphrase[],
18       void* valueArray,
19       int*  nItems,
20       const char  datatype[],
21       const char  iotype[] );
22   void (*writeheader)(
23       const int* fileDescriptor,
24       const char keyphrase[],
25       const void* valueArray,
26       const int* nItems,
27       const int* ndataItems,
28       const char datatype[],
29       const char iotype[] );
30   void (*readdatablock)(
31       int* fileDescriptor,
32       const  char keyphrase[],
33       void* valueArray,
34       int*  nItems,
35       const char  datatype[],
36       const char  iotype[] );
37   void (*writedatablock)(
38       const int* fileDescriptor,
39       const char keyphrase[],
40       const void* valueArray,
41       const int* nItems,
42       const char datatype[],
43       const char iotype[]);
44   void (*constructname)(
45       const char inName[],
46       char* outName);
47 };
48 
49 #endif
50