summaryrefslogtreecommitdiff
path: root/src/include/cctki_Schedule.h
blob: 52f8210f9736dff1c513226779fccf374301bc7a (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
 /*@@
   @header    cctki_Schedule.h
   @date      Wed Sep 15 22:49:24 1999
   @author    Tom Goodale
   @desc 
   Schedule stuff which can be seen by the rest of the flesh.
   @enddesc 
   @version $Header$
 @@*/

#ifndef _CCTKI_SCHEDULE_H_
#define _CCTKI_SCHEDULE_H_

/* Types needed by other routines. */

typedef enum {sched_mod_none, sched_before, sched_after, sched_while} t_sched_modifier_type;

typedef struct T_SCHED_MODIFIER
{
  struct T_SCHED_MODIFIER *next;

  t_sched_modifier_type type;
  
  char *argument;

} t_sched_modifier;


#ifdef __cplusplus
extern "C" {
#endif

/* Routines to create items */
t_sched_modifier *CCTKi_ScheduleAddModifier(t_sched_modifier *orig, 
                                           const char *modifier, 
                                           const char *argument);

int CCTKi_ScheduleFunction(const char *gname, 
                           const char *fname, 
                           void *func, 
                           t_sched_modifier *modifiers, 
                           void *attributes);

int CCTKi_ScheduleGroup(const char *gname, 
                        const char *thisname, 
                        t_sched_modifier *modifiers, 
                        void *attributes);

/* Routine to sort the groups - must be called before traversal. */
int CCTKi_ScheduleSortAllGroups(void);

/* Traversal routine */
int CCTKi_ScheduleTraverse(const char *group_name,
                           int (*item_entry)(void *, void *),
                           int (*item_exit)(void *, void *),
                           int  (*while_check)(int, char **, void *, void *),
                           int (*function_process)(void *, void *, void *),
                           void *data);

#ifdef __cplusplus
}
#endif

#endif /* _CCTKI_SCHEDULE_H_ */