From: guigues Date: Fri, 25 Jul 2008 07:44:12 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: r0.6.0~4 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=e6b2de923e0e69c303c7d18fb8a5c1970541bb3a;p=bbtk.git *** empty log message *** --- diff --git a/kernel/src/bbtkConnection.cxx b/kernel/src/bbtkConnection.cxx index 4a6b705..b3ce70a 100644 --- a/kernel/src/bbtkConnection.cxx +++ b/kernel/src/bbtkConnection.cxx @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkConnection.cxx,v $ Language: C++ - Date: $Date: 2008/04/25 13:37:48 $ - Version: $Revision: 1.13 $ + Date: $Date: 2008/07/25 07:44:12 $ + Version: $Revision: 1.14 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See doc/license.txt or @@ -27,6 +27,7 @@ namespace bbtk { + //================================================================== Connection::Pointer Connection::New(BlackBox::Pointer from, const std::string& output, BlackBox::Pointer to, @@ -45,6 +46,7 @@ namespace bbtk <bbConnectInput(input,this); + bbtkDebugMessage("connection",1,"<== Connection::Connection(\"" + <bbGetFullName()<<"\",\""<bbGetFullName()<<"\",\""< Connection::Connection(\"" + <bbGetName()<<"\",\""<bbGetName()<<"\",\""< Connection::Connection(\"" + <bbGetName()<<"\",\""<bbGetName()<<"\",\""<bbGetName()<<"\",\""<bbGetName()<<"\",\""< Connection::Connection(\"" + <bbGetName()<<"\",\""<bbGetName()<<"\",\""< Connection::Connection(\"" + <bbGetFullName()<<"\",\""<bbGetFullName()<<"\",\""<bbHasOutput(output) ) + { + bbtkError("The box \""<bbGetTypeName()<< + "\" has no output \""<bbHasInput(input) ) + { + bbtkError("The box \""<bbGetTypeName()<< + "\" has no input \""<bbGetInputConnectorMap().find(input)->second->IsConnected()) + { + bbtkError("The input \""<bbGetName() + <<"\" is already connected"); + } + + // std::string t1 ( from->bbGetOutputType(output).name() ); + // std::string t2 ( to->bbGetInputType(input).name() ); + // if //( t1 != t2 ) + if ( from->bbGetOutputType(output) != + to->bbGetInputType(input) ) + { + if ( from->bbGetOutputType(output) == typeid(Data) ) + { + bbtkWarning("Connection '" + <bbGetName()<<"."<() + <<"> : type compatibility with '" + <bbGetName()<<"."<bbGetInputType(input) == typeid(Data) ) + { + bbtkDebugMessage("Kernel",8," -> '"<()<<" : can receive any data" + <bbConnectOutput(output,this); + to->bbConnectInput(input,this); + + bbtkDebugMessage("connection",1,"<== Connection::Connection(\"" <bbGetFullName()<<"\",\""<bbGetFullName()<<"\",\""< Object::ReleasePackages()"<use_count() != 0) { + bbtkDebugMessage("object",1,"##> Releasing package '"<< + i->lock()->GetThisPointer()->GetName() + <<"'"<lock()); Package::WeakPointer w(i->lock()->GetThisPointer()); Package::Release(w); @@ -203,7 +207,8 @@ namespace bbtk } } - + //======================================================================= + diff --git a/kernel/src/bbtkWxBlackBox.cxx b/kernel/src/bbtkWxBlackBox.cxx index de81d49..1050f04 100644 --- a/kernel/src/bbtkWxBlackBox.cxx +++ b/kernel/src/bbtkWxBlackBox.cxx @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkWxBlackBox.cxx,v $ Language: C++ - Date: $Date: 2008/07/24 14:37:06 $ - Version: $Revision: 1.25 $ + Date: $Date: 2008/07/25 07:44:12 $ + Version: $Revision: 1.26 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -141,6 +141,7 @@ namespace bbtk //========================================================================= void WxBlackBoxDialog::bbShow() { + if (bbIsShown()) return; bbtkDebugMessage("wx",5,"WxBlackBoxDialog::bbShow() [" <bbGetFullName()<<"]"<bbGetFullName()<<")"<bbGetInputIn()); // bbtk::Interpreter::mGlobalInterpreter->InterpretLine( commandstr ); - int i; + unsigned int i; bool ok=true; int pos1=0,pos2; pos2 = commandstr.find(";",pos1); diff --git a/packages/wx/src/bbwxCommandButton.h b/packages/wx/src/bbwxCommandButton.h index 289c2d9..6b2313a 100644 --- a/packages/wx/src/bbwxCommandButton.h +++ b/packages/wx/src/bbwxCommandButton.h @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbwxCommandButton.h,v $ Language: C++ - Date: $Date: 2008/05/07 13:14:49 $ - Version: $Revision: 1.4 $ + Date: $Date: 2008/07/25 07:44:12 $ + 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 @@ -14,7 +14,8 @@ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. -=========================================================================*//** +=========================================================================*/ +/** * \brief Short description in one line * * Long description which diff --git a/packages/wx/src/bbwxSlider.h b/packages/wx/src/bbwxSlider.h index f061465..39aecd9 100644 --- a/packages/wx/src/bbwxSlider.h +++ b/packages/wx/src/bbwxSlider.h @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbwxSlider.h,v $ Language: C++ - Date: $Date: 2008/04/18 12:59:53 $ - Version: $Revision: 1.11 $ + Date: $Date: 2008/07/25 07:44:12 $ + Version: $Revision: 1.12 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -14,7 +14,7 @@ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. -=========================================================================*//** +=========================================================================*/ /** * \file * \brief Short description in one line diff --git a/samples/README.txt b/samples/README.txt new file mode 100644 index 0000000..89fb003 --- /dev/null +++ b/samples/README.txt @@ -0,0 +1,6 @@ +Using bbtk in C++ +================== + +The examples in subdirs must be built as separate projects +(it illustrates how bbtk and packages installs are found and used +by external projects)