]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkBlackBox.h
*** empty log message ***
[bbtk.git] / kernel / src / bbtkBlackBox.h
index 6e44fde62c7b12b5f8e24f9564a7ac706c70b513..d25fc88c01d2dc505dce8162df5803b6ae031095 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkBlackBox.h,v $
   Language:  C++
-  Date:      $Date: 2009/04/08 07:56:11 $
-  Version:   $Revision: 1.23 $
+  Date:      $Date: 2009/04/30 14:31:31 $
+  Version:   $Revision: 1.24 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -118,7 +118,15 @@ namespace bbtk
 
 
  
-  
+    //==================================================================
+    /// System callback which calls bbUserConstructor for all its ancestors 
+    /// and the box itself
+    virtual void bbConstructor() {}
+    /// System callback which calls bbUserDestructor for all its ancestors 
+    /// and the box itself
+    virtual void bbDestructor() {}
+    //==================================================================    
 
 
     /// Returns true iff the BlackBox has an input of name label
@@ -470,8 +478,8 @@ namespace bbtk
     /// 2) Releases the box descriptor
     struct BBTK_EXPORT Deleter : public Object::Deleter
     { 
-               Deleter(); 
-      void Delete(Object* p);
+      Deleter(); 
+      int Delete(Object* p);
     };
     //==================================================================
 
@@ -484,7 +492,7 @@ namespace bbtk
     //==================================================================
 
     //==================================================================
-    virtual void bbDelete() { delete this; }
+    virtual int bbDelete() { delete this; return 0; }
     //==================================================================
 
 
@@ -494,6 +502,8 @@ namespace bbtk
  
     //==================================================================
     // ATTRIBUTES
+    /// Is the box "constructed" ? (initialized)
+    bool bbmConstructed;
     /// Is the box executing ?
     bool bbmExecuting;
     /// The name of the black-box