Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Avoid (conditionnaly) including C++ headers files in C headers
[simgrid.git] / src / surf / xml / platf.hpp
1 /* Copyright (c) 2006-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 _SURF_SURFXML_PARSE_H
8 #define _SURF_SURFXML_PARSE_H
9
10 #include <xbt/dict.h>
11 #include <xbt/function_types.h>
12 #include <xbt/misc.h>
13 #include <xbt/signal.hpp>
14
15 SG_BEGIN_DECL()
16
17 /* Module management functions */
18 XBT_PUBLIC(void) sg_platf_init(void);
19 XBT_PUBLIC(void) sg_platf_exit(void);
20
21 XBT_PUBLIC(void) surf_parse_open(const char *file);
22 XBT_PUBLIC(void) surf_parse_close(void);
23 XBT_PUBLIC(void) surf_parse_assert(bool cond, const char *fmt, ...) XBT_ATTRIB_PRINTF(2,3);
24 XBT_PUBLIC(void) XBT_ATTRIB_NORETURN surf_parse_error(const char *msg,...) XBT_ATTRIB_PRINTF(1,2);
25 XBT_PUBLIC(void) surf_parse_warn(const char *msg,...) XBT_ATTRIB_PRINTF(1,2);
26
27 XBT_PUBLIC(double) surf_parse_get_double(const char *string);
28 XBT_PUBLIC(int) surf_parse_get_int(const char *string);
29 XBT_PUBLIC(double) surf_parse_get_time(const char *string, const char *entity_kind, const char *name);
30 XBT_PUBLIC(double) surf_parse_get_size(const char *string, const char *entity_kind, const char *name);
31 XBT_PUBLIC(double) surf_parse_get_bandwidth(const char *string, const char *entity_kind, const char *name);
32 XBT_PUBLIC(double) surf_parse_get_speed(const char *string, const char *entity_kind, const char *name);
33
34 XBT_PUBLIC_DATA(int_f_void_t) surf_parse;       /* Entry-point to the parser. Set this to your function. */
35
36
37 SG_END_DECL()
38
39 namespace simgrid {
40 namespace surf {
41
42 extern XBT_PRIVATE xbt::signal<void(void)> on_postparse;
43
44 }
45 }
46
47 #endif