Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'oldstyle_element_set'
[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/misc.h"
11 #include "xbt/function_types.h"
12 #include "xbt/dict.h"
13
14 SG_BEGIN_DECL()
15
16 /* Module management functions */
17 XBT_PUBLIC(void) sg_platf_init(void);
18 XBT_PUBLIC(void) sg_platf_exit(void);
19
20 XBT_PUBLIC(void) surf_parse_open(const char *file);
21 XBT_PUBLIC(void) surf_parse_close(void);
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_warn(const char *msg,...) XBT_ATTRIB_PRINTF(1,2);
25
26 XBT_PUBLIC(double) surf_parse_get_double(const char *string);
27 XBT_PUBLIC(int) surf_parse_get_int(const char *string);
28 XBT_PUBLIC(double) surf_parse_get_time(const char *string, const char *entity_kind, const char *name);
29 XBT_PUBLIC(double) surf_parse_get_size(const char *string, const char *entity_kind, const char *name);
30 XBT_PUBLIC(double) surf_parse_get_bandwidth(const char *string, const char *entity_kind, const char *name);
31 XBT_PUBLIC(double) surf_parse_get_speed(const char *string, const char *entity_kind, const char *name);
32
33 /* What is needed to bypass the parser. */
34 XBT_PUBLIC_DATA(int_f_void_t) surf_parse;       /* Entry-point to the parser. Set this to your function. */
35
36 SG_END_DECL()
37 #endif