X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkFactory.cxx;h=9f1e96f91576a358d0317f6c6f3f2c0f6f154e36;hb=fe455ba4df3ec334ad809d82a51f261f1edcd343;hp=ce977c9b646d1bf2472d614efc3ca8e7a27677d3;hpb=203eabe6e2180eaae1672d4acbe5ca183c8e782f;p=bbtk.git diff --git a/kernel/src/bbtkFactory.cxx b/kernel/src/bbtkFactory.cxx index ce977c9..9f1e96f 100644 --- a/kernel/src/bbtkFactory.cxx +++ b/kernel/src/bbtkFactory.cxx @@ -4,8 +4,8 @@ Program: bbtk Module: $RCSfile: bbtkFactory.cxx,v $ Language: C++ -Date: $Date: 2008/02/06 08:49:19 $ -Version: $Revision: 1.15 $ +Date: $Date: 2008/02/14 11:38:58 $ +Version: $Revision: 1.19 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de @@ -583,7 +583,10 @@ namespace bbtk //=================================================================== /// Prints help on the black box of type - void Factory::HelpBlackBox(const std::string& name, bool full) const + /// Returns the package to which it belongs + void Factory::HelpBlackBox(const std::string& name, + std::string& package, + bool full) const { bbtkDebugMessageInc("Kernel",9,"Factory::HelpBlackBox(\""<second.mPackage->ContainsBlackBox(name)) { i->second.mPackage->HelpBlackBox(name,full); + package = i->second.mPackage->GetName(); found = true; } } @@ -855,10 +859,10 @@ namespace bbtk { std::string separator = ConfigurationFile::GetInstance().Get_file_separator (); - // Don't pollute the file store with "doc_tmp" directories ... - std::string default_doc_dir = ConfigurationFile::GetInstance().Get_default_doc_tmp(); - std::string directory = "\"" + default_doc_dir + separator + "doc_tmp" +separator + "\""; - std::string filename2 = default_doc_dir + separator + "doc_tmp" + separator + "tmp.html"; + // Don't pollute the file store with "temp_dir" directories ... + std::string default_doc_dir = ConfigurationFile::GetInstance().Get_default_temp_dir(); + std::string directory = "\"" + default_doc_dir + separator + "temp_dir" +separator + "\""; + std::string filename2 = default_doc_dir + separator + "temp_dir" + separator + "tmp.html"; #if defined(_WIN32) std::string command("start \"Titre\" /D "); @@ -920,7 +924,7 @@ namespace bbtk std::string k(""); k += pack->GetName(); keys.push_back(k); - title = "List by package"; + title = "Boxes by package"; } else if (type==Initials) { @@ -931,24 +935,13 @@ namespace bbtk } else if (type==Categories) { - // Split the category string - //std::vector categories; - std::string delimiters = ";,"; Utilities::SplitString(j->second->GetCategory(), delimiters,keys); - - //std::vector::iterator si; - //for (si=categories.begin();si!=categories.end;++si) - // { - // keys.push_back(*si); - // } - title = "Index by category"; - if (keys.size()==0) keys.push_back(" NONE"); - title = "List by category"; + title = "Boxes by category"; } std::vector::const_iterator k; @@ -1021,8 +1014,17 @@ namespace bbtk { s << "


\n"; s << "

Top"; - s << "first<<"\">\n"; - s << "

"<first<<"\n"; + if (type==Packages) + { + s << "first<<"\">\n"; + s << "

first<<"/index.html\">" + << ii->first<<"\n"; + } + else + { + s << "first<<"\">\n"; + s << "

"<first<<"\n"; + } s << "

    \n"; s << "

    \n"; @@ -1032,10 +1034,12 @@ namespace bbtk { std::string pack = (*di)->GetPackage()->GetName(); std::string name = (*di)->GetTypeName(); + Utilities::html_format(name); std::string descr = (*di)->GetDescription(); + Utilities::html_format(descr); s << ""; s << " "; @@ -1043,7 +1047,7 @@ namespace bbtk s << "\n"; } s << "
    "; - s << "
  • " <"; s << "
  • \n"; - s << "

\n"; + s << "\n"; s << "\n"; } //----------------------