Program: bbtk
Module: $RCSfile: bbtkWxGUIScriptingInterface.cxx,v $
Language: C++
- Date: $Date: 2008/03/25 15:47:54 $
- Version: $Revision: 1.4 $
+ Date: $Date: 2008/04/18 12:59:16 $
+ Version: $Revision: 1.5 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// m_mgr = new wxAuiManager(this);
m_mgr.SetManagedWindow(this);
- mInterpreter = new bbtk::Interpreter();
+ mInterpreter = bbtk::Interpreter::New();
mInterpreter->SetUser(this);
mInterpreter->SetCommandLine(true);
mInterpreter->SetThrow(true);
//================================================================
void WxGUIScriptingInterface::OnMenuCreatePackage(wxCommandEvent& WXUNUSED(event))
{
-printf("EED WxGUIScriptingInterface::OnMenuCreatePackage 01 \n");
- std::string command("toolsbbtk/appli/CreatePackage");
-printf("EED WxGUIScriptingInterface::OnMenuCreatePackage 02 \n");
+ std::string command("toolsbbtk/appli/CreatePackage");
bbtkMessage("Debug",1,"Executing : '"<<command<<"'"<<std::endl);
-printf("EED WxGUIScriptingInterface::OnMenuCreatePackage 03 \n");
- Interpreter* I = new Interpreter;
-printf("EED WxGUIScriptingInterface::OnMenuCreatePackage 04 \n");
+
+ Interpreter::Pointer I = Interpreter::New();
I->InterpretFile(command);
-printf("EED WxGUIScriptingInterface::OnMenuCreatePackage 05 \n");
- delete I;
-printf("EED WxGUIScriptingInterface::OnMenuCreatePackage 06 \n");
+
}
//================================================================
{
std::string command("toolsbbtk/appli/CreateBlackBox");
bbtkMessage("Debug",1,"Executing : '"<<command<<"'"<<std::endl);
- Interpreter* I = new Interpreter;
+
+ Interpreter::Pointer I = Interpreter::New();
I->InterpretFile(command);
- delete I;
}
//================================================================
{
std::string doc_path = ConfigurationFile::GetInstance().Get_doc_path();
std::string filepath = doc_path+"/bbdoc/make-index.bbs";
- Interpreter* I = new Interpreter;
-//EED std::cout << "bbi: include "<<filepath<<std::endl;
-//EED I->InterpretFile( filepath );
+ Interpreter::Pointer I = Interpreter::New();
I->InterpretLine( "exec freeze");
I->InterpretLine( "include *");
I->InterpretLine( "index "+doc_path+"/bbdoc/index-category.html Categories");
I->InterpretLine( "index "+doc_path+"/bbdoc/index-adaptors.html Adaptors");
- delete I;
}
//================================================================