]> Creatis software - bbtk.git/commitdiff
*** empty log message ***
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Fri, 21 Mar 2008 11:44:37 +0000 (11:44 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Fri, 21 Mar 2008 11:44:37 +0000 (11:44 +0000)
kernel/src/bbtkInterpreter.cxx
kernel/src/bbtkInterpreter.h
kernel/src/bbtkWxGUIConsole.cxx

index 7b5fa779af57647042f24cdfee4c046f7d2d5480..82edfcd775c46d173dc99d500d29f9d0492dfcf0 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkInterpreter.cxx,v $ $
   Language:  C++
-  Date:      $Date: 2008/03/20 15:27:56 $
-  Version:   $Revision: 1.50 $
+  Date:      $Date: 2008/03/21 11:44:37 $
+  Version:   $Revision: 1.51 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -307,7 +307,7 @@ bufferNb =0;
     bool exm = mCommandLine;
     mCommandLine = false;
 
-    ExitStatus status = OK;
+    ExitStatus status = Interpreter_OK;
 
   
     try 
@@ -336,7 +336,7 @@ bufferNb =0;
     }
     catch (QuitException e) 
     {
-      status = QUIT;
+      status = Interpreter_QUIT;
       if (mThrow) throw QuitException();
     }
     catch (bbtk::Exception e) 
@@ -347,11 +347,11 @@ bufferNb =0;
          mess << "* FILE  : \""<<mFileName.back()<<"\""<<std::endl;
          mess << "* LINE  : "<<mLine.back()<<std::endl;
       }    
-      status = ERROR;
+      status = Interpreter_ERROR;
       if (mThrow) 
        throw bbtk::Exception("Interpreter","",mess.str());
       else
-       std::cerr << mess;
+       std::cerr << mess.str();
 
     }
     catch (std::exception& e) 
@@ -362,11 +362,11 @@ bufferNb =0;
           mess << "* FILE  : \""<<mFileName.back()<<"\""<<std::endl;
           mess << "* LINE  : "<<mLine.back()<<std::endl;
        }  
-      status = ERROR;
+      status = Interpreter_ERROR;
       if (mThrow) 
        throw bbtk::Exception("Interpreter","",mess.str());
       else
-       std::cerr << mess;  
+       std::cerr << mess.str();  
     }  
     catch (...)
       {
@@ -377,11 +377,11 @@ bufferNb =0;
           mess << "* FILE  : \""<<mFileName.back()<<"\""<<std::endl;
           mess << "* LINE  : "<<mLine.back()<<std::endl;
        }    
-       status = ERROR;
+       status = Interpreter_ERROR;
        if (mThrow) 
          throw bbtk::Exception("Interpreter","",mess.str());
        else
-         std::cerr << mess;   
+         std::cerr << mess.str();   
       }
     
     CloseAllFiles();
@@ -407,7 +407,7 @@ bufferNb =0;
     bool exm = mCommandLine;
     mCommandLine = false;
 
-    ExitStatus status = OK;
+    ExitStatus status = Interpreter_OK;
 
     try 
     {
@@ -436,7 +436,7 @@ bufferNb =0;
     }
     catch (QuitException e) 
       { 
-       status = QUIT;
+       status = Interpreter_QUIT;
       }
     catch (bbtk::Exception e) 
       {
@@ -446,7 +446,7 @@ bufferNb =0;
            std::cerr << "* FILE  : \""<<mFileName.back()<<"\""<<std::endl;
            std::cerr << "* LINE  : "<<mLine.back()<<std::endl;
          }    
-       status = ERROR;
+       status = Interpreter_ERROR;
       }
     catch (std::exception& e) 
       {
@@ -456,7 +456,7 @@ bufferNb =0;
            std::cerr << "* FILE  : \""<<mFileName.back()<<"\""<<std::endl;
            std::cerr << "* LINE  : "<<mLine.back()<<std::endl;
          }    
-       status = ERROR;
+       status = Interpreter_ERROR;
     }  
     catch (...)
       {
@@ -467,7 +467,7 @@ bufferNb =0;
            std::cerr << "* FILE  : \""<<mFileName.back()<<"\""<<std::endl;
            std::cerr << "* LINE  : "<<mLine.back()<<std::endl;
          }    
-       status = ERROR;
+       status = Interpreter_ERROR;
       }
     
     CloseAllFiles();
@@ -485,7 +485,7 @@ bufferNb =0;
   {
     bbtkDebugMessageInc("Interpreter",9,"Interpreter::InterpretLine('"<<line<<"')"<<std::endl);
 
-    ExitStatus status = OK;
+    ExitStatus status = Interpreter_OK;
 
     try 
     {
@@ -494,23 +494,23 @@ bufferNb =0;
     }
     catch (QuitException e) 
       { 
-      status = QUIT;
+      status = Interpreter_QUIT;
       }
     catch (bbtk::Exception e) 
       {
        std::cerr << "* ERROR : "<<e.GetMessage()<<std::endl;
-       status = ERROR;
+       status = Interpreter_ERROR;
       }
     catch (std::exception& e) 
       {
        std::cerr << "* ERROR : "<<e.what()<<" (not in bbtk)"<<std::endl;
-       status = ERROR;
+       status = Interpreter_ERROR;
     }  
     catch (...)
       {
        std::cerr 
          << "* UNDEFINED ERROR (not a bbtk nor a std exception)"<<std::endl;
-       status = ERROR;
+       status = Interpreter_ERROR;
       }
     
 
index 9f7c60e16b788e9353a8efaf506082895be70143..93fad6de074a72a0df994e9f2281ba1415f0afba 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkInterpreter.h,v $ $
   Language:  C++
-  Date:      $Date: 2008/03/20 15:27:56 $
-  Version:   $Revision: 1.18 $
+  Date:      $Date: 2008/03/21 11:44:37 $
+  Version:   $Revision: 1.19 $
 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -44,8 +44,8 @@ namespace bbtk
   class BBTK_EXPORT InterpreterUser
   {
   public: 
-    InterpreterUser() {};
-    ~InterpreterUser() {};
+    InterpreterUser() {}
+    ~InterpreterUser() {}
 
     virtual bool InterpreterUserHasOwnHtmlPageViewer() { return false; }
     virtual void InterpreterUserViewHtmlPage(const std::string&) {}
@@ -112,9 +112,9 @@ namespace bbtk
 
     typedef enum 
       {
-       OK,
-       ERROR,
-       QUIT
+       Interpreter_OK,
+       Interpreter_ERROR,
+       Interpreter_QUIT
       }
       ExitStatus;
 
index fe4619f377188dbb6b9a58f44816993669673434..edaaf6aed2d86151f93574dd3616ccedb95d8ea6 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxGUIConsole.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/03/20 15:27:57 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2008/03/21 11:44:37 $
+  Version:   $Revision: 1.4 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -187,7 +187,7 @@ namespace bbtk
     mWxGUIOutputMessages->Print(s,wxRED);
 
     if (  mInterpreter->InterpretLine( command ) == 
-         Interpreter::QUIT )
+         Interpreter::Interpreter_QUIT )
       {
        Close(true); 
       }
@@ -199,7 +199,7 @@ namespace bbtk
   bool WxGUIConsole::InterpretFile( const std::string& filename) 
   { 
     if ( mInterpreter->InterpretFile(filename) ==
-        Interpreter::ERROR ) 
+        Interpreter::Interpreter_ERROR ) 
       {
        return false;
       }