Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] function to remove a child from its parent container
authorLucas Schnorr <Lucas.Schnorr@imag.fr>
Fri, 20 Jan 2012 14:13:36 +0000 (15:13 +0100)
committerLucas Schnorr <Lucas.Schnorr@imag.fr>
Sun, 22 Jan 2012 23:55:24 +0000 (00:55 +0100)
src/instr/instr_paje.c
src/instr/instr_private.h

index 8d6cf31..4b2c731 100644 (file)
@@ -310,6 +310,17 @@ type_t getType (const char *name, type_t father)
   return recursiveGetType (name, father);
 }
 
   return recursiveGetType (name, father);
 }
 
+void removeContainerFromParent (container_t child)
+{
+  container_t parent = child->father;
+  if (parent){
+    XBT_DEBUG("removeChildContainer (%s) FromContainer (%s) ",
+        child->name,
+        parent->name);
+    xbt_dict_remove (parent->children, child->name);
+  }
+}
+
 void destroyContainer (container_t container)
 {
   XBT_DEBUG("destroy container %s", container->name);
 void destroyContainer (container_t container)
 {
   XBT_DEBUG("destroy container %s", container->name);
index 896e7df..5888ca7 100644 (file)
@@ -219,6 +219,7 @@ type_t getStateType (const char *name, type_t father);
 type_t getType (const char *name, type_t father);
 val_t getValue (const char *valuename, const char *color, type_t father);
 val_t getValueByName (const char *valuename, type_t father);
 type_t getType (const char *name, type_t father);
 val_t getValue (const char *valuename, const char *color, type_t father);
 val_t getValueByName (const char *valuename, type_t father);
+void removeContainerFromParent (container_t child);
 void destroyContainer (container_t container);
 void destroyAllContainers (void);
 
 void destroyContainer (container_t container);
 void destroyAllContainers (void);