Program: bbtk
Module: $RCSfile: bbtkInterpreter.cxx,v $ $
Language: C++
- Date: $Date: 2008/02/21 07:30:20 $
- Version: $Revision: 1.36 $
+ Date: $Date: 2008/03/03 08:06:36 $
+ Version: $Revision: 1.37 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
/**
*
*/
- void Interpreter::InterpretFile( const std::string& filename,
- bool use_configuration_file)
+ void Interpreter::InterpretFile( const std::string& filename )
{
bbtkDebugMessageInc("Interpreter",9,"Interpreter::InterpretFile(\""<<filename<<"\")"<<std::endl);
try
{
- SwitchToFile(filename, use_configuration_file);
+ SwitchToFile(filename);
bool insideComment = false; // for multiline comment
while (mFile.size()>0)
{
case cInclude :
if (mCommandLine)
{
- InterpretFile(words[1], true ); // true : better pass use_config_file
+ InterpretFile(words[1]);
}
else
{
- SwitchToFile(words[1], true ); // true : better pass use_config_file
+ SwitchToFile(words[1]);
}
// if 'source' was given
if (words.size()==3)
break;
case cLoad:
- LoadPackage(words[1], true ); // true : better pass use_config_file
+ LoadPackage(words[1]);
break;
case cUnload:
// ===================================================================================
- void Interpreter::SwitchToFile( const std::string& name,
- bool use_configuration_file )
+ void Interpreter::SwitchToFile( const std::string& name )
{
// Note : in the following :
// name : the user supplied name
std::string pkgname; // e.g. <scriptname>.bbs
std::vector<std::string> Filenames;
- if (use_configuration_file)
- {
- // The following is *NOT* a debug time message :
- // It's a user intended message.
- // Please don't remove it.
- bbtkMessage("Interpreter",1,
- "look for : [" << name
- << "] (use_configuration_file == TRUE)" << std::endl);
- script_paths = ConfigurationFile::GetInstance().Get_bbs_paths();
- }
+ // The following is *NOT* a debug time message :
+ // It's a user intended message.
+ // Please don't remove it.
+ bbtkMessage("Interpreter",1,
+ "look for : [" << name
+ << "]" << std::endl);
+ script_paths = ConfigurationFile::GetInstance().Get_bbs_paths();
+
std::string upath;
pkgname = Utilities::ExtractScriptName(name,upath);