]> Creatis software - bbtk.git/commitdiff
*** empty log message ***
authorguigues <guigues>
Wed, 6 Feb 2008 09:27:52 +0000 (09:27 +0000)
committerguigues <guigues>
Wed, 6 Feb 2008 09:27:52 +0000 (09:27 +0000)
kernel/cmake/BBTKCreatePackageBBdoc.cmake
kernel/cmake/BBTKCreatePackageIncludeScript.cmake
kernel/src/bbtkBlackBoxDescriptor.cxx
kernel/src/bbtkExecuter.cxx
kernel/src/bbtkExecuter.h
kernel/src/bbtkInterpreter.cxx
kernel/src/bbtkInterpreter.h
kernel/src/bbtkVirtualExec.h

index 1875260..7927988 100644 (file)
@@ -34,11 +34,8 @@ MACRO(BBTK_CREATE_PACKAGE_BBDOC PACKAGE_NAME)
   ADD_CUSTOM_COMMAND(
     OUTPUT ${DOC_OUTPUT}
     COMMAND 
-    #    tth 
     cd ${BBTK_BIN_PATH} && ${BBTK_BBI} -n ${OUTPUT_FILE}
- #    ARGS
- #   ${OUTPUT_FILE}
-  #  DEPENDS ${PACKAGE_NAME}
+    DEPENDS bb${PACKAGE_NAME}
     )
   ADD_CUSTOM_TARGET(bbdoc_${PACKAGE_NAME} ALL
     DEPENDS ${DOC_OUTPUT}
index df133c0..383583f 100644 (file)
@@ -71,7 +71,7 @@ MACRO(BBTK_CREATE_PACKAGE_INCLUDE_SCRIPT    BBTK_PACKAGE_NAME    BBTK_PACKAGE_BB
       "${OUTPUT_FILE}"
       "#-----------------------------------------\n"
       "define ${filename}\n"
-      "include ${BBTK_PACKAGE_NAME}/${bbs}\n"
+      "include ${BBTK_PACKAGE_NAME}/${bbs} source\n"
       "endefine\n"
       )
     CONFIGURE_FILE(
index d6d3a40..15f88d8 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkBlackBoxDescriptor.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/02/05 13:23:46 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2008/02/06 09:27:52 $
+  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
@@ -242,6 +242,10 @@ namespace bbtk
       << descr << "</TD></TR>\n";
     (s) << "<TR><TD style='vertical-align: top;'><b> Author(s) </b></TD><TD style='vertical-align: top;'> : </TD><TD style='vertical-align: top;'>  " 
       << author << "</TD></TR>\n";
+    (s) << "<TR><TD style='vertical-align: top;'><b> Category(s) </b></TD><TD style='vertical-align: top;'> : </TD><TD style='vertical-align: top;'>  " 
+      << category << "</TD></TR>\n";
+    (s) << "<TR><TD style='vertical-align: top;'><b> Include </b></TD><TD style='vertical-align: top;'> : </TD><TD style='vertical-align: top;'>  " 
+       << GetPackage()->GetName() << "</TD></TR>\n";
     (s) << "</TABLE>\n";
 
     //-------------
index 8348d06..00a5551 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkExecuter.cxx,v $ $
   Language:  C++
-  Date:      $Date: 2008/02/05 13:23:46 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2008/02/06 09:27:52 $
+  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
@@ -159,6 +159,14 @@ namespace bbtk
     bbtkDebugDecTab("Kernel",9);
   }
 
+  /// Sets the file name to use for the current definition
+  /// (Used to set it after the Define command)
+  void Executer::SetCurrentFileName (const std::string &name )
+  {
+    mOpenDefinition.back().box->SetScriptFileName(name);
+  }
+  
+
   void Executer::EndDefine ()
   {
     bbtkDebugMessageInc("Kernel",9,"Executer::EndDefine(\""
index 3415e5b..bcd8b24 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkExecuter.h,v $ $
   Language:  C++
-  Date:      $Date: 2008/02/05 12:16:55 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2008/02/06 09:27:52 $
+  Version:   $Revision: 1.7 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -76,6 +76,10 @@ namespace bbtk
                 const std::string& pack,
                 const std::string &scriptfilename);
 
+    /// Sets the file name to use for the current definition
+    /// (Used to set it after the Define command)
+    void SetCurrentFileName (const std::string &name );
+    
     /// End the definition of a ComplexBlackBox
     void EndDefine ();
 
index dfea3e8..f46dfe0 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkInterpreter.cxx,v $ $
   Language:  C++
-  Date:      $Date: 2008/02/06 09:27:52 $
-  Version:   $Revision: 1.26 $
+  Date:      $Date: 2008/02/06 09:32:25 $
+  Version:   $Revision: 1.27 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -225,7 +225,7 @@ Interpreter* Interpreter::mGlobalInterpreter = NULL;
     info.argmax = 2;
     info.code = cInclude;
     info.syntax = "include <filename> [source]";
-    info.help = "Includes the file <filename>.\n Advanced (used to get the right 'Include' field in doc of packages appli) : If the keyword 'source' is provided then informs bbi that the included file is the source of the current box definition.";
+    info.help = "Includes the file <filename>.\n  'source' : If the keyword 'source' is provided then informs bbi that the included file is the source of the current box definition (Advanced; used to get the right 'Include' field in html doc of packages 'appli' scripts).";
     mCommandDict[info.category] = info;
 
     info.category = "quit";
index 505bb54..66caed7 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkInterpreter.h,v $ $
   Language:  C++
-  Date:      $Date: 2008/02/05 12:16:55 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2008/02/06 09:27:52 $
+  Version:   $Revision: 1.10 $
 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -169,7 +169,10 @@ namespace bbtk
 
   private:
 
-  void LoadScript( std::string fullPathScriptName);
+    /// Opens the file fullPathScriptName 
+    /// includeScriptName is the name as given to the include command 
+    void LoadScript( std::string fullPathScriptName,
+                    std::string includeScriptName);
 
   private:
 
@@ -182,12 +185,15 @@ namespace bbtk
     /// The command executer
     bbtk::VirtualExec* mExecuter;
 
-    /// Vector of opened files 
+    /// Vector of open files 
     std::vector<std::ifstream*> mFile;
 
-    /// Vector of names of open files
+    /// Vector of names of open files with full path (as open)
     std::vector<std::string> mFileName;
 
+    /// Vector of names of open files as given to the include command
+    std::vector<std::string> mIncludeFileName;
+
     /// Stores the current line number in each open file
     std::vector<int> mLine;
 
index f7c2295..96a264b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkVirtualExec.h,v $ $
   Language:  C++
-  Date:      $Date: 2008/02/05 12:16:56 $
-  Version:   $Revision: 1.6 $
+  Date:      $Date: 2008/02/06 09:27:52 $
+  Version:   $Revision: 1.7 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -71,6 +71,10 @@ namespace bbtk
     virtual void Define (const std::string &name,
                 const std::string& pack,
                 const std::string &scriptfilename) = 0;
+ 
+    /// Sets the file name to use for the current definition
+    /// (Used to set it after the Define command)
+    virtual void SetCurrentFileName (const std::string &name ) = 0;
 
     /// End the definition of a ComplexBlackBox
     virtual void EndDefine () = 0;