Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
3d29ba49afedbcb511d0c3ea461b79ef1c2ad554
[simgrid.git] / src / surf / xml / platf.hpp
1 /* Copyright (c) 2006-2017. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #ifndef SURF_SURFXML_PARSE_H
7 #define SURF_SURFXML_PARSE_H
8
9 #include <xbt/dict.h>
10 #include <xbt/function_types.h>
11 #include <xbt/misc.h>
12 #include <xbt/signal.hpp>
13
14 SG_BEGIN_DECL()
15
16 /* Module management functions */
17 XBT_PUBLIC(void) sg_platf_init();;
18 XBT_PUBLIC(void) sg_platf_exit();
19
20 XBT_PUBLIC(void) surf_parse_open(const char *file);
21 XBT_PUBLIC(void) surf_parse_close();
22 XBT_PUBLIC(void) surf_parse_assert(bool cond, const char *fmt, ...) XBT_ATTRIB_PRINTF(2,3);
23 XBT_PUBLIC(void) XBT_ATTRIB_NORETURN surf_parse_error(const char *msg,...) XBT_ATTRIB_PRINTF(1,2);
24 XBT_PUBLIC(void) surf_parse_assert_netpoint(char* hostname, const char* pre, const char* post);
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(int) surf_parse(); /* Entry-point to the parser */
35
36 SG_END_DECL()
37
38 #endif