]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkAtomicBlackBox.h
=== MAJOR RELEASE ====
[bbtk.git] / kernel / src / bbtkAtomicBlackBox.h
index 02cb9a5fa39f894370213ab2f81398ca1342c084..0af4403a74a2487652ec71a99ca82f2218c8ec85 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkAtomicBlackBox.h,v $
   Language:  C++
-  Date:      $Date: 2008/04/08 06:59:29 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2008/04/18 12:59:14 $
+  Version:   $Revision: 1.4 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -42,6 +42,11 @@ namespace bbtk
   {
     //==================================================================
   public: 
+    //==================================================================
+    bbtk::BlackBoxDescriptor::Pointer bbGetDescriptor() const
+    {
+      return bbmDescriptorPointer;
+    }
     //==================================================================
     /// Gets the output Data of a given label
     Data bbGetOutput( const std::string &label );
@@ -59,8 +64,9 @@ namespace bbtk
     //==================================================================
 
     //==================================================================
-    ///  Destructor
-    virtual ~AtomicBlackBox();
+    std::string GetObjectInfo() const;      
+    size_t GetObjectSize() const;
+    size_t GetObjectRecursiveSize() const;
     //==================================================================
 
     //==================================================================
@@ -72,6 +78,17 @@ namespace bbtk
     AtomicBlackBox(AtomicBlackBox& from, const std::string &name, 
                 bool alloc = true);
     //==================================================================
+    //==================================================================
+    ///  Destructor
+    virtual ~AtomicBlackBox();
+    //==================================================================
+
+    //==================================================================
+  protected:
+    virtual void bbLockDescriptor() = 0;
+    //  private:
+    //    virtual void bbReleaseDescriptor();
+    //==================================================================
 
   public:
     //==================================================================   
@@ -85,7 +102,7 @@ namespace bbtk
     /// - updates its inputs by calling bbUpdateInputs (which recursively calls bbBackwardUpdate on upstream boxes)
     /// - calls bbProcess which here simply calls the user callback bbUserProcess which does the actual processing. 
     ///    bbProcess is overloaded in WxBlackBox to handle widget creation and show
-    virtual IOStatus bbBackwardUpdate(Connection* caller);
+    virtual IOStatus bbBackwardUpdate(Connection::Pointer caller);
     //==================================================================
 
     //==================================================================
@@ -126,6 +143,11 @@ namespace bbtk
     AtomicBlackBox() : BlackBox("") {}
     //================================================================== 
 
+  protected:
+    //================================================================== 
+    // The pointer on the descriptor
+    bbtk::BlackBoxDescriptor::Pointer bbmDescriptorPointer;  
+    //================================================================== 
 
   };
   // Class AtomicBlackBox