]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkPackage.h
*** empty log message ***
[bbtk.git] / kernel / src / bbtkPackage.h
index 1dfc854f4f0bb577e364157a21006084c770e1da..f869bcc021a8205f8aa6ccbc8e79b3d2fb26d992 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkPackage.h,v $
   Language:  C++
-  Date:      $Date: 2008/03/07 08:40:14 $
-  Version:   $Revision: 1.5 $
+  Date:      $Date: 2008/04/08 06:59:30 $
+  Version:   $Revision: 1.6 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See doc/license.txt or
@@ -65,9 +65,19 @@ namespace bbtk
     BlackBox* NewBlackBox(const std::string& type,
                             const std::string& name) const;
   
-    BlackBox* NewAdaptor(TypeInfo typein,
-                           TypeInfo typeout,
-                           const std::string& name) const;
+    BlackBox* NewAdaptor(const DataInfo& typein,
+                        const DataInfo& typeout,
+                        const std::string& name) const;
+    
+   BlackBox* NewWidgetAdaptor(const DataInfo& typein,
+                             const DataInfo& typeout,
+                             const std::string& name) const;
+    bool FindAdaptor(const DataInfo& typein,
+                          const DataInfo& typeout,
+                          std::string& adaptor) const;
+    bool FindWidgetAdaptor(const DataInfo& typein,
+                          const DataInfo& typeout,
+                          std::string& adaptor) const;
 
     bool RegisterBlackBox(BlackBoxDescriptor*); 
     void UnRegisterBlackBox(const std::string& name); 
@@ -144,24 +154,23 @@ namespace bbtk
     class AdaptorKey 
     {
     public:
-      AdaptorKey( TypeInfo typein, TypeInfo typeout) 
-       : mTypeIn(typein.name()), mTypeOut(typeout.name()) {}
+      AdaptorKey( const DataInfo& typein, const DataInfo& typeout, 
+                 BlackBoxDescriptor::Kind kind ) 
+       : mTypeIn(typein), mTypeOut(typeout), mKind(kind) {}
       
       bool operator< ( const AdaptorKey& k ) const
       {
-       //      return ( ( mTypeIn.before(k.mTypeIn) ) ||
-       //               ( ( mTypeIn == k.mTypeIn ) && 
-       //                 ( mTypeOut.before(k.mTypeOut) ) ) );
-       return ( ( mTypeIn < k.mTypeIn ) ||
-                ( ( mTypeIn == k.mTypeIn ) && 
-                  ( mTypeOut < k.mTypeOut ) ) );
+       return ( ( mKind < k.mKind ) ||
+                ( ( mKind == k.mKind ) &&
+                  ( ( mTypeIn < k.mTypeIn ) ||
+                    ( ( mTypeIn == k.mTypeIn ) && 
+                      ( mTypeOut < k.mTypeOut ) ) ) ) );
       }
       
     private:
-      //      TypeInfo mTypeIn;
-      //      TypeInfo mTypeOut;
-      std::string mTypeIn;
-      std::string mTypeOut;
+      DataInfo mTypeIn;
+      DataInfo mTypeOut; 
+      BlackBoxDescriptor::Kind mKind;
     };
     
     /// The type of map of adaptor descriptors