Module: $RCSfile: bbtkFactory.cxx,v $
Language: C++
-Date: $Date: 2008/02/04 13:51:30 $
-Version: $Revision: 1.10 $
+Date: $Date: 2008/02/05 11:39:32 $
+Version: $Revision: 1.12 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
std::vector<std::string> keys;
if (type==Packages)
{
- keys.push_back(pack->GetName());
- title = "Index by packages";
+ std::string k("");
+ k += pack->GetName();
+ keys.push_back(k);
+ title = "List by package";
}
else if (type==Initials)
{
std::string init(" ");
init[0] = std::toupper(j->second->GetTypeName()[0]);
keys.push_back(init);
- title = "Alphabetical index";
+ title = "Alphabetical list";
}
- else if (type==Keywords)
+ else if (type==Categories)
{
// Split the keyword string
- //std::vector<std::string> keywords;
std::string delimiters = ";,";
Utilities::SplitString(j->second->GetKeyword(),
delimiters,keys);
- //std::vector<std::string>::iterator si;
- //for (si=keywords.begin();si!=keywords.end;++si)
- // {
- // keys.push_back(*si);
- // }
- title = "Index by keywords";
+ if (keys.size()==0)
+ keys.push_back(" NONE");
+ title = "List by category";
}
std::vector<std::string>::const_iterator k;
//----------------------
// Html body
s << "<body>\n";
+ s << "<a name=\"Top\"></a>\n";
s << "<h1 class=\"settitle\">"<<title<<"</h1>\n";
-
+ s << "<p>\n";
IndexType::iterator ii;
for (ii=index.begin();ii!=index.end();++ii)
{
+ s << "<a href=\"#"<<ii->first<<"\">"<<ii->first<<"</a> ";
+ }
+
+ for (ii=index.begin();ii!=index.end();++ii)
+ {
+ s << "<p><hr>\n";
+ s << "<p><a href=\"#Top\">Top</a>";
+ s << "<a name=\""<<ii->first<<"\"></a>\n";
s << "<p><b>"<<ii->first<<"</b>\n";
s << "<ul>\n";