Program: bbtk
Module: $RCSfile: bbtkComplexBlackBox.cxx,v $
Language: C++
- Date: $Date: 2008/12/11 09:50:35 $
- Version: $Revision: 1.23 $
+ Date: $Date: 2008/12/12 12:11:21 $
+ Version: $Revision: 1.24 $
=========================================================================*/
/* ---------------------------------------------------------------------
bbtkDebugMessage("object",3,
"==> ComplexBlackBox::~ComplexBlackBox() ["
<<bbGetName()<<"]"<<std::endl);
+
+ Clear();
+ this->bbDesallocateConnectors();
+
+ bbtkDebugMessage("object",3,
+ "<== ComplexBlackBox::~ComplexBlackBox() ["
+ <<bbGetName()<<"]"<<std::endl);
+ }
+ //=======================================================================
+
+
+ //=======================================================================
+ /// Clear
+ void ComplexBlackBox::Clear()
+ {
+ bbtkDebugMessage("object",3,
+ "==> ComplexBlackBox::Clear() ["
+ <<bbGetName()<<"]"<<std::endl);
bbtkDebugMessage("object",4,
" -> Releasing connections"<<std::endl);
" -> Releasing boxes"<<std::endl);
mBlackBoxMap.clear();
- // Clear();
- this->bbDesallocateConnectors();
-
bbtkDebugMessage("object",3,
- "<== ComplexBlackBox::~ComplexBlackBox() ["
+ "<== ComplexBlackBox::Clear() ["
<<bbGetName()<<"]"<<std::endl);
}
//=======================================================================
-
//=========================================================================
/// Allocates the i/o connectors of the black box
Program: bbtk
Module: $RCSfile: bbtkExecuter.cxx,v $
Language: C++
- Date: $Date: 2008/12/11 15:30:04 $
- Version: $Revision: 1.24 $
+ Date: $Date: 2008/12/12 12:11:21 $
+ Version: $Revision: 1.25 $
=========================================================================*/
/* ---------------------------------------------------------------------
}
//=======================================================================
+
//=======================================================================
/// changes the workspace name
void Executer::SetWorkspaceName( const std::string& n )
}
//=======================================================================
+ //=======================================================================
+ void Executer::Clear()
+ {
+ bbtkDebugMessageInc("Kernel",9,"Executer::Clear()" <<std::endl);
+ GetCurrentDescriptor()->GetPrototype()->Clear();
+
+ }
+ //=======================================================================
+
//=======================================================================
void Executer::EndDefine ()
{
Program: bbtk
Module: $RCSfile: bbtkExecuter.h,v $
Language: C++
- Date: $Date: 2008/10/17 08:18:13 $
- Version: $Revision: 1.16 $
+ Date: $Date: 2008/12/12 12:11:21 $
+ Version: $Revision: 1.17 $
=========================================================================*/
/* ---------------------------------------------------------------------
/// Destroys a black box
void Destroy (const std::string &boxName);
+ /// Clears the currently defined ComplexBlackBox
+ void Clear();
+
/// Connects the output boxOutput to the input boxInput
void Connect (const std::string &boxfrom,
const std::string &output,
Program: bbtk
Module: $RCSfile: bbtkInterpreter.cxx,v $
Language: C++
- Date: $Date: 2008/11/26 12:36:42 $
- Version: $Revision: 1.78 $
+ Date: $Date: 2008/12/12 12:11:21 $
+ Version: $Revision: 1.79 $
=========================================================================*/
/* ---------------------------------------------------------------------
info.help = "Deletes the black box of name <box>";
mCommandDict[info.keyword] = info;
+ info.keyword = "clear";
+ info.argmin = 0;
+ info.argmax = 0;
+ info.code = cClear;
+ info.syntax = "clear";
+ info.help = "Clears the currently defined complex box (deletes all its boxes and connections)";
+ mCommandDict[info.keyword] = info;
+
info.keyword = "newgui";
info.argmin = 2;
info.argmax = 2;
Reset();
break;
+ case cClear :
+ mVirtualExecuter->Clear();
+ break;
+
case cInclude :
// if 'source' was given (words.size()==3) then tell to set the
// source file name of the current complex box with the full file name included
Program: bbtk
Module: $RCSfile: bbtkInterpreter.h,v $
Language: C++
- Date: $Date: 2008/12/11 15:30:04 $
- Version: $Revision: 1.37 $
+ Date: $Date: 2008/12/12 12:11:21 $
+ Version: $Revision: 1.38 $
=========================================================================*/
/* ---------------------------------------------------------------------
/// The enumeration of command codes == Command name
typedef enum
{
+ cClear,
cNew,
cDelete,
cConnect,
Program: bbtk
Module: $RCSfile: bbtkKW.cxx,v $
Language: C++
- Date: $Date: 2008/12/02 08:38:08 $
- Version: $Revision: 1.2 $
+ Date: $Date: 2008/12/12 12:11:21 $
+ Version: $Revision: 1.3 $
=========================================================================*/
/* ---------------------------------------------------------------------
//#include "vtkConditionVariable.h"
-#include "vtkMultiThreader.h"
+//#include "vtkMultiThreader.h"
#include <ctime>
//=========================================================================
static vtkKWApplication* mgKWApp = 0;
- static vtkMultiThreader* mgMultiThreader = 0; /*
+ //static vtkMultiThreader* mgMultiThreader = 0;
+ /*
static vtkKWWindowBase* mgKWTopWindow = 0;
static vtkKWWindowBase* mgKWTopWindowParent = 0;
static bool mgKWAutoDestroyTopWindow = true;
Program: bbtk
Module: $RCSfile: bbtkTranscriptor.cxx,v $
Language: C++
- Date: $Date: 2008/10/17 08:18:14 $
- Version: $Revision: 1.14 $
+ Date: $Date: 2008/12/12 12:11:21 $
+ Version: $Revision: 1.15 $
=========================================================================*/
/* ---------------------------------------------------------------------
m_Fp << " e->Reset( );" << std::endl;
}
+ void Transcriptor::Clear()
+ {
+ m_Fp << " e->Clear( );" << std::endl;
+ }
+
void Transcriptor::SetWorkspaceName( const std::string& name )
{
Program: bbtk
Module: $RCSfile: bbtkTranscriptor.h,v $
Language: C++
- Date: $Date: 2008/10/17 08:18:14 $
- Version: $Revision: 1.12 $
+ Date: $Date: 2008/12/12 12:11:21 $
+ Version: $Revision: 1.13 $
=========================================================================*/
/* ---------------------------------------------------------------------
/// Destroys a black box
void Destroy (const std::string &boxName);
+ /// Clears the currently defined ComplexBlackBox
+ void Clear();
+
/// Connects the output boxOutput to the input boxInput
void Connect (const std::string &boxfrom,
const std::string &output,
Program: bbtk
Module: $RCSfile: bbtkVirtualExec.h,v $
Language: C++
- Date: $Date: 2008/10/17 08:18:14 $
- Version: $Revision: 1.17 $
+ Date: $Date: 2008/12/12 12:11:21 $
+ Version: $Revision: 1.18 $
=========================================================================*/
/* ---------------------------------------------------------------------
/// Destroys a black box
virtual void Destroy (const std::string &boxName) = 0;
+ /// Clears the currently defined ComplexBlackBox
+ virtual void Clear() = 0;
+
/// Connects the output boxOutput to the input boxInput
virtual void Connect (const std::string &boxfrom,
const std::string &output,
+++ /dev/null
-load kw
-new kwSlider s
-exec s
-#unload kw
print "=================================="
print "A Slider whose output is plugged into an OutputText"
+message echo 2
include kw
load std
connect in.Widget window.Widget1
connect out.Widget window.Widget2
exec window
-reset
+message echo 0
+clear
print "=================================="
print "The kwSlicer widget"
+message echo 2
load kw
include vtk
exec s
reset
+message echo 0
+clear
print "=================================="
print "Using both kw and wx"
+message echo 2
load wx
load kw