xref: /phasta/phSolver/common/phio_base.h (revision 16223cb9c3f88b34f2cb94151b5cf5ffc1aac5e2) !
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 };
7 typedef struct phio_file* phio_fp;
8 
9 struct phio_ops {
10   void (*readheader)(
11       int* fileDescriptor,
12       const  char keyphrase[],
13       void* valueArray,
14       int*  nItems,
15       const char  datatype[],
16       const char  iotype[] );
17   void (*writeheader)(
18       const int* fileDescriptor,
19       const char keyphrase[],
20       const void* valueArray,
21       const int* nItems,
22       const int* ndataItems,
23       const char datatype[],
24       const char iotype[] );
25   void (*readdatablock)(
26       int* fileDescriptor,
27       const  char keyphrase[],
28       void* valueArray,
29       int*  nItems,
30       const char  datatype[],
31       const char  iotype[] );
32   void (*writedatablock)(
33       const int* fileDescriptor,
34       const char keyphrase[],
35       const void* valueArray,
36       const int* nItems,
37       const char datatype[],
38       const char iotype[]);
39   void (*closefile_read)(phio_fp fileDescriptor);
40   void (*closefile_write)(phio_fp fileDescriptor);
41 };
42 
43 #endif
44