]> Creatis software - bbtk.git/commitdiff
doc_tmp -> temp_dir
authorjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Wed, 6 Feb 2008 10:53:02 +0000 (10:53 +0000)
committerjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Wed, 6 Feb 2008 10:53:02 +0000 (10:53 +0000)
kernel/src/bbtkComplexBlackBox.cxx
kernel/src/bbtkConfigurationFile.cxx
kernel/src/bbtkConfigurationFile.h
kernel/src/bbtkExecuter.cxx
kernel/src/bbtkExecuter.h
kernel/src/bbtkInterpreter.cxx

index ec6f1c313ff1ab39642e347903fa14ec081b6f98..a3d2ce3e2acaec4c995da3e7caaabd1ff09415f1 100644 (file)
@@ -3,8 +3,8 @@
 Program:   bbtk
 Module:    $RCSfile: bbtkComplexBlackBox.cxx,v $
 Language:  C++
-Date:      $Date: 2008/02/05 13:23:46 $
-Version:   $Revision: 1.2 $
+Date:      $Date: 2008/02/06 10:53:02 $
+Version:   $Revision: 1.3 $
                                                                                 
 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
 l'Image). All rights reserved. See Doc/License.txt or
@@ -616,20 +616,22 @@ namespace bbtk
     restname = blackboxname.substr(lastPos+pos - lastPos+1, 999);
 
     if (restname==subname)
-      {
-       restname="";
-      }
+    {
+          restname="";
+    }
 
     BlackBoxMapType::iterator i = mBlackBoxMap.find(subname);
     if ( i == mBlackBoxMap.end() ) 
-      {
-       blackbox = NULL;
-      } else {
-      blackbox = i->second;
-      if (restname!="")
-       {
-         blackbox = blackbox->bbFindBlackBox(restname);
-       }
+    {
+          blackbox = NULL;
+    } 
+    else 
+    {
+       blackbox = i->second;
+       if (restname!="")
+           {
+            blackbox = blackbox->bbFindBlackBox(restname);
+           }
     }
     return blackbox;
   }
@@ -647,11 +649,11 @@ namespace bbtk
     std::string directory(output_dir);
 
     if (output_dir.length() == 0) 
-      {
-       // Don't pollute the file store with  "doc_tmp" directories ... 
-       std::string default_doc_dir = ConfigurationFile::GetInstance().Get_default_doc_tmp();
-       directory =  default_doc_dir + "/" + "doc_tmp";
-      }
+    {
+          // Don't pollute the file store with  "temp_dir" directories ... 
+          std::string default_temp_dir = ConfigurationFile::GetInstance().Get_default_temp_dir();
+          directory =  default_temp_dir + "/" + "temp_dir";
+    }
     
     std::string simplefilename  (this->bbGetTypeName()+"_"+this->bbGetName());
     std::string simplefilename_png (simplefilename+".png");
@@ -701,13 +703,13 @@ namespace bbtk
     char c;
     ff2=fopen(filename_cmap.c_str(),"r");
     while (!feof(ff2))
-      {
-       c=fgetc(ff2);
-       if (c!=-1)
-         {
-           (s) << c;
-         }
-      }
+    {
+          c=fgetc(ff2);
+          if (c!=-1)
+          {
+             (s) << c;
+          }
+    }
     (s) << "</map>\n\n";
     
     // End
@@ -728,38 +730,40 @@ namespace bbtk
     Package *package = this->bbGetDescriptor()->GetPackage(); 
 
     if (package!=NULL)
