Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Gcc is *very* permissive with pointers to functions. If we declare them as function...
[simgrid.git] / include / surf / surfxml_parse.h
1 /*      $Id$     */
2
3 /* Copyright (c) 2005 Arnaud Legrand. All rights reserved.                  */
4
5 /* This program is free software; you can redistribute it and/or modify it
6  * under the terms of the license (GNU LGPL) which comes with this package. */
7
8 #ifndef _SURF_SURFXML_PARSE_H
9 #define _SURF_SURFXML_PARSE_H
10
11 #include <stdio.h> /* to have FILE */
12 #include "surf/surfxml.h"
13 #include "xbt/function_types.h"
14 /* Entry-point of the surfxml parser. */
15 XBT_PUBLIC_DATA(int_f_void_t) surf_parse;
16
17 /* Hook for the different tags. They can be redefined at will whereas
18    the versions without the _fun can't. */
19
20 XBT_PUBLIC_DATA(void_f_void_t) STag_surfxml_platform_description_fun;
21 XBT_PUBLIC_DATA(void_f_void_t) ETag_surfxml_platform_description_fun;
22 XBT_PUBLIC_DATA(void_f_void_t) STag_surfxml_cpu_fun;
23 XBT_PUBLIC_DATA(void_f_void_t) ETag_surfxml_cpu_fun;
24 XBT_PUBLIC_DATA(void_f_void_t) STag_surfxml_router_fun;
25 XBT_PUBLIC_DATA(void_f_void_t) ETag_surfxml_router_fun;
26 XBT_PUBLIC_DATA(void_f_void_t) STag_surfxml_network_link_fun;
27 XBT_PUBLIC_DATA(void_f_void_t) ETag_surfxml_network_link_fun;
28 XBT_PUBLIC_DATA(void_f_void_t) STag_surfxml_route_fun;
29 XBT_PUBLIC_DATA(void_f_void_t) ETag_surfxml_route_fun;
30 XBT_PUBLIC_DATA(void_f_void_t) STag_surfxml_route_element_fun;
31 XBT_PUBLIC_DATA(void_f_void_t) ETag_surfxml_route_element_fun;
32 XBT_PUBLIC_DATA(void_f_void_t) STag_surfxml_process_fun;
33 XBT_PUBLIC_DATA(void_f_void_t) ETag_surfxml_process_fun;
34 XBT_PUBLIC_DATA(void_f_void_t) STag_surfxml_argument_fun;
35 XBT_PUBLIC_DATA(void_f_void_t) ETag_surfxml_argument_fun;
36
37 XBT_PUBLIC(void) surf_parse_open(const char *file);
38 XBT_PUBLIC(void) surf_parse_close(void);
39 XBT_PUBLIC(void) surf_parse_reset_parser(void);
40 XBT_PUBLIC(void) surf_parse_get_double(double *value,const char *string);
41
42 /* Prototypes of the functions offered by flex */
43 XBT_PUBLIC(int) surf_parse_lex(void);
44 XBT_PUBLIC(int) surf_parse_get_lineno(void);
45 XBT_PUBLIC(FILE*) surf_parse_get_in(void);
46 XBT_PUBLIC(FILE*) surf_parse_get_out(void);
47 XBT_PUBLIC(int) surf_parse_get_leng(void);
48 XBT_PUBLIC(char*) surf_parse_get_text(void);
49 XBT_PUBLIC(void) surf_parse_set_lineno(int line_number);
50 XBT_PUBLIC(void) surf_parse_set_in(FILE * in_str);
51 XBT_PUBLIC(void) surf_parse_set_out(FILE * out_str);
52 XBT_PUBLIC(int) surf_parse_get_debug(void);
53 XBT_PUBLIC(void) surf_parse_set_debug(int bdebug);
54 XBT_PUBLIC(int) surf_parse_lex_destroy(void);
55
56 #endif