From aefd641287e852b80d22c3cddd8b2025f12cb1d6 Mon Sep 17 00:00:00 2001 From: guigues Date: Wed, 6 Feb 2008 09:27:52 +0000 Subject: [PATCH] *** empty log message *** --- kernel/cmake/BBTKCreatePackageBBdoc.cmake | 5 +---- .../cmake/BBTKCreatePackageIncludeScript.cmake | 2 +- kernel/src/bbtkBlackBoxDescriptor.cxx | 8 ++++++-- kernel/src/bbtkExecuter.cxx | 12 ++++++++++-- kernel/src/bbtkExecuter.h | 8 ++++++-- kernel/src/bbtkInterpreter.cxx | 6 +++--- kernel/src/bbtkInterpreter.h | 16 +++++++++++----- kernel/src/bbtkVirtualExec.h | 8 ++++++-- 8 files changed, 44 insertions(+), 21 deletions(-) diff --git a/kernel/cmake/BBTKCreatePackageBBdoc.cmake b/kernel/cmake/BBTKCreatePackageBBdoc.cmake index 1875260..7927988 100644 --- a/kernel/cmake/BBTKCreatePackageBBdoc.cmake +++ b/kernel/cmake/BBTKCreatePackageBBdoc.cmake @@ -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} diff --git a/kernel/cmake/BBTKCreatePackageIncludeScript.cmake b/kernel/cmake/BBTKCreatePackageIncludeScript.cmake index df133c0..383583f 100644 --- a/kernel/cmake/BBTKCreatePackageIncludeScript.cmake +++ b/kernel/cmake/BBTKCreatePackageIncludeScript.cmake @@ -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( diff --git a/kernel/src/bbtkBlackBoxDescriptor.cxx b/kernel/src/bbtkBlackBoxDescriptor.cxx index d6d3a40..15f88d8 100644 --- a/kernel/src/bbtkBlackBoxDescriptor.cxx +++ b/kernel/src/bbtkBlackBoxDescriptor.cxx @@ -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 << "\n"; (s) << " Author(s) : " << author << "\n"; + (s) << " Category(s) : " + << category << "\n"; + (s) << " Include : " + << GetPackage()->GetName() << "\n"; (s) << "\n"; //------------- diff --git a/kernel/src/bbtkExecuter.cxx b/kernel/src/bbtkExecuter.cxx index 8348d06..00a5551 100644 --- a/kernel/src/bbtkExecuter.cxx +++ b/kernel/src/bbtkExecuter.cxx @@ -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(\"" diff --git a/kernel/src/bbtkExecuter.h b/kernel/src/bbtkExecuter.h index 3415e5b..bcd8b24 100644 --- a/kernel/src/bbtkExecuter.h +++ b/kernel/src/bbtkExecuter.h @@ -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 (); diff --git a/kernel/src/bbtkInterpreter.cxx b/kernel/src/bbtkInterpreter.cxx index dfea3e8..f46dfe0 100644 --- a/kernel/src/bbtkInterpreter.cxx +++ b/kernel/src/bbtkInterpreter.cxx @@ -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 [source]"; - info.help = "Includes the file .\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 .\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"; diff --git a/kernel/src/bbtkInterpreter.h b/kernel/src/bbtkInterpreter.h index 505bb54..66caed7 100644 --- a/kernel/src/bbtkInterpreter.h +++ b/kernel/src/bbtkInterpreter.h @@ -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 mFile; - /// Vector of names of open files + /// Vector of names of open files with full path (as open) std::vector mFileName; + /// Vector of names of open files as given to the include command + std::vector mIncludeFileName; + /// Stores the current line number in each open file std::vector mLine; diff --git a/kernel/src/bbtkVirtualExec.h b/kernel/src/bbtkVirtualExec.h index f7c2295..96a264b 100644 --- a/kernel/src/bbtkVirtualExec.h +++ b/kernel/src/bbtkVirtualExec.h @@ -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; -- 2.45.1