-      {
-       if (relative_link)
-         tmp1 = this->bbGetDescriptor()->GetPackage()->GetDocRelativeURL();
-       else 
-         tmp1 = this->bbGetDescriptor()->GetPackage()->GetDocURL();
-      
+    {
+      if (relative_link)
+            tmp1 = this->bbGetDescriptor()->GetPackage()->GetDocRelativeURL();
+          else 
+            tmp1 = this->bbGetDescriptor()->GetPackage()->GetDocURL();
+    } 
     else 
-      {
-       tmp1 = "Caspitas";
-      }
+    {
+          tmp1 = "Caspitas";
+    }
 
     std::string tmp2=bbGetTypeName();
     std::string url(tmp1 + "#" + tmp2 );       
     fprintf( ff , "subgraph cluster_%s_%p {\n",bbGetName().c_str(),this);
 
     if (!(   (bbGetTypeName()=="workspace") && (bbGetName()=="workspacePrototype")) )
-      {
-       fprintf( ff , "  URL = \"%s\" %s",url.c_str(),";");
-      }
+    {
+          fprintf( ff , "  URL = \"%s\" %s",url.c_str(),";");
+    }
 
     std::string boxname="["+bbGetTypeName()+"]";
     if (this!=parentblackbox)
-      {
-       if (detail==0)
-         {
-           boxname=bbGetName();
-         } else {
-         boxname = bbGetName();
-         boxname = boxname + "   [" +this->bbGetDescriptor()->GetPackage()->GetName()+"::"+ bbGetTypeName() + "]";
-       }
+    {
+       if (detail==0)
+           {
+          boxname=bbGetName();
+       } 
+       else 
+       {
+          boxname = bbGetName();
+          boxname = boxname + "   [" +this->bbGetDescriptor()->GetPackage()->GetName()+"::"+ bbGetTypeName() + "]";
+           }
 
-      }
+    }
     fprintf( ff , "  label = \"%s\"%s\n",  boxname.c_str() ,";");
 
 
index b15e061e4ad08180e88eced07be917e6b88ca592..167579f37f4636a17b3cf96dcf21309821993424 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkConfigurationFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/01/22 15:02:00 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/02/06 10:53:02 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See doc/license.txt or
@@ -133,9 +133,9 @@ void ConfigurationFile::CreateConfigXML( char *rootDirectory )
    fprintf(fp, "   <package_path> </package_path>\n");
    fprintf(fp, "   <data_path> %s </data_path>\n", BBTK_DATA_PATH);
    /// \todo find a decent default value !
-   ///fprintf(fp, "   <default_doc_tmp>  %s </default_doc_tmp>\n", " ");
-   // when $ will be found, default_doc_tmp value will be replaced
-   fprintf(fp, "   <default_doc_tmp>$</default_doc_tmp>\n");
+   ///fprintf(fp, "   <default_temp_dir>  %s </default_temp_dir>\n", " ");
+   // when $ will be found, default_temp_dir value will be replaced
+   fprintf(fp, "   <default_temp_dir>$</default_temp_dir>\n");
    fprintf(fp, "</config>\n");
    fclose(fp);
 }
@@ -399,14 +399,14 @@ void ConfigurationFile::Read(const std::string& filename)
       mPackage_paths.push_back(val);
     }
 
-  // default_doc_tmp
-  if( BB.nChildNode((XMLCSTR)"default_doc_tmp") ) 
-     GetTextOrClear(BB.getChildNode((XMLCSTR)"default_doc_tmp"),mDefault_doc_tmp);
+  // default_temp_dir
+  if( BB.nChildNode((XMLCSTR)"default_temp_dir") ) 
+     GetTextOrClear(BB.getChildNode((XMLCSTR)"default_temp_dir"),mDefault_temp_dir);
 
-  if ( mDefault_doc_tmp == "$") // no value found in config_xml
+  if ( mDefault_temp_dir == "$") // no value found in config_xml
   {
      size_t pos = mConfig_xml_full_path.find("bbtk_config.xml");
-     mDefault_doc_tmp = mConfig_xml_full_path.substr (0,pos); 
+     mDefault_temp_dir = mConfig_xml_full_path.substr (0,pos); 
   }    
   // file separator
   #if defined(_WIN32)
index d264c91a75a7bc1bbae348797e8cce485bbd0eca..88d8845271ee6857b24ad7aab9d43a249d32b4c1 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkConfigurationFile.h,v $
   Language:  C++
-  Date:      $Date: 2008/01/22 15:02:00 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/02/06 10:53:02 $
+  Version:   $Revision: 1.2 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See doc/license.txt or
@@ -90,8 +90,8 @@ public:
      { return mPackage_paths;}
   inline const std::string& Get_config_xml_full_path() const
      { return mConfig_xml_full_path;}
-  inline const std::string& Get_default_doc_tmp() const
-     { return mDefault_doc_tmp;}
+  inline const std::string& Get_default_temp_dir() const
+     { return mDefault_temp_dir;}
            
   private:
   void Read(const std::string& fileName);
@@ -118,7 +118,7 @@ public:
   /// If Packages link against extern dlls
   std::vector<std::string> mExt_dll_paths;
   /// Default directory for generating Graph
-  std::string mDefault_doc_tmp;       
+  std::string mDefault_temp_dir;       
   };
 
 
index 00a5551123d5100e99f4193beeeaebfc4e83a339..2bb24d8e12b8eec87092a6d6b6056a061313c206 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkExecuter.cxx,v $ $
   Language:  C++
