summaryrefslogtreecommitdiff
path: root/src/include/cctk_IOMethods.h
blob: ee9f0db2a4e9bc331818c1f5c444cbb0678d59ab (plain)
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
 /*@@
   @header    cctk_IOMethods.h
   @date      
   @author    
   @desc 
   header file for handling IO methods
   @enddesc 
   @version $Id$
 @@*/

#ifndef _CCTK_IOMETHODS_H_
#define _CCTK_IOMETHODS_H_

struct IOMethod
{
  int    (*OutputGH)(cGH *);
  int    (*OutputVarAs)(cGH *, const char *, const char *);
  int    (*TriggerOutput)(cGH *, int);
  int    (*TimeToOutput)(cGH *,int);
};

#ifdef __cplusplus
extern "C" {
#endif

int CCTK_RegisterIOMethod(const char *name);
int CCTK_RegisterIOMethodOutputGH(int handle, int (*func)(cGH *));
int CCTK_RegisterIOMethodTimeToOutput(int handle, int (*func)(cGH *, int));
int CCTK_RegisterIOMethodTriggerOutput(int handle, int (*func)(cGH *, int));
int CCTK_RegisterIOMethodOutputVarAs(int handle, int (*func)(cGH *,
                                     const char *,const char *));
#ifdef __cplusplus
}
#endif

#endif