X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkPackage.cxx;h=66465e9813e2bb200a50e611848ad8c3d3e2cc88;hb=afce3551851e090193cec8e1a157969ae8b150a3;hp=05d5d1f5fa3f9b5bb1e161648039e51c3185a1d9;hpb=664e5cdbbcaf3dafa5fc9f206a7094248c289d5a;p=bbtk.git diff --git a/kernel/src/bbtkPackage.cxx b/kernel/src/bbtkPackage.cxx index 05d5d1f..66465e9 100644 --- a/kernel/src/bbtkPackage.cxx +++ b/kernel/src/bbtkPackage.cxx @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkPackage.cxx,v $ Language: C++ - Date: $Date: 2009/06/08 14:50:04 $ - Version: $Revision: 1.30 $ + Date: $Date: 2010/09/12 14:52:25 $ + Version: $Revision: 1.35 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -134,7 +134,7 @@ namespace bbtk { bbtkDebugMessage("package",5, " Descriptor has already been released" - <mDescriptorMap[*descname]; if ( (dyn==0) || (boost::dynamic_pointer_cast(desc)) ) + { PackageReleaseBlackBoxDescriptorInternal(pack,*descname); + } #else PackageReleaseBlackBoxDescriptorInternal(pack,*descname); #endif @@ -242,10 +244,7 @@ namespace bbtk UnLoadDynamicLibrary(pack); // Unload orphan dl packages Package::UnLoadReleasedDynamicallyLoadedPackages(); - - - } #ifdef BBTK_COMPILE_DEBUG_MESSAGES @@ -575,16 +574,15 @@ namespace bbtk { if (pack.expired() || (!pack.lock()->mDynamicLibraryHandler)) return; - - + std::string packname = pack.lock()->GetName(); bbtkDebugMessage("package",5,"==> Package::UnLoadDynamicLibrary('" <GetDescriptorMap().empty()) { - + bbtkDebugMessage("package",5," Package not empty ... abort" < package '"< with name BlackBox::Pointer Package::NewBlackBox(const std::string& type, @@ -1128,6 +1135,8 @@ namespace bbtk bbtkDebugMessageInc("kernel",9,"Package<"<::CreateHtmlPage(\"" <\n"; s << "\n"; } - +//std::cout<<"JCP bbtkPackage.cxx void Package::CreateHtmlPage() ln 1225"<\n"; DescriptorMapType::const_iterator i; - for (i=mDescriptorMap.begin(); i!=mDescriptorMap.end(); ++i) - { - if ( i->second->GetKind() != BlackBoxDescriptor::STANDARD) - continue; +//std::cout<<"JCP bbtkPackage.cxx void Package::CreateHtmlPage() ln 1236"<second->GetKind() != BlackBoxDescriptor::STANDARD) + continue; - std::string name = i->second->GetTypeName(); - Utilities::html_format(name); - std::string descr = i->second->GetDescription(); - //Utilities::html_format(descr); - - s << ""; - s << " "; - s << " "; - s << "\n"; - } - s << "
"; - s << "   " - <"; - s << "" << descr << "
\n"; - + std::string name = i->second->GetTypeName(); + Utilities::html_format(name); + std::string descr = i->second->GetDescription(); + //Utilities::html_format(descr); +//std::cout<<"JCP bbtkPackage.cxx void Package::CreateHtmlPage() ln 1246"<"; + s << ""; + s << "   " + <"; + s << " "; + s << " " << descr << " "; + s << "\n"; + } + s << "\n"; + + + s << "\n"; + s << "\n"; - s << "\n"; - s << "\n"; - - //------------------- - // Adaptors list - if (mAdaptorMap.size()>0) - { - // s << "
\n"; - s << "

Adaptors : \n"; - s << "

    \n"; - - // DescriptorMapType::const_iterator i; - s << "

    \n"; - for (i=mDescriptorMap.begin(); i!=mDescriptorMap.end();++i) - { - if ( i->second->GetKind() == BlackBoxDescriptor::STANDARD) - continue; - - std::string name = i->second->GetTypeName(); - Utilities::html_format(name); - std::string descr = i->second->GetDescription(); + //------------------- + // Adaptors list + if (mAdaptorMap.size()>0) + { + // s << "
    \n"; + s << "

    Adaptors : \n"; + s << "

      \n"; +//std::cout<<"JCP bbtkPackage.cxx void Package::CreateHtmlPage() ln 1268"<
    \n"; + for (i=mDescriptorMap.begin(); i!=mDescriptorMap.end();++i) + { + if ( i->second->GetKind() == BlackBoxDescriptor::STANDARD) + continue; - s << ""; - s << " "; - s << " "; - s << "\n"; - } - s << "
    "; - s << "   " - <"; - s << "" << descr << "
    \n"; - - s << "

\n"; - s << "
\n"; - } + std::string name = i->second->GetTypeName(); + Utilities::html_format(name); + std::string descr = i->second->GetDescription(); + + s << ""; + s << ""; + s << "   
" + <"; + s << " "; + s << " " << descr << " "; + s << "\n"; + } + s << "\n"; + + s << "\n"; + s << "\n"; + } // s << "
\n"; @@ -1305,23 +1314,23 @@ namespace bbtk //------------------- // Computes output directory from filename to pass it to // BlackBoxDescriptor::InsertHtmlHelp - std::string dir; + std::string dir; - std::string::size_type slash_position = filename.find_last_of("/\\"); + std::string::size_type slash_position = filename.find_last_of("/\\"); - if (slash_position != std::string::npos) { - if (slash_position == 0) - slash_position = 1; - dir = filename.substr(0,slash_position); - } + if (slash_position != std::string::npos) { + if (slash_position == 0) + slash_position = 1; + dir = filename.substr(0,slash_position); + } - for (i=mDescriptorMap.begin(); - i!=mDescriptorMap.end(); - ++i) - { - i->second->InsertHtmlHelp(s,detail,level,dir,relative_link); - } + for (i=mDescriptorMap.begin(); + i!=mDescriptorMap.end(); + ++i) + { + i->second->InsertHtmlHelp(s,detail,level,dir,relative_link); + } //---------------------- // Footer