-  Date:      $Date: 2008/02/06 09:27:52 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2008/02/06 10:53:02 $
+  Version:   $Revision: 1.9 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -437,14 +437,14 @@ namespace bbtk
     // No output provided : automatic generation
     if (output_html.length() == 0)
       {
-       // Don't pollute the file store with  "doc_tmp" directories ...    
-       std::string default_doc_dir = ConfigurationFile::GetInstance().Get_default_doc_tmp();
+       // Don't pollute the file store with  "temp_dir" directories ...    
+       std::string default_doc_dir = ConfigurationFile::GetInstance().Get_default_temp_dir();
        
        char c = default_doc_dir.c_str()[strlen(default_doc_dir.c_str())-1];
        
        std::string directory = default_doc_dir; 
        if (c != '/' && c !='\\') directory = directory + "/";
-       directory = directory +  "doc_tmp";    
+       directory = directory +  "temp_dir";    
        
        filename_rootHtml = directory + "/" + "User.html";
        simplefilename_rootHtml = "User.html" ;
@@ -506,16 +506,16 @@ namespace bbtk
 
     if (blackbox)
       {      
-       // Don't pollute the file store with  "doc_tmp" directories ...    
-       std::string default_doc_dir = ConfigurationFile::GetInstance().Get_default_doc_tmp();
+       // Don't pollute the file store with  "temp_dir" directories ...    
+       std::string default_doc_dir = ConfigurationFile::GetInstance().Get_default_temp_dir();
        char c = default_doc_dir.c_str()[strlen(default_doc_dir.c_str())-1];
        
        std::string directory = default_doc_dir; 
        if (c != '/' && c !='\\') directory = directory + "/";
 
-       directory = directory +  "doc_tmp"; 
+       directory = directory +  "temp_dir"; 
        
-       //std::string directory("doc_tmp");
+       //std::string directory("temp_dir");
        std::string filename(directory + "/" + "bbtk_graph_pipeline");
        std::string filename_html(filename+".html");
        std::string command0("mkdir \""+directory + "\"");
index bcd8b246ae8197d3c0de782a36039614bad3366b..0090fada1a4e141b9c1746b5e6954914ccc32064 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkExecuter.h,v $ $
   Language:  C++
-  Date:      $Date: 2008/02/06 09:27:52 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2008/02/06 10:53:02 $
+  Version:   $Revision: 1.8 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -48,7 +48,7 @@ namespace bbtk
 
     ///
     //  void SetFactory(Factory* f);
-      
+
     /// Destructor
     ~Executer();
     
index f46dfe020106364527d225da512e04e2ce0f2db5..5b0c26e81faa4f9e18fe6f8c0ed279241de2b0e2 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkInterpreter.cxx,v $ $
   Language:  C++
-  Date:      $Date: 2008/02/06 09:32:25 $
-  Version:   $Revision: 1.27 $
+  Date:      $Date: 2008/02/06 10:53:02 $
+  Version:   $Revision: 1.28 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -54,6 +54,7 @@ Interpreter* Interpreter::mGlobalInterpreter = NULL;
 
     //    mFactory = new bbtk::Factory();
     mExecuter = new bbtk::Executer();
+    //mExecuter = new bbtk::Transcriptor("GeneratedProgram.txt");
     //mExecuter->SetFactory(mFactory);
 
     // Builds the commands dict
@@ -297,7 +298,7 @@ Interpreter* Interpreter::mGlobalInterpreter = NULL;
    *  
    */
   void Interpreter::InterpretFile( const std::string& filename,  
-                                  bool use_configuration_file)
+                                   bool use_configuration_file)
   {
     bbtkDebugMessageInc("Interpreter",9,"Interpreter::InterpretFile(\""<<filename<<"\")"<<std::endl);
 
@@ -749,7 +750,7 @@ void Interpreter::SplitLine ( const std::string& str, std::vector<std::string>&
         // It's a user intended message.
         // Please don't remove it.
       bbtkMessage("Interpreter",1,
-                 "look for : [" << name 
+                 "look for : [" << name
                  << "] (use_configuration_file == TRUE)" << std::endl);
       script_paths = ConfigurationFile::GetInstance().Get_bbs_paths();
     }
@@ -1145,7 +1146,7 @@ void Interpreter::Help(const std::vector<std::string>& words)
     const std::string description               = cf.Get_description();
     const std::string url                       = cf.Get_url();
     const std::string data_path                 = cf.Get_data_path();
-    const std::string default_doc_tmp           = cf.Get_default_doc_tmp();    
+    const std::string default_temp_dir          = cf.Get_default_temp_dir();    
     const std::string file_separator            = cf.Get_file_separator();    
     const std::vector<std::string>bbs_paths     = cf.Get_bbs_paths();
     const std::vector<std::string>package_paths = cf.Get_package_paths();
@@ -1156,7 +1157,7 @@ void Interpreter::Help(const std::vector<std::string>& words)
     bbtkMessage("Help",1, "bbtk_config.xml   : [" << config_xml_full_path  << "]" << std::endl); 
     bbtkMessage("Help",1, "Documentation Url : [" << url             << "]" << std::endl);
     bbtkMessage("Help",1, "Data Path         : [" << data_path       << "]" << std::endl);
-    bbtkMessage("Help",1, "Default Doc_tmp   : [" << default_doc_tmp << "]" << std::endl);
+    bbtkMessage("Help",1, "Default Temp-Dir  : [" << default_temp_dir << "]" << std::endl);
     bbtkMessage("Help",1, "File Separator    : [" << file_separator  << "]" << std::endl);
 
     std::vector<std::string>::const_iterator i;