Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
s4u::NetZone: move deprecation wrappers to the end
authorMartin Quinson <martin.quinson@loria.fr>
Thu, 31 May 2018 15:41:20 +0000 (17:41 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sun, 3 Jun 2018 19:15:12 +0000 (21:15 +0200)
include/simgrid/s4u/NetZone.hpp

index fbf51ba..e8ecc4f 100644 (file)
@@ -39,22 +39,6 @@ public:
   const char* get_cname() const;
   NetZone* get_father();
 
   const char* get_cname() const;
   NetZone* get_father();
 
-  XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::get_father()") NetZone* getFather() { return get_father(); }
-  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::kernel::resource::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::kernel::resource::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();
   std::vector<NetZone*>* getChildren();             // Sub netzones
   void getHosts(std::vector<s4u::Host*> * whereto); // retrieve my content as a vector of hosts
   int getHostCount();
@@ -83,6 +67,23 @@ public:
   static simgrid::xbt::signal<void(NetZone&)> on_creation;
   static simgrid::xbt::signal<void(NetZone&)> on_seal;
 
   static simgrid::xbt::signal<void(NetZone&)> on_creation;
   static simgrid::xbt::signal<void(NetZone&)> on_seal;
 
+  // Deprecation wrappers
+  XBT_ATTRIB_DEPRECATED_v323("Please use NetZone::get_father()") NetZone* getFather() { return get_father(); }
+  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::kernel::resource::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::kernel::resource::LinkImpl*>& link_list, bool symmetrical)
+  {
+    add_bypass_route(src, dst, gw_src, gw_dst, link_list, symmetrical);
+  }
+
 protected:
   unsigned int getTableSize() { return vertices_.size(); }
   std::vector<kernel::routing::NetPoint*> getVertices() { return vertices_; }
 protected:
   unsigned int getTableSize() { return vertices_.size(); }
   std::vector<kernel::routing::NetPoint*> getVertices() { return vertices_; }