]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkComplexBlackBoxDescriptor.h
Compiles de nuevo with no global factory
[bbtk.git] / kernel / src / bbtkComplexBlackBoxDescriptor.h
index cfa7945e1302592d93ae912f23ecd53f0b3ba118..27dcd4dd89ebb8c399fbfef8f4ef7de10a89b149 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkComplexBlackBoxDescriptor.h,v $
   Language:  C++
-  Date:      $Date: 2008/01/22 15:02:00 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/03/07 10:21:30 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -45,18 +45,28 @@ namespace bbtk
   public:
 
     /// Default ctor with name 
-    ComplexBlackBoxDescriptor(const std::string& name); //, Factory* f); 
+    ComplexBlackBoxDescriptor(const std::string& name); 
     /// Default dtor
     ~ComplexBlackBoxDescriptor();
+
+    /// Sets the factory used 
+    void SetFactory(Factory* f) { mFactory = f; }
+    /// Gets the factory used
+    Factory* GetFactory() { return mFactory; }
+    /// Gets the factory used (const)
+    const Factory* GetFactory() const { return mFactory; }
+
     /// Creates an instance of name <name> of the ComplexBlackBox of which this is the descriptor 
     virtual BlackBox* CreateInstance(const std::string& name);
 
     /// Adds a black box to the complex box
+    /// Needs a factory set !
     void Add ( const std::string& type,
               const std::string& name
               ); 
     /// Connects two black boxes of the complex box
-    void Connect ( const std::string& from,
+    /// Needs a factory set !
+     void Connect ( const std::string& from,
                   const std::string& output,
                   const std::string& to,
                   const std::string& input
@@ -114,6 +124,8 @@ namespace bbtk
   private:
     /// Default ctor is private (must have name and factory)
     ComplexBlackBoxDescriptor() {}
+    /// The factory used
+    Factory* mFactory;
     /// The complex box in which boxes and connections are stored
     ComplexBlackBox* mPrototype;
     /// The name of the script file from which it was created