]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkFactory.cxx
*** empty log message ***
[bbtk.git] / kernel / src / bbtkFactory.cxx
index 7ddf1778def128eb7ef7ee21bbb1e131efbaebdf..cfd3c6ec531894a0a3dcda4aeab7b906be244ce8 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkFactory.cxx,v $
   Language:  C++
-  Date:      $Date: 2010/01/21 16:03:17 $
-  Version:   $Revision: 1.47 $
+  Date:      $Date: 2010/09/12 14:59:29 $
+  Version:   $Revision: 1.51 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -533,6 +533,22 @@ namespace bbtk
   //===================================================================
   
 
+//     ups3 EED borrame        
+       std::string Factory::GetPackageNameOfaBlackBox(std::string boxType)
+       {
+               std::string result="<void bbtk package name>";
+               PackageMapType::const_iterator i;
+               for (i = mPackageMap.begin(); i!=mPackageMap.end(); ++i )
+               {
+                       if ( i->second->ifBoxExist( boxType ) == true)
+                       {
+                               result = i->first;
+                       }
+               }
+               return result;
+       }
+       
+       
   //===================================================================
   /// Creates an instance of a black box of type <type> with name <name>
   BlackBox::Pointer Factory::NewBlackBox(const std::string& type, 
@@ -833,7 +849,6 @@ namespace bbtk
 
  void Factory::ShowGraphTypes(const std::string& name) const
  {
-
    bool found = false;
    PackageMapType::const_iterator i;
    for (i = mPackageMap.begin(); i!=mPackageMap.end(); ++i )
@@ -888,7 +903,7 @@ namespace bbtk
     std::string title;
 
     typedef std::map<std::string, 
-      std::vector<BlackBoxDescriptor::Pointer> > IndexType;
+                     std::vector<BlackBoxDescriptor::Pointer> > IndexType;
     IndexType index;
     // Builds the index map
     PackageMapType::const_iterator i;
@@ -938,7 +953,6 @@ namespace bbtk
                                title = "Boxes by category";
                        }
 
-
                        std::vector<std::string>::const_iterator k;
                        for (k=keys.begin(); k!=keys.end(); ++k )
                        {
@@ -955,7 +969,6 @@ namespace bbtk
                                        index[*k] = v;
                                }
                        }
-
                }
        }   
     // Creates the file