X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0fa053f89a0b5f34a050f4790925d9d63ac11073..7fd8e8ffb447edb19f32e3200a7dbef3d83138b6:/src/surf/xml/platf_private.hpp diff --git a/src/surf/xml/platf_private.hpp b/src/surf/xml/platf_private.hpp index 1b0f9357ac..0f24ff812e 100644 --- a/src/surf/xml/platf_private.hpp +++ b/src/surf/xml/platf_private.hpp @@ -10,8 +10,10 @@ #define SG_PLATF_H #include "simgrid/host.h" +#include "simgrid/s4u/Link.hpp" #include "src/surf/xml/platf.hpp" #include "src/surf/xml/simgrid_dtd.h" + #include #include #include @@ -38,7 +40,7 @@ struct HostCreationArgs { tmgr_trace_t speed_trace = nullptr; tmgr_trace_t state_trace = nullptr; const char* coord = nullptr; - std::map* properties = nullptr; + std::unordered_map* properties = nullptr; }; class HostLinkCreationArgs { @@ -56,8 +58,8 @@ public: double latency = 0; tmgr_trace_t latency_trace = nullptr; tmgr_trace_t state_trace = nullptr; - e_surf_link_sharing_policy_t policy = SURF_LINK_FATPIPE; - std::map* properties = nullptr; + simgrid::s4u::Link::SharingPolicy policy = simgrid::s4u::Link::SharingPolicy::FATPIPE; + std::unordered_map* properties = nullptr; }; class PeerCreationArgs { @@ -100,10 +102,10 @@ public: double limiter_link = 0; ClusterTopology topology; std::string topo_parameters; - std::map* properties; + std::unordered_map* properties; std::string router_id; - e_surf_link_sharing_policy_t sharing_policy; - e_surf_link_sharing_policy_t bb_sharing_policy; + simgrid::s4u::Link::SharingPolicy sharing_policy; + simgrid::s4u::Link::SharingPolicy bb_sharing_policy; }; class CabinetCreationArgs { @@ -122,7 +124,7 @@ public: std::string id; std::string type_id; std::string content; - std::map* properties; + std::unordered_map* properties; std::string attach; }; @@ -131,8 +133,8 @@ public: std::string id; std::string model; std::string content; - std::map* properties; - std::map* model_properties; + std::unordered_map* properties; + std::unordered_map* model_properties; sg_size_t size; }; @@ -164,7 +166,7 @@ enum class ActorOnFailure { DIE, RESTART }; // FIXME: move to a better namespace class ActorCreationArgs { public: std::vector args; - std::map* properties = nullptr; + std::unordered_map* properties = nullptr; const char* host = nullptr; const char* function = nullptr; double start_time = 0.0; @@ -179,16 +181,12 @@ public: }; }}} -extern "C" { - /********** Routing **********/ void routing_cluster_add_backbone(simgrid::kernel::resource::LinkImpl* bb); /*** END of the parsing cruft ***/ -XBT_PUBLIC void sg_platf_begin(); // Start a new platform -XBT_PUBLIC void sg_platf_end(); // Finish the creation of the platform - -XBT_PUBLIC simgrid::s4u::NetZone* sg_platf_new_Zone_begin(simgrid::kernel::routing::ZoneCreationArgs* zone); // Begin description of new Zone +XBT_PUBLIC simgrid::kernel::routing::NetZoneImpl* +sg_platf_new_Zone_begin(simgrid::kernel::routing::ZoneCreationArgs* zone); // Begin description of new Zone XBT_PUBLIC void sg_platf_new_Zone_seal(); // That Zone is fully described XBT_PUBLIC void sg_platf_new_host(simgrid::kernel::routing::HostCreationArgs* host); // Add a host to the current Zone @@ -225,7 +223,6 @@ XBT_PUBLIC void surf_parse_set_out(FILE* out_str); XBT_PUBLIC int surf_parse_get_debug(); XBT_PUBLIC void surf_parse_set_debug(int bdebug); XBT_PUBLIC int surf_parse_lex_destroy(); -} namespace simgrid { namespace surf {