Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / src / surf / xml / platf_private.hpp
index 1b0f935..0f24ff8 100644 (file)
 #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 <map>
 #include <string>
 #include <vector>
@@ -38,7 +40,7 @@ struct HostCreationArgs {
   tmgr_trace_t speed_trace = nullptr;
   tmgr_trace_t state_trace = nullptr;
   const char* coord        = nullptr;
-  std::map<std::string, std::string>* properties = nullptr;
+  std::unordered_map<std::string, std::string>* 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<std::string, std::string>* properties = nullptr;
+  simgrid::s4u::Link::SharingPolicy policy       = simgrid::s4u::Link::SharingPolicy::FATPIPE;
+  std::unordered_map<std::string, std::string>* properties = nullptr;
 };
 
 class PeerCreationArgs {
@@ -100,10 +102,10 @@ public:
   double limiter_link = 0;
   ClusterTopology topology;
   std::string topo_parameters;
-  std::map<std::string, std::string>* properties;
+  std::unordered_map<std::string, std::string>* 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<std::string, std::string>* properties;
+  std::unordered_map<std::string, std::string>* properties;
   std::string attach;
 };
 
@@ -131,8 +133,8 @@ public:
   std::string id;
   std::string model;
   std::string content;
-  std::map<std::string, std::string>* properties;
-  std::map<std::string, std::string>* model_properties;
+  std::unordered_map<std::string, std::string>* properties;
+  std::unordered_map<std::string, std::string>* 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<std::string> args;
-  std::map<std::string, std::string>* properties = nullptr;
+  std::unordered_map<std::string, std::string>* 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 {