Program: bbtk
Module: $RCSfile: bbtkExecuter.cxx,v $
Language: C++
- Date: $Date: 2008/10/17 08:18:13 $
- Version: $Revision: 1.23 $
+ Date: $Date: 2009/03/30 14:42:16 $
+ Version: $Revision: 1.28 $
=========================================================================*/
/* ---------------------------------------------------------------------
#include "bbtkUtilities.h"
#include <fstream>
-#ifdef _USE_WXWIDGETS_
+#ifdef USE_WXWIDGETS
#include <wx/textdlg.h>
#endif
mRootPackage(),
mRootCBB(),
mNoExecMode(false),
- mDialogMode(NoDialog)
+ mDialogMode(NoDialog),
+ mNoErrorMode(false)
{
bbtkDebugMessageInc("Kernel",9,"Executer::Executer()" <<std::endl);
mFactory = Factory::New();
// Create user package
Package::Pointer p =
- Package::New("user","internal",
- "User defined black boxes",
- "",
- BBTK_STRINGIFY_SYMBOL(BBTK_VERSION));
+ Package::New("user","internal","User defined black boxes","");
// Insert the user package in the factory
GetFactory()->InsertPackage(p);
// And in the list of open packages
}
//=======================================================================
+
//=======================================================================
/// changes the workspace name
void Executer::SetWorkspaceName( const std::string& n )
}
catch (Exception e)
{
- p = Package::New(name,
- "",
- "",
- "",
- BBTK_STRINGIFY_SYMBOL(BBTK_VERSION));
+ p = Package::New(name,"","","");
GetFactory()->InsertPackage(p);
}
mOpenPackage.push_back(p);
}
//=======================================================================
+ //=======================================================================
+ void Executer::Clear()
+ {
+ bbtkDebugMessageInc("Kernel",9,"Executer::Clear()" <<std::endl);
+ GetCurrentDescriptor()->GetPrototype()->Clear();
+
+ }
+ //=======================================================================
+
//=======================================================================
void Executer::EndDefine ()
{
}
catch (Exception e)
{
- p = Package::New(pname,
- "",
- "",
- "",
- BBTK_STRINGIFY_SYMBOL(BBTK_VERSION));
+ p = Package::New(pname,"","","");
GetFactory()->InsertPackage(p);
}
}
std::cin >> ans;
Set(box,input,ans);
}
-#ifdef _USE_WXWIDGETS_
+#ifdef USE_WXWIDGETS
// If the dialog mode is set to GraphicalDialog
// A dialog box is pop up
else if (mDialogMode == GraphicalDialog)
BlackBox::Pointer b = GetCurrentDescriptor()->GetPrototype()->bbGetBlackBox(box);
// Looks for the adaptor
- if ( b->bbGetInputType(input) != typeid(std::string) )
+ if ( ( b->bbGetInputType(input) != typeid(bbtk::any<bbtk::thing>) )&&
+ ( b->bbGetInputType(input) != typeid(std::string) ) )
{
BlackBox::Pointer a =
GetFactory()->NewAdaptor(typeid(std::string),