X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkInterpreter.h;h=0cd00f3fc237960b3a2628ac6ea39704a1273d99;hb=6acada1443d66ee0de5825c90b92449a64320870;hp=851a8aae3b72b38bfcd5073f5399dc3192505fac;hpb=9244821a79f4853a78564d37b993b48d4b2ad4e9;p=bbtk.git diff --git a/kernel/src/bbtkInterpreter.h b/kernel/src/bbtkInterpreter.h index 851a8aa..0cd00f3 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 08:25:22 $ - Version: $Revision: 1.8 $ + Date: $Date: 2008/02/12 12:55:16 $ + Version: $Revision: 1.11 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -36,6 +36,8 @@ namespace bbtk { + + class BBTK_EXPORT Interpreter { @@ -58,7 +60,7 @@ namespace bbtk cConfig, // JPR cReset, // EED cAuthor, - cKeyword, // JPR + cCategory, // JPR cDescription, cHelp, cMessage, @@ -75,7 +77,7 @@ namespace bbtk /// The structure storing the informations on a command typedef struct { - std::string keyword; + std::string category; int argmin, argmax; CommandCodeType code; std::string syntax; @@ -167,9 +169,13 @@ namespace bbtk /// Sets the bool that indicates wether we are in command line context void SetCommandLine(bool v = true) { mCommandLine = v; } + 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 +188,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;