]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkFactory.cxx
*** empty log message ***
[bbtk.git] / kernel / src / bbtkFactory.cxx
index 627bc80881b1e99ac4b112dbf8244d543c8a9718..7ddf1778def128eb7ef7ee21bbb1e131efbaebdf 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkFactory.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/10/05 22:44:48 $
-  Version:   $Revision: 1.46 $
+  Date:      $Date: 2010/01/21 16:03:17 $
+  Version:   $Revision: 1.47 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -893,71 +893,71 @@ namespace bbtk
     // Builds the index map
     PackageMapType::const_iterator i;
     for (i = mPackageMap.begin(); i!=mPackageMap.end(); ++i )
-      {
-       Package::Pointer pack = i->second;
-       if (pack->GetName()=="user") continue;
-       Package::DescriptorMapType::const_iterator j;
-       for (j = pack->GetDescriptorMap().begin(); 
-            j!= pack->GetDescriptorMap().end(); 
-            ++j)
-         {
+       {
+               Package::Pointer pack = i->second;
+               if (pack->GetName()=="user") continue;
+               Package::DescriptorMapType::const_iterator j;
+               for (j = pack->GetDescriptorMap().begin(); 
+                       j!= pack->GetDescriptorMap().end(); 
+                       ++j)
+               {
            
            // Skip adaptors 
-           if ( type==Adaptors )
-             {  
-               if (j->second->GetKind() == BlackBoxDescriptor::STANDARD )
-                 continue;
-             }
-           else 
-             if (j->second->GetKind() != BlackBoxDescriptor::STANDARD )
-               continue;
+                       if ( type==Adaptors )
+                       {  
+                               if (j->second->GetKind() == BlackBoxDescriptor::STANDARD )
+                               continue;
+                       }
+                       else 
+                               if (j->second->GetKind() != BlackBoxDescriptor::STANDARD )
+                               continue;
 
-           std::vector<std::string> keys;
-           if (type==Packages)
-             {
-               std::string k("");
-               k += pack->GetName();
-               keys.push_back(k);
-               title = "Boxes by package";
-             }
-           else if ((type==Initials) || (type==Adaptors))
-             {
-               std::string init(" ");
-               init[0] =  std::toupper(j->second->GetTypeName()[0]);
-               keys.push_back(init);
-               title = "Alphabetical list";
-             }
-           else if (type==Categories)
-             {
-               // Split the category string 
-               std::string delimiters = ";,";
-               Utilities::SplitString(j->second->GetCategory(),
-                                      delimiters,keys);
-               if (keys.size()==0) 
-                 keys.push_back(" NONE");
-               title = "Boxes by category";
-             }
-    
-           
-           std::vector<std::string>::const_iterator k;
-           for (k=keys.begin(); k!=keys.end(); ++k )
-             {
-               IndexType::iterator p;
-               p = index.find(*k);
-               if (p != index.end()) 
-                 {
-                   p->second.push_back(j->second);
-                 }
-               else 
-                 {
-                   std::vector<BlackBoxDescriptor::Pointer> v;
-                   v.push_back(j->second);
-                   index[*k] = v;
-                 }
-             }
-           
-         }
-      }   
+                       std::vector<std::string> keys;
+                       if (type==Packages)
+                       {
+                               std::string k("");
+                               k += pack->GetName();
+                               keys.push_back(k);
+                               title = "Boxes by package";
+                       }
+                       else if ((type==Initials) || (type==Adaptors))
+                       {
+                               std::string init(" ");
+                               init[0] =  std::toupper(j->second->GetTypeName()[0]);
+                               keys.push_back(init);
+                               title = "Alphabetical list";
+                       }
+                       else if (type==Categories)
+                       {
+                       // Split the category string 
+                       std::string delimiters = ";,";
+                       Utilities::SplitString(j->second->GetCategory(),
+                                          delimiters,keys);
+                       if (keys.size()==0) 
+                               keys.push_back(" NONE");
+                               title = "Boxes by category";
+                       }
+
+
+                       std::vector<std::string>::const_iterator k;
+                       for (k=keys.begin(); k!=keys.end(); ++k )
+                       {
+                               IndexType::iterator p;
+                               p = index.find(*k);
+                               if (p != index.end()) 
+                               {
+                                       p->second.push_back(j->second);
+                               }
+                               else 
+                               {
+                                       std::vector<BlackBoxDescriptor::Pointer> v;
+                                       v.push_back(j->second);
+                                       index[*k] = v;
+                               }
+                       }
+
+               }
+       }   
     // Creates the file 
     //---------------------
     // Open output file
@@ -1002,7 +1002,7 @@ namespace bbtk
     IndexType::iterator ii;
     for (ii=index.begin();ii!=index.end();++ii)
       {
-       s << "<a href=\"#"<<ii->first<<"\">"<<ii->first<<"</a>&nbsp;&nbsp;";    
+               s << "<a href=\"#"<<ii->first<<"\">"<<ii->first<<"</a>&nbsp;&nbsp;";    
       }
 
     for (ii=index.begin();ii!=index.end();++ii)
@@ -1018,9 +1018,14 @@ namespace bbtk
            s << "&nbsp;&nbsp;-&nbsp;&nbsp;\n"; 
 
            s << "<a name=\"doxygen\"></a>\n"; 
-//EED 26Mars2009                 
+
+//EED 26Mars2009
+       /*JCP 19 Nov 2009
                std::string bin_path = bbtk::ConfigurationFile::GetInstance().Get_bin_path();
            s << "<a href=" << bin_path <<"/../share/bbtk/doc/doxygen/" << ii->first << "/main.html>(Doxygen documentation of the source)</a>\n"; 
+       JCP 19 Nov 2009*/
+               std::string bin_path = bbtk::ConfigurationFile::GetInstance().Get_bin_path();           
+           s << "<a href=" << bin_path <<"/../share/bbtk/doc/doxygen/" << ii->first << "/main.html>(Doxygen documentation of the source)</a>\n"; 
          }
        else 
          {