X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9bc2f7734295810a24f98d65169f06705e3ea951..a24a7ff7e85c75bb850340c5a1230bfa951e97ae:/src/msg/msg_environment.cpp diff --git a/src/msg/msg_environment.cpp b/src/msg/msg_environment.cpp index 15f3b151c7..2b995a4ce3 100644 --- a/src/msg/msg_environment.cpp +++ b/src/msg/msg_environment.cpp @@ -1,18 +1,18 @@ -/* Copyright (c) 2004-2016. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include "simgrid/s4u/NetZone.hpp" -#include "simgrid/s4u/engine.hpp" -#include "src/msg/msg_private.h" +#include "simgrid/msg.h" -#if HAVE_LUA +#if SIMGRID_HAVE_LUA #include #include #include #endif +extern "C" { + /********************************* MSG **************************************/ /** \ingroup msg_simulation @@ -23,7 +23,7 @@ * * \include simgrid.dtd * - * Here is a small example of such a platform + * Here is a small example of such a platform * * \include small_platform.xml * @@ -34,49 +34,4 @@ void MSG_create_environment(const char *file) SIMIX_create_environment(file); } -void MSG_post_create_environment() { - xbt_lib_cursor_t cursor; - void **data; - char *name; - - /* Initialize MSG storages */ - xbt_lib_foreach(storage_lib, cursor, name, data) { - if(data[SIMIX_STORAGE_LEVEL]) - __MSG_storage_create(xbt_dict_cursor_get_elm(cursor)); - } -} - -msg_netzone_t MSG_environment_get_routing_root() -{ - return simgrid::s4u::Engine::instance()->netRoot(); -} - -const char* MSG_environment_as_get_name(msg_netzone_t netzone) -{ - return netzone->name(); -} - -msg_netzone_t MSG_environment_as_get_by_name(const char* name) -{ - return simgrid::s4u::Engine::instance()->netzoneByNameOrNull(name); -} - -xbt_dict_t MSG_environment_as_get_routing_sons(msg_netzone_t netzone) -{ - return netzone->children(); -} - -const char* MSG_environment_as_get_property_value(msg_netzone_t netzone, const char* name) -{ - return netzone->property(name); -} - -void MSG_environment_as_set_property_value(msg_netzone_t netzone, const char* name, char* value) -{ - netzone->setProperty(name, value); -} - -xbt_dynar_t MSG_environment_as_get_hosts(msg_netzone_t netzone) -{ - return netzone->hosts(); }