]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkInterpreter.cxx
*** empty log message ***
[bbtk.git] / kernel / src / bbtkInterpreter.cxx
index ff2fbb17d123e2769ea1bf56a5c35a3f3ef48565..850784a8443909b112ddc4481cd87b8f7ed7e186 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkInterpreter.cxx,v $ $
   Language:  C++
-  Date:      $Date: 2008/04/22 06:59:31 $
-  Version:   $Revision: 1.61 $
+  Date:      $Date: 2008/04/22 08:29:09 $
+  Version:   $Revision: 1.62 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -811,8 +811,7 @@ void Interpreter::InterpretLine( const std::string& line, bool &insideComment )
         break;
 
       case cReset :  
-        this->mExecuter->Reset();
-       mFileNameHistory.clear();
+       Reset();
         break;
 
       case cInclude :
@@ -909,7 +908,15 @@ void Interpreter::SplitLine ( const std::string& str, std::vector<std::string>&
   //=======================================================================
 
 
+  //=======================================================================
+  void Interpreter::Reset()
+  {
+    // Cannot close all files if the reset command is read from a file !
+    //    CloseAllFiles();
+    mFileNameHistory.clear();
+    this->mExecuter->Reset();
+  }
+  //=======================================================================
 
   //=======================================================================
   /**
@@ -991,8 +998,7 @@ void Interpreter::SplitLine ( const std::string& str, std::vector<std::string>&
    *
    */
 
-// ===================================================================================
-
+  // =========================================================================
   void Interpreter::SwitchToFile( const std::string& name )
   {
   // Note : in the following :
@@ -1578,7 +1584,7 @@ void Interpreter::Help(const std::vector<std::string>& words)
        c=0;
        read ( STDIN_FILENO, &c, 4) ;
 
-       bbtkDebugMessage("Debug",9,"[0x"<<std::hex<<c<<"]\n");
+       bbtkDebugMessage("debug",9,"[0x"<<std::hex<<c<<"]\n");
 
        // Printable character
        if ( (ind<MAX_LINE_SIZE-1) &&
@@ -2043,7 +2049,24 @@ void  Interpreter::NewGUI(const std::string& boxname,
  //==========================================================================
   void Interpreter::ObjectInfo(const std::string& name)
   {
-    Object:: PrintObjectInfo(name);
+    if ((name.length()==2)&&(name[0]=='-'))
+      {
+       if (name[1]=='S')
+         {
+           bbtk::StaticInitTime::PrintObjectListInfo = true;
+         }
+       if (name[1]=='C')
+         {
+           //      int o = MessageManager::GetMessageLevel("debug");
+           //      if (o<2) MessageManager::SetMessageLevel("debug",2);
+           mExecuter->GetFactory()->CheckPackages();
+           //      MessageManager::SetMessageLevel("debug",o);
+         }
+      }
+    else 
+      {
+       Object:: PrintObjectListInfo(name);
+      }
   }
  //==========================================================================
  //==========================================================================