]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkPackage.h
*** empty log message ***
[bbtk.git] / kernel / src / bbtkPackage.h
index f869bcc021a8205f8aa6ccbc8e79b3d2fb26d992..4c0b70534cf890d37f22f4f0a43c7b73bcfc3372 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkPackage.h,v $
   Language:  C++
-  Date:      $Date: 2008/04/08 06:59:30 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2008/04/09 11:16:57 $
+  Version:   $Revision: 1.7 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See doc/license.txt or
@@ -115,6 +115,41 @@ namespace bbtk
     const BlackBoxMapType& GetBlackBoxMap() const { return mBlackBoxMap; }
     BlackBoxMapType& GetBlackBoxMap() { return mBlackBoxMap; }
 
+    /// The type of key in the map of adaptor descriptors
+    class AdaptorKey 
+    {
+    public:
+      AdaptorKey( const DataInfo& typein, const DataInfo& typeout, 
+                 BlackBoxDescriptor::Kind kind ) 
+       : mTypeIn(typein), mTypeOut(typeout), mKind(kind) {}
+      
+      bool operator< ( const AdaptorKey& k ) const
+      {
+       return ( ( mKind < k.mKind ) ||
+                ( ( mKind == k.mKind ) &&
+                  ( ( mTypeIn < k.mTypeIn ) ||
+                    ( ( mTypeIn == k.mTypeIn ) && 
+                      ( mTypeOut < k.mTypeOut ) ) ) ) );
+      }
+      
+      bool operator== ( const AdaptorKey& k ) const
+      {
+       return ( ( mKind == k.mKind ) && 
+                ( mTypeIn == k.mTypeIn ) && 
+                ( mTypeOut == k.mTypeOut ) );
+      }
+      DataInfo mTypeIn;
+      DataInfo mTypeOut; 
+      BlackBoxDescriptor::Kind mKind;
+    };
+    
+    /// The type of map of adaptor descriptors
+    typedef std::map< AdaptorKey, BlackBoxDescriptor*> AdaptorMapType;
+
+   const AdaptorMapType& GetAdaptorMap() const { return mAdaptorMap; }
+
+
     // Factories management
     /// Adds the factory to the set of factories which use the package
     void AddFactory(Factory* f) { mFactorySet.insert(f); }
@@ -126,6 +161,8 @@ namespace bbtk
     /// Gets the set of factories which use the package (const)
     const std::set<Factory*>& GetFactorySet() const { return mFactorySet; }
     
+    void CheckBoxes() const;
+
   private:
 
     /// The name of the package
@@ -146,36 +183,14 @@ namespace bbtk
     /// (path relative to bbtk doc root)
     std::string mDocRelativeURL;
 
-
     /// The map of black boxes descriptors
     BlackBoxMapType mBlackBoxMap;
 
-    /// The type of key in the map of adaptor descriptors
-    class AdaptorKey 
-    {
-    public:
-      AdaptorKey( const DataInfo& typein, const DataInfo& typeout, 
-                 BlackBoxDescriptor::Kind kind ) 
-       : mTypeIn(typein), mTypeOut(typeout), mKind(kind) {}
-      
-      bool operator< ( const AdaptorKey& k ) const
-      {
-       return ( ( mKind < k.mKind ) ||
-                ( ( mKind == k.mKind ) &&
-                  ( ( mTypeIn < k.mTypeIn ) ||
-                    ( ( mTypeIn == k.mTypeIn ) && 
-                      ( mTypeOut < k.mTypeOut ) ) ) ) );
-      }
-      
-    private:
-      DataInfo mTypeIn;
-      DataInfo mTypeOut; 
-      BlackBoxDescriptor::Kind mKind;
-    };
-    
-    /// The type of map of adaptor descriptors
-    typedef std::map< AdaptorKey, BlackBoxDescriptor*> AdaptorMapType;
 
+  public:
+
+
+  private:
     /// The map of adaptors descriptors
     AdaptorMapType mAdaptorMap;