X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkComplexBlackBoxDescriptor.cxx;h=d9e8da14fffa779c90cd7d9dafc10c47a755a636;hb=372f03317f05d4a436b0f9c39b98558ec4810b78;hp=ea85e12d7b79485f1910a6b8f61a443bf2a77a5a;hpb=998354bb81a4f450cae3a2263838d7d3b6024bac;p=bbtk.git diff --git a/kernel/src/bbtkComplexBlackBoxDescriptor.cxx b/kernel/src/bbtkComplexBlackBoxDescriptor.cxx index ea85e12..d9e8da1 100644 --- a/kernel/src/bbtkComplexBlackBoxDescriptor.cxx +++ b/kernel/src/bbtkComplexBlackBoxDescriptor.cxx @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkComplexBlackBoxDescriptor.cxx,v $ Language: C++ - Date: $Date: 2008/02/05 12:16:55 $ - Version: $Revision: 1.3 $ + Date: $Date: 2008/03/07 10:21:30 $ + Version: $Revision: 1.12 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -33,12 +33,14 @@ namespace bbtk //======================================================================= /// Default ctor ComplexBlackBoxDescriptor::ComplexBlackBoxDescriptor(const std::string& name) - : BlackBoxDescriptor() + : BlackBoxDescriptor(), + mFactory(0) { - bbtkDebugMessageInc("Core",9,"ComplexBlackBoxDescriptor::ComplexBlackBoxDescriptor(\""<bbClone(name); - bbtkDebugDecTab("Core",5); + bbtkDebugDecTab("Kernel",5); } //======================================================================= @@ -81,11 +83,16 @@ namespace bbtk const std::string& name ) { - bbtkDebugMessageInc("Core",5, + bbtkDebugMessageInc("Kernel",5, "ComplexBlackBoxDescriptor::Add(\"" <bbUnsafeGetBlackBox( name ) ) @@ -93,9 +100,9 @@ namespace bbtk bbtkError("a black box \""<bbAddBlackBox ( /*mFactory->Create*/ NewBlackBox(type,name) ); + mPrototype->bbAddBlackBox ( mFactory->NewBlackBox(type,name) ); - bbtkDebugDecTab("Core",5); + bbtkDebugDecTab("Kernel",5); } //======================================================================= @@ -103,7 +110,7 @@ namespace bbtk /// Adds a black box to the execution list void ComplexBlackBoxDescriptor::AddToExecutionList ( const std::string& box) { - bbtkDebugMessageInc("Core",5, + bbtkDebugMessageInc("Kernel",5, "ComplexBlackBoxDescriptor::AddToExecutionList(\"" <bbAddToExecutionList ( box ); - bbtkDebugDecTab("Core",5); + bbtkDebugDecTab("Kernel",5); } @@ -128,12 +135,19 @@ namespace bbtk const std::string& input ) { - bbtkDebugMessageInc("Core",5, + bbtkDebugMessageInc("Kernel",5, "ComplexBlackBoxDescriptor::Connect(\"" <bbGetBlackBox( from ); if ( !bbfrom ) @@ -146,11 +160,11 @@ namespace bbtk bbtkError("the black box \""<*/ NewConnection( bbfrom, output, bbto, input ); + Connection* c = mFactory->NewConnection( bbfrom, output, bbto, input ); mPrototype->bbAddConnection(c); - bbtkDebugDecTab("Core",5); + bbtkDebugDecTab("Kernel",5); } //======================================================================= @@ -162,7 +176,7 @@ namespace bbtk const std::string& input, const std::string& help) { - bbtkDebugMessageInc("Core",5, + bbtkDebugMessageInc("Kernel",5, "ComplexBlackBoxDescriptor::DefineInput(\"" <bbGetInputType(input))); - + AddInputDescriptor ( new ComplexBlackBoxInputDescriptor + ( typeid(ComplexBlackBoxDescriptor), + name, + help, + box, + input, + bb->bbGetInputType(input))); + - bbtkDebugDecTab("Core",5); + bbtkDebugDecTab("Kernel",5); } //======================================================================= @@ -199,7 +215,7 @@ namespace bbtk const std::string& output, const std::string& help) { - bbtkDebugMessageInc("Core",5, + bbtkDebugMessageInc("Kernel",5, "ComplexBlackBoxDescriptor::DefineOutput(\"" <bbGetOutputType(output))); - bbtkDebugDecTab("Core",5); + bbtkDebugDecTab("Kernel",5); } //======================================================================= @@ -256,7 +273,7 @@ namespace bbtk int detail, int level, const std::string& output_dir, bool relative_link) { - bbtkDebugMessageInc("Core",9, + bbtkDebugMessageInc("Kernel",9, "ComplexBlackBoxDescriptor::InsertHtmlHelp() [" < categories; + // Split the category string + std::string delimiters = ";,"; + Utilities::SplitString(GetCategory(), + delimiters,categories); + (s) << "

\n"; (s) << "\n"; - (s) << "\n"; - + (s) << "\n"; std::string inc = GetScriptFileName(); if (inc.size()>0) { - (s) << "\n"; + s << "\n"; } @@ -307,7 +334,7 @@ namespace bbtk if (B.size()) { - (s) << "" << "" @@ -400,7 +427,7 @@ namespace bbtk Utilities::html_format(type); std::string descr(o->second->GetDescription()); - //Utilities::html_format(descr); + Utilities::html_format(descr); (s) << "" << "" @@ -412,7 +439,7 @@ namespace bbtk //------------ // End - bbtkDebugDecTab("Core",9); + bbtkDebugDecTab("Kernel",9); } //=========================================================================
Description : " @@ -292,14 +313,20 @@ namespace bbtk (s) << "
Author(s) : " << author << "
Category(s) : " - << category << "
Category(s) : "; + std::vector::iterator ci; + for (ci=categories.begin(); ci!=categories.end(); ++ci) + { + s << "" << *ci + << " \n"; + } + s << "
Include : " - << inc << "
To use it : include "; + s << inc << "  [source]"; + s << "
Dependencies : "; + (s) << "
Uses : "; std::set pdeps; ComplexBlackBox::BlackBoxMapType::const_iterator b; @@ -367,7 +394,7 @@ namespace bbtk Utilities::html_format(type); std::string descr(in->second->GetDescription()); - //Utilities::html_format(descr); + Utilities::html_format(descr); (s) << "
 "<
 "<
 "<
 "<