]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkPackage.h
BUG slash
[bbtk.git] / kernel / src / bbtkPackage.h
index 24edc8f8f945bf6e57f64215bb4a44d384824640..1dfc854f4f0bb577e364157a21006084c770e1da 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkPackage.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/04 13:02:58 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2008/03/07 08:40:14 $
+  Version:   $Revision: 1.5 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See doc/license.txt or
@@ -47,8 +47,8 @@ namespace bbtk
     /// Returns the author of the package
     const std::string& GetAuthor() const { return mAuthor; }
 
-    /// Returns the keyword of the package
-    const std::string& GetKeyword() const { return mKeyword; }
+    /// Returns the category of the package
+    const std::string& GetCategory() const { return mCategory; }
 
     /// Returns the description of the package
     const std::string& GetDescription() const { return mDescription; }
@@ -105,13 +105,25 @@ namespace bbtk
     const BlackBoxMapType& GetBlackBoxMap() const { return mBlackBoxMap; }
     BlackBoxMapType& GetBlackBoxMap() { return mBlackBoxMap; }
 
+    // Factories management
+    /// Adds the factory to the set of factories which use the package
+    void AddFactory(Factory* f) { mFactorySet.insert(f); }
+    /// Removes the factory from the set of factories which use the package
+    void RemoveFactory(Factory* f) { mFactorySet.erase(f); }
+
+    /// Gets the set of factories which use the package
+    std::set<Factory*>& GetFactorySet() { return mFactorySet; }
+    /// Gets the set of factories which use the package (const)
+    const std::set<Factory*>& GetFactorySet() const { return mFactorySet; }
+    
   private:
+
     /// The name of the package
     std::string mName;
     /// The author of the package
     std::string mAuthor;
-    /// The keywords of the package
-    std::string mKeyword;    
+    /// The categories of the package
+    std::string mCategory;    
     /// The description of the package
     std::string mDescription;
     /// The version of the package
@@ -152,13 +164,16 @@ namespace bbtk
       std::string mTypeOut;
     };
     
-    //typedef std::string AdaptorKey;
-
     /// The type of map of adaptor descriptors
     typedef std::map< AdaptorKey, BlackBoxDescriptor*> AdaptorMapType;
 
     /// The map of adaptors descriptors
     AdaptorMapType mAdaptorMap;
+
+
+    /// The set of factories which contain the package 
+    std::set<Factory*> mFactorySet;
+    
   };
   // EO class Package
   //====================================================================