Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
snake_case routing
[simgrid.git] / include / simgrid / s4u / NetZone.hpp
index a1935b7..2b6b42e 100644 (file)
@@ -39,11 +39,26 @@ public:
   /** @brief Seal your netzone once you're done adding content, and before routing stuff through it */
   virtual void seal();
   /** @brief Retrieves the name of that netzone as a C++ string */
-  const std::string& getName() const { return name_; }
+  const std::string& get_name() const { return name_; }
   /** @brief Retrieves the name of that netzone as a C string */
-  const char* getCname() const;
+  const char* get_cname() const;
   NetZone* getFather();
 
+  XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::get_name()") const std::string& getName() const { return get_name(); }
+  XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::get_cname()") const char* getCname() const { return get_cname(); }
+  XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::add_route()") void addRoute(
+      kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst, kernel::routing::NetPoint* gw_src,
+      kernel::routing::NetPoint* gw_dst, std::vector<simgrid::surf::LinkImpl*>& link_list, bool symmetrical)
+  {
+    add_route(src, dst, gw_src, gw_dst, link_list, symmetrical);
+  }
+  XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::add_bypass_route()") void addBypassRoute(
+      kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst, kernel::routing::NetPoint* gw_src,
+      kernel::routing::NetPoint* gw_dst, std::vector<simgrid::surf::LinkImpl*>& link_list, bool symmetrical)
+  {
+    add_bypass_route(src, dst, gw_src, gw_dst, link_list, symmetrical);
+  }
+
   std::vector<NetZone*>* getChildren();             // Sub netzones
   void getHosts(std::vector<s4u::Host*> * whereto); // retrieve my content as a vector of hosts
   int getHostCount();
@@ -57,12 +72,12 @@ public:
 
   /* Add content to the netzone, at parsing time. It should be sealed afterward. */
   virtual int addComponent(kernel::routing::NetPoint * elm); /* A host, a router or a netzone, whatever */
-  virtual void addRoute(kernel::routing::NetPoint * src, kernel::routing::NetPoint * dst,
-                        kernel::routing::NetPoint * gw_src, kernel::routing::NetPoint * gw_dst,
-                        std::vector<simgrid::surf::LinkImpl*> & link_list, bool symmetrical);
-  virtual void addBypassRoute(kernel::routing::NetPoint * src, kernel::routing::NetPoint * dst,
-                              kernel::routing::NetPoint * gw_src, kernel::routing::NetPoint * gw_dst,
-                              std::vector<simgrid::surf::LinkImpl*> & link_list, bool symmetrical) = 0;
+  virtual void add_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
+                         kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
+                         std::vector<simgrid::surf::LinkImpl*>& link_list, bool symmetrical);
+  virtual void add_bypass_route(kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,
+                                kernel::routing::NetPoint* gw_src, kernel::routing::NetPoint* gw_dst,
+                                std::vector<simgrid::surf::LinkImpl*>& link_list, bool symmetrical) = 0;
 
   /*** Called on each newly created regular route (not on bypass routes) */
   static simgrid::xbt::signal<void(bool symmetrical, kernel::routing::NetPoint* src, kernel::routing::NetPoint* dst,