X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkComplexBlackBoxDescriptor.cxx;h=a56659c030cb2b2572bd4dfe8fbe49544efa6401;hb=63d56e2f28b834d9e13f3757aaa23ab63b2b3dd6;hp=efe06f170e8444cc9ee7105576d1b5a4d5a66887;hpb=4ad5b5ee44357ad873bc8c43230defb6d0a79879;p=bbtk.git diff --git a/kernel/src/bbtkComplexBlackBoxDescriptor.cxx b/kernel/src/bbtkComplexBlackBoxDescriptor.cxx index efe06f1..a56659c 100644 --- a/kernel/src/bbtkComplexBlackBoxDescriptor.cxx +++ b/kernel/src/bbtkComplexBlackBoxDescriptor.cxx @@ -1,21 +1,34 @@ -/*========================================================================= - +/*========================================================================= Program: bbtk Module: $RCSfile: bbtkComplexBlackBoxDescriptor.cxx,v $ Language: C++ - Date: $Date: 2008/04/18 12:59:15 $ - Version: $Revision: 1.15 $ - - Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de - l'Image). All rights reserved. See Doc/License.txt or - http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - + Date: $Date: 2009/05/28 08:12:05 $ + Version: $Revision: 1.20 $ =========================================================================*/ +/* --------------------------------------------------------------------- + +* Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale) +* Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux +* +* This software is governed by the CeCILL-B license under French law and +* abiding by the rules of distribution of free software. You can use, +* modify and/ or redistribute the software under the terms of the CeCILL-B +* license as circulated by CEA, CNRS and INRIA at the following URL +* http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html +* or in the file LICENSE.txt. +* +* As a counterpart to the access to the source code and rights to copy, +* modify and redistribute granted by the license, users are provided only +* with a limited warranty and the software's author, the holder of the +* economic rights, and the successive licensors have only limited +* liability. +* +* The fact that you are presently reading this means that you have had +* knowledge of the CeCILL-B license and that you accept its terms. +* ------------------------------------------------------------------------ */ + + /** * \file * \brief Class bbtk::ComplexBlackBoxDescriptor : describes a ComplexBlackBox (constituents, connections) and is able to create an instance of it. @@ -26,6 +39,11 @@ #include "bbtkMessageManager.h" #include "bbtkUtilities.h" +#define bbtkDMessage(key,level,mess) \ + bbtkMessage(key,level,"["< ComplexBlackBoxDescriptor::ComplexBlackBoxDescriptor(\""< ComplexBlackBoxDescriptor(\""<SetAsPrototype(); - bbtkDebugMessage("object",2,"<== ComplexBlackBoxDescriptor::ComplexBlackBoxDescriptor(\""< ComplexBlackBoxDescriptor::~ComplexBlackBoxDescriptor(\""<Delete(); + bbtkDDebugMessage("object",2,"==> ~ComplexBlackBoxDescriptor()"<bbClone(name); - bbtkDebugDecTab("Kernel",5); + } //======================================================================= @@ -107,10 +124,10 @@ namespace bbtk const std::string& name ) { - bbtkDebugMessageInc("Kernel",5, + bbtkDDebugMessage("kernel",5, "ComplexBlackBoxDescriptor::Add(\"" - <bbAddBlackBox ( GetFactory()->NewBlackBox(type,name) ); - bbtkDebugDecTab("Kernel",5); + } //======================================================================= @@ -144,10 +161,10 @@ namespace bbtk /// Adds a black box to the execution list void ComplexBlackBoxDescriptor::AddToExecutionList ( const std::string& box) { - bbtkDebugMessageInc("Kernel",5, - "ComplexBlackBoxDescriptor::AddToExecutionList(\"" - <bbUnsafeGetBlackBox( box ); if ( !b ) @@ -157,7 +174,7 @@ namespace bbtk // ok mPrototype->bbAddToExecutionList ( box ); - bbtkDebugDecTab("Kernel",5); + } @@ -169,12 +186,12 @@ namespace bbtk const std::string& input ) { - bbtkDebugMessageInc("Kernel",5, + bbtkDDebugMessage("kernel",5, "ComplexBlackBoxDescriptor::Connect(\"" <bbAddConnection(c); - bbtkDebugDecTab("Kernel",5); + } //======================================================================= @@ -211,12 +228,12 @@ namespace bbtk const std::string& input, const std::string& help) { - bbtkDebugMessageInc("Kernel",5, + bbtkDDebugMessage("kernel",5, "ComplexBlackBoxDescriptor::DefineInput(\"" <bbGetBlackBox( box ); if ( !bb ) @@ -242,7 +259,7 @@ namespace bbtk d->GetTypeInfo())); - bbtkDebugDecTab("Kernel",5); + } //======================================================================= @@ -253,12 +270,12 @@ namespace bbtk const std::string& output, const std::string& help) { - bbtkDebugMessageInc("Kernel",5, + bbtkDDebugMessage("kernel",5, "ComplexBlackBoxDescriptor::DefineOutput(\"" <bbGetBlackBox( box ); if ( !bb ) @@ -284,7 +301,7 @@ namespace bbtk d->GetTypeInfo())); - bbtkDebugDecTab("Kernel",5); + } //======================================================================= @@ -314,9 +331,9 @@ namespace bbtk int detail, int level, const std::string& output_dir, bool relative_link) { - bbtkDebugMessageInc("Kernel",9, - "ComplexBlackBoxDescriptor::InsertHtmlHelp() [" - <0) { s << " To use it : include "; - s << inc << "  [source]"; + // s << inc << "  [source]"; + // LG TODO : USE PACKAGE BBS PATH + s << inc << "  [source]"; s << "\n"; } @@ -395,14 +414,14 @@ namespace bbtk url = p->GetDocRelativeURL(); else url = p->GetDocURL(); - + s << "" << p->GetName()<<"::"<\n"; - } + } // for (s) << "\n"; - } + } // If B.size (s) << "\n"; @@ -435,7 +454,7 @@ namespace bbtk Utilities::html_format(type); std::string descr(in->second->GetDescription()); - Utilities::html_format(descr); + //Utilities::html_format(descr); (s) << "
 "<"
 	  << "
 "<"
@@ -468,7 +487,7 @@ namespace bbtk
 	Utilities::html_format(type);
 	
 	std::string descr(o->second->GetDescription());
-	Utilities::html_format(descr);
+	//Utilities::html_format(descr);
 	
 	(s) << "
 "<"
 	  << "
 "<"
@@ -480,7 +499,7 @@ namespace bbtk
     //------------
     // End
 
-    bbtkDebugDecTab("Kernel",9);
+
    }
   //=========================================================================
  
@@ -488,16 +507,16 @@ namespace bbtk
   //=======================================================================
   void ComplexBlackBoxDescriptor::GetHelp(bool full) const
   {
-    if (full) bbtkMessage("Help",1,"Complex Black Box <"<<
+    if (full) bbtkMessage("help",1,"Complex Black Box <"<<
 			  GetPackage()->GetName()<<"::"
 			  <"<second->GetNature());
 	   nature += "]";
 	   nature.append(1+natlmax-nature.size(),' ');
-	   bbtkMessage("Help",1,
+	   bbtkMessage("help",1,
 		       "    '"<second->GetName());
@@ -560,7 +579,7 @@ namespace bbtk
 	     std::string nature(o->second->GetNature());
 	     nature += "]";
 	     nature.append(1+natlmax-nature.size(),' ');
-	     bbtkMessage("Help",1,
+	     bbtkMessage("help",1,
 		       "    '"<bbGetBlackBoxMap();
 	
 	   if (B.size()) 
-	     bbtkMessage("Help",1," * Boxes : "<second->bbGetName()<<
+	     bbtkMessage("help",1,"    '"<second->bbGetName()<<
 			 "' <"
 			 << b->second->bbGetDescriptor()->GetPackage()->GetName() 
 			 <<"::"