xref: /phasta/phSolver/common/phIO.h (revision e81a6dc1f924882a3384f8e849eaba3a3575cfa5)
1 #ifndef PHSOLVER_PHIO_H
2 #define PHSOLVER_PHIO_H
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7   typedef struct phio_file* phio_fp;
8   void phio_openfile(
9       const char filename[],
10       phio_fp fileDescriptor);
11   void phio_closefile(phio_fp fileDescriptor);
12   void phio_readheader(
13       phio_fp fileDescriptor,
14       const  char keyphrase[],
15       void* valueArray,
16       int*  nItems,
17       const char  datatype[],
18       const char  iotype[] );
19   void phio_writeheader(
20       phio_fp fileDescriptor,
21       const char keyphrase[],
22       const void* valueArray,
23       const int* nItems,
24       const int* ndataItems,
25       const char datatype[],
26       const char iotype[] );
27   void phio_readdatablock(
28       phio_fp fileDescriptor,
29       const  char keyphrase[],
30       void* valueArray,
31       int*  nItems,
32       const char  datatype[],
33       const char  iotype[] );
34   void phio_writedatablock(
35       phio_fp fileDescriptor,
36       const char keyphrase[],
37       const void* valueArray,
38       const int* nItems,
39       const char datatype[],
40       const char iotype[]);
41   typedef enum {PHIO_SYNC,PHIO_POSIX,PHIO_STREAM} phio_format;
42   void phio_constructName(
43       phio_format format,
44       const char* inName,
45       char* outName);
46   void phio_appendInt(char* dest, int v);
47 #ifdef __cplusplus
48 }
49 #endif
50 
51 #endif
52 
53