X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkFactory.cxx;h=7ddf1778def128eb7ef7ee21bbb1e131efbaebdf;hb=b297410bce4fc9141ade21cbeca71061369b4932;hp=627bc80881b1e99ac4b112dbf8244d543c8a9718;hpb=ca35bb0588533c9eac29b7d3ef8689c97ccfcfe7;p=bbtk.git diff --git a/kernel/src/bbtkFactory.cxx b/kernel/src/bbtkFactory.cxx index 627bc80..7ddf177 100644 --- a/kernel/src/bbtkFactory.cxx +++ b/kernel/src/bbtkFactory.cxx @@ -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 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::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 v; - v.push_back(j->second); - index[*k] = v; - } - } - - } - } + std::vector 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::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 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 << "first<<"\">"<first<<"  "; + s << "first<<"\">"<first<<"  "; } for (ii=index.begin();ii!=index.end();++ii) @@ -1018,9 +1018,14 @@ namespace bbtk s << "  -  \n"; s << "\n"; -//EED 26Mars2009 + +//EED 26Mars2009 + /*JCP 19 Nov 2009 std::string bin_path = bbtk::ConfigurationFile::GetInstance().Get_bin_path(); s << "first << "/main.html>(Doxygen documentation of the source)\n"; + JCP 19 Nov 2009*/ + std::string bin_path = bbtk::ConfigurationFile::GetInstance().Get_bin_path(); + s << "first << "/main.html>(Doxygen documentation of the source)\n"; } else {