X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkComplexBlackBoxDescriptor.cxx;h=d9e8da14fffa779c90cd7d9dafc10c47a755a636;hb=5e6e754f059d5fb6b25b883f89f76333228ba5c4;hp=f6f6f4b14df01f43cf89dc6e3c07ef86fd990129;hpb=71376d8384d5d21b5c56d36ecc8cbf31315c039a;p=bbtk.git diff --git a/kernel/src/bbtkComplexBlackBoxDescriptor.cxx b/kernel/src/bbtkComplexBlackBoxDescriptor.cxx index f6f6f4b..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 13:23:46 $ - Version: $Revision: 1.4 $ + 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,10 +33,12 @@ namespace bbtk //======================================================================= /// Default ctor ComplexBlackBoxDescriptor::ComplexBlackBoxDescriptor(const std::string& name) - : BlackBoxDescriptor() + : BlackBoxDescriptor(), + mFactory(0) { bbtkDebugMessageInc("Kernel",9,"ComplexBlackBoxDescriptor::ComplexBlackBoxDescriptor(\""<bbUnsafeGetBlackBox( name ) ) @@ -93,7 +100,7 @@ namespace bbtk bbtkError("a black box \""<bbAddBlackBox ( /*mFactory->Create*/ NewBlackBox(type,name) ); + mPrototype->bbAddBlackBox ( mFactory->NewBlackBox(type,name) ); bbtkDebugDecTab("Kernel",5); } @@ -134,6 +141,13 @@ namespace bbtk <bbGetBlackBox( from ); if ( !bbfrom ) @@ -146,7 +160,7 @@ namespace bbtk bbtkError("the black box \""<*/ NewConnection( bbfrom, output, bbto, input ); + Connection* c = mFactory->NewConnection( bbfrom, output, bbto, input ); mPrototype->bbAddConnection(c); @@ -181,12 +195,14 @@ namespace bbtk <bbGetInputType(input))); - + AddInputDescriptor ( new ComplexBlackBoxInputDescriptor + ( typeid(ComplexBlackBoxDescriptor), + name, + help, + box, + input, + bb->bbGetInputType(input))); + bbtkDebugDecTab("Kernel",5); } @@ -219,7 +235,8 @@ namespace bbtk } AddOutputDescriptor ( new ComplexBlackBoxOutputDescriptor - ( name, + ( typeid(ComplexBlackBoxDescriptor), + name, help, box, output, @@ -277,13 +294,17 @@ namespace bbtk std::string descr = GetDescription(); - //Utilities::html_format(descr); + Utilities::html_format(descr); std::string author = GetAuthor(); Utilities::html_format(author); - std::string category = GetCategory(); - Utilities::html_format(category); + std::vector 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) << "" << ""
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) << "
 "<
 "<
 "<
 "<