From: guigues Date: Tue, 22 Apr 2008 06:59:31 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: r0.6.1~68 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=d7a6d341e2d11c175351212f0bf4812784dc57e5;p=bbtk.git *** empty log message *** --- diff --git a/kernel/src/bbtkBlackBox.cxx b/kernel/src/bbtkBlackBox.cxx index dbba13d..084e519 100644 --- a/kernel/src/bbtkBlackBox.cxx +++ b/kernel/src/bbtkBlackBox.cxx @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkBlackBox.cxx,v $ Language: C++ -Date: $Date: 2008/04/21 12:43:05 $ -Version: $Revision: 1.11 $ +Date: $Date: 2008/04/22 06:59:31 $ +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 @@ -604,10 +604,13 @@ namespace bbtk /// Connects the input to the connection c void BlackBox::bbConnectInput( const std::string& name, Connection::Pointer c) { - bbtkDebugMessageInc("Kernel",7, - "BlackBox::bbConnectInput(\""< BlackBox::bbConnectInput(\"" + <GetFullName()<<") [" <second->SetConnection(c); + bbtkDebugMessage("connection",2, + "<== BlackBox::bbConnectInput(\"" + <GetFullName()<<") [" + < to the connection c void BlackBox::bbConnectOutput( const std::string& name, Connection::Pointer c) { - bbtkDebugMessageInc("Kernel",7, - "BlackBox::bbConnectOutput(\""< BlackBox::bbConnectOutput(\""<GetFullName()<<") [" + <second->SetConnection(c); - bbtkDebugDecTab("Kernel",7); + bbtkDebugMessage("connection",2, + "<== BlackBox::bbConnectOutput(\""<GetFullName()<<") [" + < from the connection c void BlackBox::bbDisconnectInput( const std::string& name, Connection::Pointer c) { - if (!c) return; - bbtkDebugMessageInc("Kernel",7, - "BlackBox::bbDisconnectInput(\""< BlackBox::bbDisconnectInput(\""<GetFullName()<<") [" + <second->UnsetConnection(c); - bbtkDebugDecTab("Kernel",7); + bbtkDebugMessage("connection",2, + "<== BlackBox::bbDisconnectInput(\""<GetFullName()<<") [" + < from the connection c void BlackBox::bbDisconnectOutput( const std::string& name, Connection::Pointer c) { - if (!c) return; - bbtkDebugMessageInc("Kernel",7, - "BlackBox::bbDisconnectOutput(\""< BlackBox::bbDisconnectOutput(\""<GetFullName()<<") [" + <second->UnsetConnection(c); - bbtkDebugDecTab("Kernel",7); + bbtkDebugMessage("connection",2, + "<== BlackBox::bbDisconnectOutput(\""<GetFullName()<<") [" + <GetBlackBoxFrom()->bbGetFullName() + <<"."<GetBlackBoxFromOutput()<<"----" + <GetOriginalBlackBoxFrom()->bbGetFullName() + <<"."<GetOriginalBlackBoxFromOutput()< to the connection c void ComplexBlackBox::bbConnectInput( const std::string& name, Connection::Pointer c) { - bbtkDebugMessageInc("Kernel",7, - "ComplexBlackBox::bbConnectInput(\"" - < ComplexBlackBox::bbConnectInput(\"" + <GetFullName()<<") [" + <GetInputDescriptor(name); + BlackBox::Pointer t = bbGetBlackBox(d->GetTarget()); + + bbtkDebugMessage("connection",2," - Target = "<GetTarget()<<" = "<bbGetFullName()<SetBlackBoxTo(t); c->SetBlackBoxToInput(d->GetInput()); - t->bbConnectInput(d->GetInput(),c); - bbtkMessage("Debug",1,"ComplexBlackBox["<GetFullName()<GetFullName()<<") [" + < to the connection c void ComplexBlackBox::bbConnectOutput( const std::string& name, Connection::Pointer c) { - bbtkDebugMessageInc("Kernel",7, - "ComplexBlackBox::bbConnectOutput(\"" - < ComplexBlackBox::bbConnectOutput(\"" + <GetFullName()<<") [" + <GetOutputDescriptor(name); BlackBox::Pointer t = bbGetBlackBox(d->GetTarget()); + + bbtkDebugMessage("connection",2," - Target = "<GetTarget()<<" = "<bbGetFullName()<SetBlackBoxFrom(t); c->SetBlackBoxFromOutput(d->GetOutput()); + + bbtkDebugMessage("connection",2," - New conn = "<GetFullName()<bbConnectOutput(d->GetOutput(),c); - bbtkMessage("Debug",5,"ComplexBlackBox["<GetFullName()<GetFullName()<<") [" + <Check(); + (*j)->Check(); } } if (p.use_count()!=1) diff --git a/kernel/src/bbtkConnection.cxx b/kernel/src/bbtkConnection.cxx index 1e84edf..9c8487a 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/18 12:59:15 $ - Version: $Revision: 1.7 $ + Date: $Date: 2008/04/22 06:59:31 $ + 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 @@ -62,6 +62,11 @@ Connection::Connection(BlackBox::Pointer from, const std::string& output, <bbGetName()<<"\",\""< Connection::Connection(\"" + <bbGetFullName()<<"\",\""<bbGetFullName()<<"\",\""<bbHasOutput(output) ) @@ -128,10 +133,7 @@ Connection::Connection(BlackBox::Pointer from, const std::string& output, } } - // Lock this pointer !!! - Pointer p = MakePointer(this,true); - from->bbConnectOutput(output,p); - to->bbConnectInput(input,p); + mFrom = from; mOriginalFrom = from; mTo = to; @@ -139,7 +141,17 @@ Connection::Connection(BlackBox::Pointer from, const std::string& output, mInput = mOriginalInput = input; mOutput = mOriginalOutput = output; + // Lock this pointer !!! + Pointer p = MakePointer(this,true); + from->bbConnectOutput(output,p); + to->bbConnectInput(input,p); + + bbtkDebugMessage("connection",1,"<== Connection::Connection(\"" + <bbGetFullName()<<"\",\""<bbGetFullName()<<"\",\""< Connection::Connection(\"" <bbGetName()<<"\",\""<bbGetName()<<"\",\""<AddToCategory("adaptor"); Current()->SetKind(bbtk::BlackBoxDescriptor::DEFAULT_ADAPTOR); } - if (kind=="WIDGET_ADAPTOR") + if (kind=="GUI") { - Current()->AddToCategory("adaptor"); - Current()->SetKind(bbtk::BlackBoxDescriptor::WIDGET_ADAPTOR); + Current()->AddToCategory("gui"); + Current()->SetKind(bbtk::BlackBoxDescriptor::GUI); } - else if (kind=="DEFAULT_WIDGET_ADAPTOR") + else if (kind=="DEFAULT_GUI") { - Current()->AddToCategory("adaptor"); - Current()->SetKind(bbtk::BlackBoxDescriptor::DEFAULT_WIDGET_ADAPTOR); + Current()->AddToCategory("gui"); + Current()->SetKind(bbtk::BlackBoxDescriptor::DEFAULT_GUI); } else { bbtkError("Unknown box kind : '"<first.mKind == - BlackBoxDescriptor::DEFAULT_WIDGET_ADAPTOR) && + BlackBoxDescriptor::DEFAULT_GUI) && //(j->first.mTypeIn == typein) && (j->first.mTypeOut.GetNature() == typeout.GetNature() ) ) diff --git a/kernel/src/bbtkInterpreter.cxx b/kernel/src/bbtkInterpreter.cxx index ede613a..ff2fbb1 100644 --- a/kernel/src/bbtkInterpreter.cxx +++ b/kernel/src/bbtkInterpreter.cxx @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkInterpreter.cxx,v $ $ Language: C++ - Date: $Date: 2008/04/18 12:59:15 $ - Version: $Revision: 1.60 $ + Date: $Date: 2008/04/22 06:59:31 $ + Version: $Revision: 1.61 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -579,7 +579,6 @@ namespace bbtk /// Runs the interpretation of a command Interpreter::ExitStatus Interpreter::InterpretLine( const std::string& line ) { -printf("EED Interpreter::InterpretLine %s \n", line.c_str() ); bbtkDebugMessageInc("Interpreter",9,"Interpreter::InterpretLine('"<GetKind() == BlackBoxDescriptor::DEFAULT_WIDGET_ADAPTOR) + else if ( d->GetKind() == BlackBoxDescriptor::DEFAULT_GUI) { bbtkDebugMessage("Kernel",8,"Package<"<::RegisterBlackBox(\""<GetTypeName()<<"\") : The box is a widget adaptor, inserting it in adaptors map ..."<