X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkFactory.cxx;h=ab82b885600f5583cb2f412fb7c77492f2785bb1;hb=cb1a201cc6e6ab05f0c5063f6fc368681571a64e;hp=3652d95a8f364681ee8fdf2f2cffa2a653b8813a;hpb=743fbf0471560aaff9644796ce1c4651407e0e9c;p=bbtk.git diff --git a/kernel/src/bbtkFactory.cxx b/kernel/src/bbtkFactory.cxx index 3652d95..ab82b88 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 10:51:28 $ -Version: $Revision: 1.16 $ +Date: $Date: 2008/02/12 12:55:16 $ +Version: $Revision: 1.18 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de @@ -582,8 +582,11 @@ namespace bbtk //=================================================================== //=================================================================== - /// Prints help on the black box of type - void Factory::HelpBlackBox(const std::string& name, bool full) const + /// Prints help on the black box of type + /// 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; } } @@ -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,7 +1034,9 @@ 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 << "
    "; s << "