]> 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 1875260eb281edc4bf5136895d27c966629a4ae0..7927988f3e61392b44c9db0b7bb9bd0f7acccb8f 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 df133c086084603159c4d239dd1036d8636d730a..383583fa222fcd8de2cd2aab2ed9527b95c931b2 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 d6d3a408b31c2fc9a55031647ce3ae51621051fe..15f88d85d48c73f75376635e9d07553843338b7e 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 8348d062a47182452edb6871997a98b50749de8d..00a5551123d5100e99f4193beeeaebfc4e83a339 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 3415e5b0eaf7d444ec500caae1d95b0d9f483019..bcd8b246ae8197d3c0de782a36039614bad3366b 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 dfea3e87dbc8487d9aeb4777f83d1a99bdfa0af5..f46dfe020106364527d225da512e04e2ce0f2db5 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 505bb547faa2d708073af23a87e875f81bc15f5e..66caed7ba5e2a90aa15234347954d4cdfd807c23 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 f7c2295446c7fae4f3a556d762f72e6fea3f23fc..96a264b55a8f3fbd0231ae163dcb5be5254f885b 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;