Program: bbtk
Module: $RCSfile: bbtkExecuter.cxx,v $ $
Language: C++
- Date: $Date: 2008/02/14 11:38:58 $
- Version: $Revision: 1.10 $
+ Date: $Date: 2008/02/14 20:26:54 $
+ Version: $Revision: 1.11 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
-
+
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
#include "bbtkConfigurationFile.h"
namespace bbtk
-{
+{
/**
*
*/
bbtkDebugMessageInc("Kernel",9,"Executer::Executer()" <<std::endl);
Reset();
bbtkDebugDecTab("Kernel",9);
- }
+ }
/**
*
*/
Executer::~Executer()
{
+std::cout << "====================================================== delete Executer\n";
bbtkDebugMessageInc("Kernel",9,"Executer::~Executer()" <<std::endl);
if (mRoot)
{
}
bbtkDebugDecTab("Kernel",9);
}
-
+
/**
*
mPackage->UnRegisterBlackBox(mRoot->GetTypeName());
delete mRoot;
}
- if (mPackage)
+ if (mPackage)
{
GetGlobalFactory()->UnLoadPackage("user");
}
Package* p;
try
{
- p = GetGlobalFactory()->GetPackage(name);
+ p = GetGlobalFactory()->GetPackage(name);
}
catch (Exception e)
{
- p = new Package(name,
- "",
- "",
- "",
- BBTK_STRINGIFY_SYMBOL(BBTK_VERSION));
- InsertPackage(p);
+ p = new Package(name,
+ "",
+ "",
+ "",
+ BBTK_STRINGIFY_SYMBOL(BBTK_VERSION));
+ InsertPackage(p);
}
mOpenPackage.push_back(p);
}
}
void Executer::Define (const std::string &name,
- const std::string &pack,
- const std::string &scriptfilename)
+ const std::string &pack,
+ const std::string &scriptfilename)
{
bbtkDebugMessageInc("Kernel",9,"Executer::Define(\""<<name<<
- ","<<pack<<"\")"
+ ","<<pack<<"\")"
<<std::endl);
ComplexBlackBoxDescriptor* b = new ComplexBlackBoxDescriptor(name);
{
try
{
- p = GetGlobalFactory()->GetPackage(pname);
+ p = GetGlobalFactory()->GetPackage(pname);
}
catch (Exception e)
{
}
else
{
- p = mOpenPackage.back();
+ p = mOpenPackage.back();
}
p->RegisterBlackBox(Current());
/**
*
*/
- void Executer::Connect (const std::string &nodeFrom,
+ void Executer::Connect (const std::string &nodeFrom,
const std::string &outputLabel,
const std::string &nodeTo,
const std::string &inputLabel)
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)
if ( b->bbGetInputType(input) != typeid(std::string) )
{
- BlackBox* a = /*mFactory->*/
+ BlackBox* a =
NewAdaptor(typeid(std::string),
b->bbGetInputType(input),
"tmp");
// Looks for the adaptor
if (b->bbGetOutputType(output) != typeid(std::string))
{
- BlackBox* a = /*mFactory->*/
+ BlackBox* a =
NewAdaptor(
b->bbGetOutputType(output),
typeid(std::string),
/// prints the list of the boxes of the current descriptor
void Executer::PrintBoxes()
- {
+ {
bbtkMessageInc("Help",1,"The black box descriptor \""
<<Current()->GetTypeName()<<"\" contains : "<<std::endl);
Current()->PrintBlackBoxes();
relative_link = false;
}
-
Package* p;
try
{
- p = GetGlobalFactory()->GetPackage(nameblackbox);
+ p = GetGlobalFactory()->GetPackage(nameblackbox);
}
catch (Exception e)
{
- p = mPackage;
+ p = mPackage;
}
// Generating documentation-help of workspace
p->SetDocURL(filename_rootHtml);
/*
try
{
- ShowGraphTypes(nameblackbox);
+ ShowGraphTypes(nameblackbox);
}
catch (bbtk::Exception a)
{
- std::cout <<"EXC"<<std::endl;
- page = ShowGraphInstances(nameblackbox,detail,level,system_display);
+ std::cout <<"EXC"<<std::endl;
+ page = ShowGraphInstances(nameblackbox,detail,level,system_display);
}
*/
return page;
/// Generate a png file with the actual pipeline (Graphviz-dot needed)
std::string Executer::ShowGraphInstances(const std::string &nameblackbox, int detail, int level,
- bool system_display)
+ bool system_display)
{
BlackBox* blackbox=NULL;
if (nameblackbox==".")
{
- blackbox=Current()->GetPrototype();
+ blackbox=Current()->GetPrototype();
}
else
{
- blackbox = Current()->GetPrototype()->bbFindBlackBox(nameblackbox);
+ blackbox = Current()->GetPrototype()->bbFindBlackBox(nameblackbox);
}
std::string page;
Program: bbtk
Module: $RCSfile: bbtkExecuter.h,v $ $
Language: C++
- Date: $Date: 2008/02/06 10:53:02 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2008/02/14 20:26:54 $
+ 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
/// Sets the file name to use for the current definition
/// (Used to set it after the Define command)
void SetCurrentFileName (const std::string &name );
-
+
/// End the definition of a ComplexBlackBox
void EndDefine ();
const std::string &box,
const std::string &output,
const std::string &help);
-
+
/// sets the input of the box with the value
void Set (const std::string &box,
const std::string &input,
Program: bbtk
Module: $RCSfile: bbtkInterpreter.cxx,v $ $
Language: C++
- Date: $Date: 2008/02/14 11:26:43 $
- Version: $Revision: 1.31 $
+ Date: $Date: 2008/02/14 20:26:54 $
+ Version: $Revision: 1.32 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
mGlobalInterpreter = this;
- // mFactory = new bbtk::Factory();
mExecuter = new bbtk::Executer();
+
+ // For the time being, comment out previous line, and
+ // uncomment next line to check Transcriptor
+
//mExecuter = new bbtk::Transcriptor("GeneratedProgram.txt");
- //mExecuter->SetFactory(mFactory);
// Builds the commands dict
CommandInfoType info;
case cMessage :
if (words.size()<3)
{
- bbtk::MessageManager::PrintInfo();
+ bbtk::MessageManager::PrintInfo();
}
else
{
break;
case cQuit :
+ delete mExecuter;
throw QuitException();
break;