Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Energy, onHostDestruction: ensured ptr existence
[simgrid.git] / include / xbt / graphxml_parse.h
1 /* Copyright (c) 2006-2007, 2009-2011, 2013-2014. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #ifndef _XBT_GRAPHXML_PARSE_H
8 #define _XBT_GRAPHXML_PARSE_H
9
10 #include <stdio.h>              /* to have FILE */
11 #include "xbt/misc.h"
12 #include "xbt/graphxml.h"
13 #include "simgrid_config.h"
14
15 #ifndef YY_TYPEDEF_YY_SIZE_T
16 #define YY_TYPEDEF_YY_SIZE_T
17 typedef size_t yy_size_t;
18 #endif
19
20 /* Entry-point of the graphxml parser. */
21 extern int_f_void_t xbt_graph_parse;
22
23 /* Hook for the different tags. They can be redefined at will whereas
24    the versions without the _fun can't. */
25 extern void_f_void_t STag_graphxml_graph_fun;
26 extern void_f_void_t ETag_graphxml_graph_fun;
27 extern void_f_void_t STag_graphxml_node_fun;
28 extern void_f_void_t ETag_graphxml_node_fun;
29 extern void_f_void_t STag_graphxml_edge_fun;
30 extern void_f_void_t ETag_graphxml_edge_fun;
31
32 XBT_PUBLIC(void) xbt_graph_parse_open(const char *file);
33 XBT_PUBLIC(void) xbt_graph_parse_close(void);
34 XBT_PUBLIC(void) xbt_graph_parse_reset_parser(void);
35 XBT_PUBLIC(double) xbt_graph_parse_get_double(const char *string);
36
37 /* Prototypes of the functions offered by flex */
38 XBT_PUBLIC(int) xbt_graph_parse_lex(void);
39 XBT_PUBLIC(int) xbt_graph_parse_get_lineno(void);
40 XBT_PUBLIC(FILE *) xbt_graph_parse_get_in(void);
41 XBT_PUBLIC(FILE *) xbt_graph_parse_get_out(void);
42 XBT_PUBLIC(yy_size_t) xbt_graph_parse_get_leng(void);
43 XBT_PUBLIC(char *) xbt_graph_parse_get_text(void);
44 XBT_PUBLIC(void) xbt_graph_parse_set_lineno(int line_number);
45 XBT_PUBLIC(void) xbt_graph_parse_set_in(FILE * in_str);
46 XBT_PUBLIC(void) xbt_graph_parse_set_out(FILE * out_str);
47 XBT_PUBLIC(int) xbt_graph_parse_get_debug(void);
48 XBT_PUBLIC(void) xbt_graph_parse_set_debug(int bdebug);
49 XBT_PUBLIC(int) xbt_graph_parse_lex_destroy(void);
50
51 #endif