Program: bbtk
Module: $RCSfile: bbtkInterpreter.h,v $ $
Language: C++
- Date: $Date: 2008/02/04 13:02:58 $
- Version: $Revision: 1.7 $
+ 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
cConfig, // JPR
cReset, // EED
cAuthor,
- cKeyword, // JPR
+ cCategory, // JPR
cDescription,
cHelp,
cMessage,
/// The structure storing the informations on a command
typedef struct
{
- std::string keyword;
+ std::string category;
int argmin, argmax;
CommandCodeType code;
std::string syntax;
void SetDialogMode(DialogModeType t) { mExecuter->SetDialogMode(t); }
/// Runs the interpretation of a file
- void InterpretFile( const std::string& filename, bool use_configuration_file=true, bool verbose=false);
+ void InterpretFile( const std::string& filename,
+ bool use_configuration_file=true);
/// Interprets a line (either from a file or typed interactively)
void InterpretLine( const std::string& line, bool &insideComment );
CommandInfoType& info );
/// Switch to the interpretation of a file
- void SwitchToFile( const std::string& filename, bool use_configuration_file=true, bool verbose=false );
+ void SwitchToFile( const std::string& filename,
+ bool use_configuration_file=true);
/// Closes the currently open file
void CloseCurrentFile();
void Graph(const std::vector<std::string>& words);
///
- void Config(bool verbose) const; // JPR
+ void Config() const;
///
void Print(const std::string&);
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:
/// 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;
/// The history of commands
std::deque< char* > mHistory;
- bool verbose; // true -> displays the search results (for packages)
};