]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkComplexBlackBoxDescriptor.cxx
Some indentation
[bbtk.git] / kernel / src / bbtkComplexBlackBoxDescriptor.cxx
index a6b40e6aa0e3706d3094da042f1c5f12bdcb24d7..99133dace43038feb6fed70eff5dfd8ca21f921c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkComplexBlackBoxDescriptor.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/02/06 14:14:22 $
-  Version:   $Revision: 1.5 $
+  Date:      $Date: 2008/02/08 11:56:10 $
+  Version:   $Revision: 1.9 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -37,7 +37,7 @@ namespace bbtk
   {
     bbtkDebugMessageInc("Kernel",9,"ComplexBlackBoxDescriptor::ComplexBlackBoxDescriptor(\""<<name<<"\")"<<std::endl);
     SetTypeName(name);
-    AddToCategory("script");
+    AddToCategory("complex box");
     mPrototype = new ComplexBlackBox(name+std::string("Prototype"),this);
     bbtkDebugDecTab("Kernel",9);
   }
@@ -281,13 +281,17 @@ namespace bbtk
 
 
     std::string descr = GetDescription();
-    //Utilities::html_format(descr);
+    Utilities::html_format(descr);
     
     std::string author = GetAuthor();
     Utilities::html_format(author);
     
-    std::string category = GetCategory();
-    Utilities::html_format(category);
+    std::vector<std::string> categories;
+    // Split the category string 
+    std::string delimiters = ";,";
+    Utilities::SplitString(GetCategory(),
+                          delimiters,categories);
+
         
     (s) << "<p><TABLE cellspacing=0  cellpadding=3>\n";
     (s) << "<TR><TD style='vertical-align: top;'><b> Description </b></TD><TD style='vertical-align: top;'> : </TD><TD style='vertical-align: top;'> " 
@@ -296,14 +300,20 @@ namespace bbtk
     (s) << "<TR><TD style='vertical-align: top;'><b> Author(s) </b></TD><TD style='vertical-align: top;'> : </TD><TD style='vertical-align: top;'>  " 
         << author << "</TD></TR>\n";
 
-    (s) << "<TR><TD style='vertical-align: top;'><b> Category(s) </b></TD><TD style='vertical-align: top;'> : </TD><TD style='vertical-align: top;'>  " 
-        << category << "</TD></TR>\n";      
-
+    (s) << "<TR><TD style='vertical-align: top;'><b> Category(s) </b></TD><TD style='vertical-align: top;'> : </TD><TD style='vertical-align: top;'>  ";
+    std::vector<std::string>::iterator ci;
+    for (ci=categories.begin(); ci!=categories.end(); ++ci)
+      {
+        s << "<a href=\"../index-category.html#"<< *ci <<"\">" << *ci 
+         << "</a>&nbsp;\n";
+      }
+    s << "</TD></TR>\n";      
     std::string inc = GetScriptFileName();
     if (inc.size()>0) 
       {
-    (s) << "<TR><TD style='vertical-align: top;'><b> Use command </b></TD><TD style='vertical-align: top;'> : </TD><TD style='vertical-align: top;'> include " 
-      << inc << "</TD></TR>\n";
+       s << "<TR><TD style='vertical-align: top;'><b> To use it </b></TD><TD style='vertical-align: top;'> : </TD><TD style='vertical-align: top;'> include ";
+       s << inc << "&nbsp;&nbsp;<a href=\"../../../bbs/"<<inc<<"\">[source]</a>";
+       s << "</TD></TR>\n";
        
       }
     
@@ -311,7 +321,7 @@ namespace bbtk
        
     if (B.size()) 
     {
-          (s) << "<TR><TD style='vertical-align: top;'><b> Dependencies </b></TD><TD style='vertical-align: top;'> : </TD><TD style='vertical-align: top;'>  ";
+          (s) << "<TR><TD style='vertical-align: top;'><b> Uses </b></TD><TD style='vertical-align: top;'> : </TD><TD style='vertical-align: top;'>  ";
 
           std::set<BlackBoxDescriptor*> pdeps;
           ComplexBlackBox::BlackBoxMapType::const_iterator b;
@@ -371,7 +381,7 @@ namespace bbtk
        Utilities::html_format(type);
        
        std::string descr(in->second->GetDescription());
-       //Utilities::html_format(descr);
+       Utilities::html_format(descr);
 
        (s) << "<TR><TD style='vertical-align: top;'><B><PRE> "<<name<<" </PRE></B></TD>"
          << "<TD style='vertical-align: top;'><I><PRE> "<<type<<" </PRE></I></TD>"
@@ -404,7 +414,7 @@ namespace bbtk
        Utilities::html_format(type);
        
        std::string descr(o->second->GetDescription());
-       //Utilities::html_format(descr);
+       Utilities::html_format(descr);
        
        (s) << "<TR><TD style='vertical-align: top;'><B><PRE> "<<name<<" </PRE></B></TD>"
          << "<TD style='vertical-align: top;'><I><PRE> "<<type<<" </PRE></I></TD>"