1 /* Copyright (c) 2006-2014. The SimGrid Team.
2 * All rights reserved. */
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. */
7 #ifndef _SURF_SURFXML_PARSE_H
8 #define _SURF_SURFXML_PARSE_H
11 #include <xbt/function_types.h>
13 #include <xbt/signal.hpp>
17 /* Module management functions */
18 XBT_PUBLIC(void) sg_platf_init();;
19 XBT_PUBLIC(void) sg_platf_exit();
21 XBT_PUBLIC(void) surf_parse_open(const char *file);
22 XBT_PUBLIC(void) surf_parse_close();
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);
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);
34 XBT_PUBLIC_DATA(int_f_void_t) surf_parse; /* Entry-point to the parser. Set this to your function. */
41 extern XBT_PRIVATE xbt::signal<void(void)> on_postparse;