From: guigues Date: Thu, 14 Feb 2008 09:41:41 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: r0.6.1~221 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=68616a252957b8585f4dfe97b71ae269e3bc5f54;p=bbtk.git *** empty log message *** --- diff --git a/kernel/appli/bbfy/bbfy.cpp b/kernel/appli/bbfy/bbfy.cpp index 8123db2..7ec9442 100644 --- a/kernel/appli/bbfy/bbfy.cpp +++ b/kernel/appli/bbfy/bbfy.cpp @@ -3,7 +3,7 @@ #endif #include -#include "xmlParser.h" +#include "bbtkXML.h" #include #include #include @@ -139,27 +139,6 @@ void bbfy::CreateBlackBox() //========================================================================== -//========================================================================== -void GetTextOrClear(const XMLNode& node, std::string& var) -{ - if (node.nText()>0) - { - var = node.getText(); - } - else if (node.nClear()>0) - { - var = node.getClear().lpszValue; - } - else - { - std::string mess("Error : element <"); - mess += node.getName(); - mess += "> : no text nor
 clear tag found";
-      throw bbfyException(mess);
-    }
-}
-//==========================================================================
-
 
 //==========================================================================
 void bbfy::ParseXML()
@@ -207,7 +186,7 @@ void bbfy::ParseXML()
 	    {
 	      throw bbfyException("Error : blackbox type '"+itkImageToImageFilterString+"' but no  tag found (mandatory)");
 	    }
-	  GetTextOrClear(BB.getChildNode("itkparent"),mItkParent);
+	  bbtk::GetTextOrClear(BB.getChildNode("itkparent"),mItkParent);
 	  // 
 	  mGeneric = false;
 	  if (BB.isAttributeSet("generic")) mGeneric=true;
@@ -222,7 +201,7 @@ void bbfy::ParseXML()
 				  +vtkImageAlgorithmString
 				  +"' but no  tag found (mandatory)");
 	    }
-	  GetTextOrClear(BB.getChildNode("vtkparent"),mVtkParent);
+	  bbtk::GetTextOrClear(BB.getChildNode("vtkparent"),mVtkParent);
 	  // 
 	}
     else if (bbtype == vtkPolyDataAlgorithmString )
@@ -235,7 +214,7 @@ void bbfy::ParseXML()
 				  +vtkPolyDataAlgorithmString
 				  +"' but no  tag found (mandatory)");
 	    }
-	  GetTextOrClear(BB.getChildNode("vtkparent"),mVtkParent);
+	  bbtk::GetTextOrClear(BB.getChildNode("vtkparent"),mVtkParent);
 	  // 
 	}
      else 
@@ -269,7 +248,7 @@ void bbfy::ParseXML()
   for (i=0,j=0; i argv;
   bool command;
+  bool debug;
   bool quiet;
   bool help;
   bool graphical_dialog;
@@ -62,6 +64,7 @@ void wxBBIApp::OnInitCmdLine(wxCmdLineParser& parser)
 
 bool wxBBIApp::OnCmdLineParsed(wxCmdLineParser& parser)
 {
+  debug = ( parser.Found(_T("d")) );
   quiet = ( parser.Found(_T("q")) );
   help = ( parser.Found(_T("h")) );
   graphical_dialog = ( parser.Found(_T("g")) );
@@ -120,8 +123,11 @@ bool wxBBIApp::OnInit( )
   //See http://www.wxwindows.org/faqgtk.htm#locale
   setlocale(LC_NUMERIC, "C");
 #endif
+  
+  if (quiet) bbtk::MessageManager::SetMessageLevel("All",0);
+  if (debug) bbtk::MessageManager::SetMessageLevel("All",9);
+  
 
- 
   bbtk::WxConsole *I = new bbtk::WxConsole(0,_T("bbi"),wxSize(600,400));
   SetTopWindow(I);  
   if (!no_command) I->Show(true);
diff --git a/kernel/src/bbtkConfigurationFile.cxx b/kernel/src/bbtkConfigurationFile.cxx
index 634d517..0e94df3 100644
--- a/kernel/src/bbtkConfigurationFile.cxx
+++ b/kernel/src/bbtkConfigurationFile.cxx
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkConfigurationFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/02/14 09:32:54 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2008/02/14 09:41:41 $
+  Version:   $Revision: 1.5 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See doc/license.txt or
@@ -62,7 +62,7 @@ namespace bbtk
     // Initialized to mInstall_path+"/"+BBTK_DATA_REL_PATH
     // But can be overriden by value read from bbtk_config.xml
     mData_path = mInstall_path + mFile_separator + BBTK_STRINGIFY_SYMBOL(BBTK_DATA_REL_PATH);
-    //MessageManager::SetMessageLevel("Config",1);
+    MessageManager::SetMessageLevel("Config",1);
     bbtkMessage("Config",1," ==> bin    : '"< prefix : '"< doc    : '"<