SUBDIRS(bbed)
SUBDIRS(bbhelp)
+
+SUBDIRS(bbs2cpp)
+
+SUBDIRS(bbc)
--- /dev/null
+# Relative path to the data used by bbc from data root folder
+SET(bbc_DATA_REL_PATH_FROM_DATA kernel/bbc)
+# Relative path to the data used by bbc from bin folder
+SET(bbc_DATA_REL_PATH_FROM_BIN ../${BBTK_DATA_REL_PATH}/${bbc_DATA_REL_PATH_FROM_DATA})
+
+IF(UNIX)
+ # Build tree
+ CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/main.cxx.in
+ ${BBTK_DATA_BUILD_PATH}/${bbc_DATA_REL_PATH_FROM_DATA}/main.cxx.in
+ COPYONLY
+ )
+ CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt.in
+ ${BBTK_DATA_BUILD_PATH}/${bbc_DATA_REL_PATH_FROM_DATA}/CMakeLists.txt.in
+ COPYONLY
+ )
+ CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/bbc.sh.in
+ ${BBTK_BINARY_DIR}/bin/bbc
+ @ONLY IMMEDIATE
+ )
+ # Install tree
+ INSTALL(
+ FILES ${CMAKE_CURRENT_SOURCE_DIR}/main.cxx.in ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt.in
+ DESTINATION ${BBTK_DATA_INSTALL_PATH}/${bbc_DATA_REL_PATH_FROM_DATA}
+ )
+ INSTALL(
+ PROGRAMS ${BBTK_BINARY_DIR}/bin/bbc
+ DESTINATION bin
+ )
+
+ELSE(UNIX)
+ # TO DO : bat for win
+ENDIF(UNIX)
--- /dev/null
+
+#-----------------------------------------------------------------------------
+# Search for bbtk
+FIND_PACKAGE(BBTK)
+# If found
+IF(BBTK_FOUND)
+ # Include USE_FILE which configures the use of the lib
+ INCLUDE(${BBTK_USE_FILE})
+ENDIF(BBTK_FOUND)
+#-----------------------------------------------------------------------------
+
+#-----------------------------------------------------------------------------
+# Build the program
+# Usual add executable
+ADD_EXECUTABLE(OUTPUT main)
+# Link against the testLib libraries
+TARGET_LINK_LIBRARIES(OUTPUT ${BBTK_LIBRARIES})
+#-----------------------------------------------------------------------------
--- /dev/null
+#!/bin/bash
+# compiles bbs files
+
+source ~/.bashrc
+
+if [ $# -lt 1 ]
+ then
+ echo "usage : bbc <input bbs file>"
+ exit
+fi
+
+#
+CUR=${PWD}
+
+# bbc bin path
+TMP=$(which $0|rev)
+BINPATH=$(echo ${TMP#*/}|rev)
+# data path
+DATADIR=${BINPATH}/@bbc_DATA_REL_PATH_FROM_BIN@
+
+# extract bbs file name
+IN=$1
+TMP="${IN##*/}"
+OUTPUT="${TMP%%.*}"
+echo Output=\"${OUTPUT}\"
+
+WORKDIR=bbc_tmp
+mkdir ${WORKDIR}
+
+sed s,OUTPUT,${OUTPUT},g ${DATADIR}/CMakeLists.txt.in > ${WORKDIR}/CMakeLists.txt
+sed s,EXEC_FUNCTION,${OUTPUT},g ${DATADIR}/main.cxx.in > ${WORKDIR}/main.cxx
+cd ${WORKDIR}
+bbs2cpp ${IN}
+cmake .
+cmake .
+cmake .
+make
+mv ${OUTPUT} ${CUR}/
+cd ${CUR}
+rm -Rf ${WORKDIR}
+
--- /dev/null
+#ifdef _USE_WXWIDGETS_
+
+//==========================================================================
+// WITH WX
+//==========================================================================
+#include "bbtkInterpreter.h"
+#include "bbtkWxBlackBox.h"
+#include "bbtkWxGUIConsole.h"
+
+#include <wx/cmdline.h>
+#include <vector>
+#include <map>
+
+#include "EXEC_FUNCTION.h"
+
+static const wxCmdLineEntryDesc cmdLineDesc[] =
+{
+ { wxCMD_LINE_SWITCH, _T("d"), _T("debug"), _T("Debug messages on (message All 9)") },
+ { wxCMD_LINE_SWITCH, _T("q"), _T("quiet"), _T("be quiet") },
+ { wxCMD_LINE_SWITCH, _T("h"), _T("help"), _T("print help") },
+ { wxCMD_LINE_SWITCH, _T("g"), _T("graphical-dialog"), _T("prompts the user for the parameters values using dialog boxes") },
+ { wxCMD_LINE_SWITCH, _T("t"), _T("text-dialog"), _T("prompts the user for the parameters values in text mode") },
+ { wxCMD_LINE_PARAM, NULL, NULL, _T("Input=Value"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_PARAM_MULTIPLE },
+ { wxCMD_LINE_NONE }
+};
+
+
+
+class wxBBIApp : public wxApp
+{
+public:
+ bool OnInit( );
+ int OnExit() { delete mExecuter; return true; }
+ void OnInitCmdLine(wxCmdLineParser& parser);
+ bool OnCmdLineParsed(wxCmdLineParser& parser);
+ void Run(bbtk::Interpreter*);
+
+ bbtk::Executer* mExecuter;
+ // int argc;
+ // std::vector<std::string> argv;
+ bool command;
+ bool debug;
+ bool quiet;
+ bool help;
+ bool graphical_dialog;
+ bool text_dialog;
+
+ std::map<std::string,std::string> param_map;
+
+};
+
+IMPLEMENT_APP(wxBBIApp);
+
+void wxBBIApp::OnInitCmdLine(wxCmdLineParser& parser)
+{
+ parser.SetDesc(cmdLineDesc);
+}
+
+bool wxBBIApp::OnCmdLineParsed(wxCmdLineParser& parser)
+{
+ debug = ( parser.Found(_T("d")) );
+ quiet = ( parser.Found(_T("q")) );
+ help = ( parser.Found(_T("h")) );
+ graphical_dialog = ( parser.Found(_T("g")) );
+ text_dialog = ( parser.Found(_T("t")) );
+
+ // parse the arguments and consider those which contain a "="
+ // as set input commands
+ int argc = parser.GetParamCount();
+ for (int i=0; i<argc; ++i)
+ {
+ std::string s = bbtk::wx2std(parser.GetParam(i));
+ std::string::size_type pos = s.find_first_of("=");
+ if (std::string::npos != pos)
+ {
+ std::string left = s.substr(0,pos);
+ std::string right = s.substr(pos+1,s.size());
+ param_map[left]=right;
+ }
+ else
+ {
+ std::cout << "'" << s << "' option unrecognized : ignored"<<std::endl;
+ }
+ }
+
+ if (help) {
+ std::cout << bbtk::wx2std(parser.GetParam(0)) << std::endl;
+ parser.Usage();
+ }
+
+ return true;
+}
+
+
+
+// ----------------------------------------------------------------------------
+// The `main program' equivalent, creating the windows and returning the
+// main frame
+bool wxBBIApp::OnInit( )
+{
+ // std::cout << "OnInit"<<std::endl;
+ wxApp::OnInit();
+#ifdef __WXGTK__
+ //See http://www.wxwindows.org/faqgtk.htm#locale
+ setlocale(LC_NUMERIC, "C");
+#endif
+
+ if (quiet) bbtk::MessageManager::SetMessageLevel("All",0);
+ if (debug) bbtk::MessageManager::SetMessageLevel("All",9);
+
+ bbtk::Wx::CreateInvisibleTopWindow();
+
+ try {
+ mExecuter = new bbtk::Executer();
+ mExecuter->SetInputs(param_map);
+
+ if (help) mExecuter->SetNoExecMode(true);
+
+ if (graphical_dialog) mExecuter->SetDialogMode(bbtk::VirtualExec::GraphicalDialog);
+ if (text_dialog) mExecuter->SetDialogMode(bbtk::VirtualExec::TextDialog);
+
+ EXEC_FUNCTION(mExecuter);
+
+ mExecuter->SetNoExecMode(false);
+
+ if (help)
+ {
+ std::string package;
+ mExecuter->GetFactory()->HelpBlackBox("workspace",package,false);
+ }
+ }
+ catch (bbtk::Exception e)
+ {
+ wxString mess;
+ mess += bbtk::std2wx ( e.GetMessage() );
+ wxMessageBox(mess,_T("Error"),wxOK | wxICON_ERROR);
+ bbtk::Wx::GetTopWindow()->Close();
+ delete mExecuter;
+ return false;
+ }
+ if (help || !bbtk::Wx::IsSomeWindowAlive())
+ {
+ return false;
+ }
+ return true;
+}
+
+
+#if defined(_WIN32)
+
+// How to have a Console and wxWidgets
+// http://www.wxwidgets.org/wiki/index.php/MSVC_Setup_Guide
+// In Visual C++ 6 (7 should be similar), to create an application that is both a console application
+// (cout's to the console are visible) and has a wxWidgets GUI,
+// you need to use the linker option "/subsystem:console" and the following code:
+int main(int argc, char* argv[])
+{
+ return WinMain(::GetModuleHandle(NULL), NULL, ::GetCommandLine(),
+ SW_SHOWNORMAL);
+}
+
+#endif // defined(_WIN32)
+
+
+#else
+//==========================================================================
+// WITHOUT WX
+//==========================================================================
+
+#include "bbtkInterpreter.h"
+
+int main(int argc, char* argv[])
+{
+
+ if (argc>2) return 0;
+
+ std::cout << "BBI (Black Box Interpreter) - bbtk "
+ << bbtk::GetVersion()<< " - (c) Creatis 2007"
+ <<std::endl;
+
+ bbtk::Interpreter I;
+ if (argc==1)
+ {
+ I.CommandLineInterpreter();
+ }
+ else
+ {
+ std::string f(argv[1]);
+ I.InterpretFile(f);
+ }
+
+ return 0;
+
+}
+
+// EOF
+#endif //#ifdef _USE_WXWIDGETS_
+
+
+
bool help_on_script = help && (input_file.size() > 0);
if (help_on_script) I->SetNoExecMode(true);
- if (graphical_dialog) I->SetDialogMode(bbtk::Executer::GraphicalDialog);
- if (text_dialog) I->SetDialogMode(bbtk::Executer::TextDialog);
+ if (graphical_dialog) I->SetDialogMode(bbtk::VirtualExec::GraphicalDialog);
+ if (text_dialog) I->SetDialogMode(bbtk::VirtualExec::TextDialog);
std::vector<std::string>::const_iterator i;
bool error = false;
--- /dev/null
+
+SET(SOURCES bbs2cpp )
+SET(EXENAME bbs2cpp )
+
+IF(BBTK_USE_WXWIDGETS AND WIN32)
+ ADD_EXECUTABLE(${EXENAME} WIN32 ${SOURCES})
+# SET_TARGET_PROPERTIES(bbhelp PROPERTIES LINK_FLAGS /subsystem:console )
+ELSE(BBTK_USE_WXWIDGETS AND WIN32)
+ ADD_EXECUTABLE(${EXENAME} ${SOURCES})
+ENDIF(BBTK_USE_WXWIDGETS AND WIN32)
+
+
+TARGET_LINK_LIBRARIES(${EXENAME} bbtk)
+INSTALL_TARGETS(/bin/ ${EXENAME})
--- /dev/null
+#include "bbtkInterpreter.h"
+#include "bbtkUtilities.h"
+
+int main(int argc, char* argv[])
+{
+ if (argc<2) return 1;
+
+ std::string file,path;
+ file = bbtk::Utilities::ExtractScriptName(argv[1],path);
+ file += ".h";
+ bbtk::Interpreter* I = new bbtk::Interpreter(file);
+
+ I->SetThrow(true);
+
+ try
+ {
+ I->InterpretFile(argv[1]);
+ }
+ catch (bbtk::Exception e)
+ {
+ e.Print();
+ }
+
+ delete I;
+
+ return 0;
+}
+
+// EOF
+
Program: bbtk
Module: $RCSfile: bbtkInterpreter.cxx,v $ $
Language: C++
- Date: $Date: 2008/03/26 08:51:43 $
- Version: $Revision: 1.56 $
+ Date: $Date: 2008/03/26 14:47:36 $
+ Version: $Revision: 1.57 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
*/
#include "bbtkInterpreter.h"
+#include "bbtkExecuter.h"
+#include "bbtkTranscriptor.h"
#include "bbtkMessageManager.h"
#include "bbtkConfigurationFile.h"
#include "bbtkUtilities.h"
/**
*
*/
- Interpreter::Interpreter()
+ Interpreter::Interpreter(const std::string& cpp_file)
:
mUser(0),
mCommandLine(false),
bbtk::MessageManager::RegisterMessageType("Interpreter","Messages of the interpreter",0);
bbtkDebugMessageInc("Interpreter",9,"Interpreter::Interpreter()" <<std::endl);
- mExecuter = new bbtk::Executer();
+ if (cpp_file.size()!=0)
+ {
+ mExecuter = new bbtk::Transcriptor(cpp_file);
+ }
+ else
+ {
+ mExecuter = new bbtk::Executer();
+ }
mExecuter->SetInterpreter(this);
// For the time being, comment out previous line, and
}
else
{
- bbtkError("'"<<upath<<"' : not a valid folder");
+ bbtkError("'"<<upath<<"' : directory does not exist");
}
}
// ==== relative path provided : search all bbs path appended with
script_paths.push_back(full_path);
}
}
+ if (script_paths.empty())
+ {
+ bbtkError("no '"<<upath<<"' subdir found in search paths"
+ << std::endl);
+ }
+
}
// === search paths list complete : now explore it
- if (script_paths.empty())
- {
- bbtkMessage("Interpreter",1,
- "'"<<upath<<"' : No matching folder" << std::endl);
- }
std::vector<std::string>::iterator i;
Program: bbtk
Module: $RCSfile: bbtkInterpreter.h,v $ $
Language: C++
- Date: $Date: 2008/03/26 08:27:19 $
- Version: $Revision: 1.22 $
+ Date: $Date: 2008/03/26 14:47:36 $
+ Version: $Revision: 1.23 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#define __bbtkInterpreter_h__
#include "bbtkVirtualExec.h"
-#include "bbtkExecuter.h"
-#include "bbtkTranscriptor.h"
#include <fstream>
#include <deque>
public:
/// Constructor
- Interpreter();
+ Interpreter(const std::string& cpp_file = "");
/// Destructor
~Interpreter();
//typedef Executer::DialogModeType DialogModeType;
typedef VirtualExec::DialogModeType DialogModeType;
- void SetDialogMode(DialogModeType t) { mExecuter->SetDialogMode(t); }
+ void SetDialogMode(DialogModeType t) { mExecuter->SetDialogMode(t); }
/// Sets the bool that indicates wether we are in command line context
void SetCommandLine(bool v = true) { mCommandLine = v; }
void SetThrow(bool b) { mThrow = b; }
-
-
#ifdef _USE_WXWIDGETS_
/// Sets the user of the interpreter (if any)
void SetUser(InterpreterUser* c) { mUser = c; }
Program: bbtk
Module: $RCSfile: bbtkTranscriptor.cxx,v $ $
Language: C++
- Date: $Date: 2008/03/26 08:27:19 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2008/03/26 14:47:36 $
+ Version: $Revision: 1.9 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
*
*/
Transcriptor::Transcriptor(std::string filename)
- : mPackage(0),
- mRoot(0),
+ :
mNoExecMode(false),
mDialogMode(NoDialog)
{
//VirtualExec();
bbtkDebugMessageInc("Kernel",9,"Transcriptor::Transcriptor()" <<std::endl);
- Reset();
- bbtkDebugDecTab("Kernel",9);
-
- //std::ofstream *m_Fp = new std::ofstream();
+
+ //std::ofstream *m_Fp = new std::ofstream();
m_Fp.open (filename.c_str(), std::ios::out );
- m_Fp << "#include \"bbtkExecuter.h\"" << std::endl;
+ std::string file,path;
+ file = bbtk::Utilities::ExtractScriptName(filename,path);
+
+ m_Fp << "#include \"bbtkExecuter.h\"" << std::endl;
+ m_Fp << "void " << file << "(bbtk::Executer* e)"<<std::endl;
+ m_Fp << "{"<<std::endl;
+
+ /*
+#ifdef _USE_WXWIDGETS_
+ m_Fp << "#ifdef _USE_WXWIDGETS_"<<std::endl;
+ m_Fp << "#include \"bbtkWx.h\""<< std::endl<<std::endl;
+ m_Fp << "class myApp : public wxApp"<<std::endl;
+ m_Fp << "{"<<std::endl;
+ m_Fp << "public:"<<std::endl;
+ m_Fp << " bool OnInit( );"<<std::endl;
+ m_Fp << " int OnExit() { delete e; return true; }"<<std::endl;
+ m_Fp << " bbtk::Executer* e;"<<std::endl;
+ m_Fp << "};"<<std::endl<<std::endl;
+ m_Fp << "IMPLEMENT_APP(myApp);"<<std::endl<<std::endl;
+ m_Fp << "bool myApp::OnInit( )"<<std::endl;
+ m_Fp << "{"<<std::endl;
+ m_Fp << " wxApp::OnInit();"<<std::endl;
+ m_Fp << "#ifdef __WXGTK__"<<std::endl;
+ m_Fp << " //See http://www.wxwindows.org/faqgtk.htm#locale"<<std::endl;
+ m_Fp << " setlocale(LC_NUMERIC, \"C\");"<<std::endl;
+ m_Fp << "#endif"<<std::endl;
+ m_Fp << " wxInitAllImageHandlers();"<<std::endl;
+ m_Fp << " bbtk::Wx::CreateInvisibleTopWindow();"<<std::endl;
+ m_Fp << " try {"<<std::endl;
+ m_Fp << " e = new bbtk::Executer();"<<std::endl;
+#else
m_Fp << "main(int argc, char *argv[]) {" << std::endl;
m_Fp << " bbtk::Executer *e = new bbtk::Executer();" << std::endl;
- }
+#endif
+ */
+ bbtkDebugDecTab("Kernel",9);
+ }
/**
*
Transcriptor::~Transcriptor()
{
-std::cout << "====================================================== delete Transcriptor\n";
- bbtkDebugMessageInc("Kernel",9,"Transcriptor::~Transcriptor()" <<std::endl);
- if (mRoot)
- {
- mPackage->UnRegisterBlackBox("workspace");
- delete mRoot;
- }
- if (mPackage)
- {
- //GetGlobalFactory()->UnLoadPackage("user");
- }
-
- if(m_Fp)
- {
- bbtkDebugDecTab("Kernel",9);
- m_Fp << " }" << std::endl;
- m_Fp.close();
- // delete m_Fp;
- }
- }
+ bbtkDebugMessageInc("Kernel",9,"Transcriptor::~Transcriptor()" <<std::endl);
+ /*
+#ifdef _USE_WXWIDGETS_
+ m_Fp << " }"<<std::endl;
+ m_Fp << " catch (bbtk::Exception err)"<<std::endl;
+ m_Fp << " {"<<std::endl;
+ m_Fp << " err.Print();"<<std::endl;
+ m_Fp << " } "<<std::endl;
+ m_Fp << " return true;"<<std::endl;
+ m_Fp << "}" << std::endl;
+ m_Fp << "#endif"<<std::endl;
+#else
+ m_Fp << "}" << std::endl;
+#endif
+ */
+ m_Fp << "}" << std::endl;
+ m_Fp.close();
+ bbtkDebugDecTab("Kernel",9);
+ }
+
- // ================= Begin of Battlefield =============================
void Transcriptor::Reset()
{
m_Fp << " e->Reset( );" << std::endl;
void Transcriptor::Create ( const std::string& nodeType,
const std::string& nodeName)
{
- m_Fp << " e->Add(\"" << nodeType << "\", \""
+ m_Fp << " e->Create(\"" << nodeType << "\", \""
<< nodeName << "\");" << std::endl;
}
const std::string& help)
{
- m_Fp << " e->DefineInput(\""<< name << "\", " << box << ", "
- << input << ", \"" << help << "\");" << std::endl;
+ m_Fp << " e->DefineInput(\""<< name << "\", \"" << box << "\", \""
+ << input << "\", \"" << help << "\");" << std::endl;
}
void Transcriptor::Author(const std::string &authorName)
{
- m_Fp << " e->AddToAuthor(\"" << authorName << "\")" << std::endl;
+ m_Fp << " e->Author(\"" << authorName << "\");" << std::endl;
}
void Transcriptor::Category(const std::string &category)
{
- m_Fp << " e->AddToCategory(\"" << category << "\")" << std::endl;
+ m_Fp << " e->Category(\"" << category << "\");" << std::endl;
}
void Transcriptor::Description(const std::string &d)
{
- m_Fp << " e->AddToDescription(\"" << d << "\")" << std::endl;
+ m_Fp << " e->Description(\"" << d << "\");" << std::endl;
}
/// prints the list of the boxes of the current descriptor
void Transcriptor::PrintBoxes()
{
- m_Fp << " e->PrintBoxes( )" << std::endl;
+ m_Fp << " e->PrintBoxes( );" << std::endl;
}
-// =========================End of Battlefield ========================================================================
-
std::string Transcriptor::ShowGraph(const std::string &nameblackbox,
const std::string &detailStr,
const std::string &levelStr,
void Transcriptor::Print(const std::string & message)
{
- m_Fp << " e->Print(\"" <<message<<"\")"<<std::endl;
+ m_Fp << " e->Print(\"" <<message<<"\");"<<std::endl;
}
void Transcriptor::SetMessageLevel(const std::string &kind,
int level)
{
- m_Fp << " e->SetMessageLevel(\"" <<kind<<"\","<<level<<")"<<std::endl;
+ m_Fp << " e->SetMessageLevel(\"" <<kind<<"\","<<level<<");"<<std::endl;
}
void Transcriptor::HelpMessages()
{
- m_Fp << " e->HelpMessages()"<<std::endl;
+ m_Fp << " e->HelpMessages();"<<std::endl;
}
void Transcriptor::LoadPackage(const std::string &name )
{
- m_Fp << " e->LoadPackage(\"" <<name<<"\")"<<std::endl;
+ m_Fp << " e->LoadPackage(\"" <<name<<"\");"<<std::endl;
}
void Transcriptor::UnLoadPackage(const std::string &name )
{
- m_Fp << " e->UnLoadPackage(\"" <<name<<"\")"<<std::endl;
+ m_Fp << " e->UnLoadPackage(\"" <<name<<"\");"<<std::endl;
}
Program: bbtk
Module: $RCSfile: bbtkTranscriptor.h,v $ $
Language: C++
- Date: $Date: 2008/03/26 08:27:19 $
- Version: $Revision: 1.7 $
+ Date: $Date: 2008/03/26 14:47:36 $
+ Version: $Revision: 1.8 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include "bbtkVirtualExec.h"
#include "bbtkSystem.h"
-#include "bbtkComplexBlackBox.h"
-#include "bbtkFactory.h"
-#include <string>
-#include <deque>
#include <iostream>
namespace bbtk
}
bool GetNoExecMode() const { return mNoExecMode; }
- /*
- bool GetNoExecMode() const
- {
- // cannot compile, since ethos is 'const' !
- //m_Fp << "e->GetNoExecMode(true);" << std::endl;
- }
- */
+
/// Sets the mode of dialog of the executer for Root inputs
void SetDialogMode(DialogModeType t) { mDialogMode = t; }
private:
- /// Gets the current working black box
- ComplexBlackBoxDescriptor* Current()
- { return mOpenDefinition.back().box; }
-
- /// Returns true when we are inside a define/endefine block
- // bool InDefinitionBlock() { return (mOpenDefinition.size()>1); }
-
- //==================================================================
- // ATTRIBUTES
-
- /// The factory used
- // Factory* mFactory;
-
- /// The Root Package
- Package* mPackage;
-
- /// The root ComplexBlackBox, in which operations are done when outside a define/endefine block
- /// Its name in bbi is 'workspace'
- ComplexBlackBoxDescriptor* mRoot;
-
- /// Struct that stores info on user defined complex black boxes
- struct CBBDefinition
- {
- ComplexBlackBoxDescriptor* box;
- std::string package;
- CBBDefinition(ComplexBlackBoxDescriptor* d, const std::string& p )
- : box(d), package(p) {}
- };
-
- /// The stack of current working ComplexBlackBox
- /// (is a stack for nested definitions)
- /// only contains the root when outside a define/endefine block
- std::deque<CBBDefinition> mOpenDefinition;
-
- /// The stack of current working package
- /// (is a stack for nested definitions)
- std::deque<Package*> mOpenPackage;
-
- /// flag which is true when we are inside a Define/EndDefine block
- // bool mDefineFlag;
-
/// The input values of the Root ComplexBlackBox
std::map<std::string,std::string> mInputs;
Program: bbtk
Module: $RCSfile: bbtkVirtualExec.h,v $ $
Language: C++
- Date: $Date: 2008/03/26 08:27:19 $
- Version: $Revision: 1.9 $
+ Date: $Date: 2008/03/26 14:47:36 $
+ 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
VirtualExec() : mInterpreter(0) {}
+ virtual ~VirtualExec() {}
+
/// Sets the interpreter who uses it
void SetInterpreter(Interpreter* i) { mInterpreter = i; }
/// Gets the interpreter who uses it
static int mgNbWindowsAlive = 0;
static int mgNbWindowsShown = 0;
-
+ void Wx::CreateInvisibleTopWindow()
+ {
+ wxWindow* top = new wxFrame(0,-1,_T("TOP (YOU SHOULD NOT SEE ME !!)"));
+ top->Hide();
+ Wx::SetTopWindow(top);
+ }
+
void Wx::ResetCursor()
{
if (!GetTopWindow()) return;
static void EndBusyCursor();
static int mBeginBusyCallsCount;
+ static void CreateInvisibleTopWindow();
/// Returns the global parent of all bbtk windows
static wxWindow* GetTopWindow();
/// Sets the global parent of all bbtk windows
static void ResetCursor() {}
static void BeginBusyCursor() {}
static void EndBusyCursor() {}
+ static void CreateInvisibleTopWindow() {}
static wxWindow* GetTopWindow() { return 0; }
static void SetTopWindow(wxWindow*) {}
static void IncNbWindowsAlive() {}
#include "bbstdExecBbiCommand.h"
#include "bbstdPackage.h"
#include "bbtkInterpreter.h"
+#include "bbtkExecuter.h"
namespace bbstd
{
Program: bbtk
Module: $RCSfile: bbwxCommandButton.cxx,v $
Language: C++
- Date: $Date: 2008/03/19 14:58:14 $
- Version: $Revision: 1.5 $
+ Date: $Date: 2008/03/26 14:47:37 $
+ Version: $Revision: 1.6 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include "bbwxCommandButton.h"
#include "bbwxPackage.h"
#include "bbtkInterpreter.h"
+#include "bbtkExecuter.h"