Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
make As->father_ protected
[simgrid.git] / src / s4u / s4u_as.cpp
index 32d5eca..a86951c 100644 (file)
@@ -17,9 +17,8 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_as,"S4U autonomous systems");
 namespace simgrid {
   namespace s4u {
 
-    As::As(const char *name)
-    : name_(xbt_strdup(name))
-    {
+  As::As(As* father, const char* name) : father_(father), name_(xbt_strdup(name))
+  {
     }
     void As::seal()
     {
@@ -67,7 +66,7 @@ namespace simgrid {
 
     int As::addComponent(kernel::routing::NetCard *elm) {
       vertices_.push_back(elm);
-      return vertices_.size()-1; //FIXME -1 ?
+      return vertices_.size()-1; // The rank of the newly created object
     }
 
     void As::addRoute(sg_platf_route_cbarg_t /*route*/){