From: jean-pierre roux Date: Fri, 22 Jul 2011 17:42:50 +0000 (+0000) Subject: re indent X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=731d9ee262e286a24e3ea2776d8e914950840a2c;p=bbtk.git re indent --- diff --git a/kernel/src/bbtkBlackBox.cxx b/kernel/src/bbtkBlackBox.cxx index dc496cb..dfdf6e5 100644 --- a/kernel/src/bbtkBlackBox.cxx +++ b/kernel/src/bbtkBlackBox.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkBlackBox.cxx,v $ Language: C++ - Date: $Date: 2011/07/02 08:00:34 $ - Version: $Revision: 1.53 $ + Date: $Date: 2011/07/22 17:42:50 $ + Version: $Revision: 1.54 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -349,7 +349,6 @@ namespace bbtk //========================================================================= bool BlackBox::bbCanReact() const { - return ( bbGlobalGetSomeBoxExecuting() #ifdef USE_WXWIDGETS || Wx::IsSomeWindowAlive() @@ -454,9 +453,9 @@ namespace bbtk } } - - if ( ( bbBoxProcessModeIsReactive() || (c==bbGetInputConnectorMap().find("BoxExecute")->second)) - && (bbCanReact() ) ) + if ( ( bbBoxProcessModeIsReactive() + || (c==bbGetInputConnectorMap().find("BoxExecute")->second)) + && (bbCanReact() ) ) { bbtkBlackBoxDebugMessage("change",2, "-> Execution triggered by Reactive mode or BoxExecute input change"<GetOutputDescriptor(ii->first); tempStrTypeName=id->GetTypeName(); SubsBrackets(tempStrTypeName); - std::string Name(ii->first); - SubsBrackets(Name); + std::string Name(ii->first); + SubsBrackets(Name); labelStr=labelStr+"<"+ii->first.c_str()+"> " + valueStr + Name.c_str() + " ["+tempStrTypeName+"]"; } labelStr = labelStr+ " } }" ; @@ -1217,23 +1211,23 @@ namespace bbtk if (this->bbGetDescriptor()->GetPackage()) { - bbtkBlackBoxMessage("help",1,"Black Box '"<bbGetDescriptor()->GetPackage()->GetName() <<"::"<bbGetDescriptor()->GetTypeName()<<">"<bbGetDescriptor()->GetTypeName()<<">"<bbGetDescriptor()->GetTypeName()<<">"<first); - if (iname.back().size()>namelmax) namelmax = iname.back().size(); - ivalue.push_back(bbGetInputAsString(i->first)); - if (ivalue.back().size()>valuelmax) valuelmax = ivalue.back().size(); - std::string s(""); - Connection* con = i->second->GetConnection(); - if (con!=0){ - s = con->GetOriginalBlackBoxFrom()->bbGetName(); - s += "."; - s += con->GetOriginalBlackBoxFromOutput(); - } // if con - iconn.push_back(s); - istatus.push_back(GetIOStatusString(i->second->GetStatus())); - } + { + iname.push_back(i->first); + if (iname.back().size()>namelmax) namelmax = iname.back().size(); + ivalue.push_back(bbGetInputAsString(i->first)); + if (ivalue.back().size()>valuelmax) valuelmax = ivalue.back().size(); + std::string s(""); + Connection* con = i->second->GetConnection(); + if (con!=0){ + s = con->GetOriginalBlackBoxFrom()->bbGetName(); + s += "."; + s += con->GetOriginalBlackBoxFromOutput(); + } // if con + iconn.push_back(s); + istatus.push_back(GetIOStatusString(i->second->GetStatus())); + } OutputConnectorMapType::iterator o; std::vector oname; std::vector ovalue; std::vector > oconn; std::vector ostatus; for ( o = mOutputConnectorMap.begin(); o != mOutputConnectorMap.end(); ++o ) - { - oname.push_back(o->first); - if (oname.back().size()>namelmax) namelmax = oname.back().size(); - ovalue.push_back(bbGetOutputAsString(o->first)); - if (ovalue.back().size()>valuelmax) valuelmax = ovalue.back().size(); - std::vector ss; - const std::vector& con - = o->second->GetConnectionVector(); - std::vector::const_iterator c; - for (c=con.begin();c!=con.end();++c) - { - std::string s; - s = (*c)->GetOriginalBlackBoxTo()->bbGetName(); - s += "."; - s += (*c)->GetOriginalBlackBoxToInput(); - ss.push_back(s); - } // if con - oconn.push_back(ss); - ostatus.push_back(GetIOStatusString(o->second->GetStatus())); - } + { + oname.push_back(o->first); + if (oname.back().size()>namelmax) + namelmax = oname.back().size(); + ovalue.push_back(bbGetOutputAsString(o->first)); + if (ovalue.back().size()>valuelmax) + valuelmax = ovalue.back().size(); + std::vector ss; + const std::vector& con + = o->second->GetConnectionVector(); + std::vector::const_iterator c; + for (c=con.begin();c!=con.end();++c) + { + std::string s; + s = (*c)->GetOriginalBlackBoxTo()->bbGetName(); + s += "."; + s += (*c)->GetOriginalBlackBoxToInput(); + ss.push_back(s); + } // if con + oconn.push_back(ss); + ostatus.push_back(GetIOStatusString(o->second->GetStatus())); + } if (iname.size()) bbtkBlackBoxMessage("help",1," * Inputs : "<::iterator i1,i2,i3,i4; for (i1=iname.begin(),i2=ivalue.begin(),i3=iconn.begin(),i4=istatus.begin(); - i1!=iname.end(),i2!=ivalue.end(),i3!=iconn.end(),i4!=istatus.end(); - ++i1,++i2,++i3,++i4) - { - std::string name(*i1); - name += "'"; - name.append(1+namelmax-name.size(),' '); - std::string value(*i2); - value += "'"; - value.append(1+valuelmax-value.size(),' '); - if (i3->size()) - bbtkBlackBoxMessage("help",1," '"<size()) + bbtkBlackBoxMessage("help",1," '"< class bbstd_EXPORT GetVectorElement : public bbtk::AtomicBlackBox - { + { BBTK_TEMPLATE_BLACK_BOX_INTERFACE(GetVectorElement,bbtk::AtomicBlackBox,T); BBTK_DECLARE_INPUT(In,std::vector); - BBTK_DECLARE_INPUT(I,int); - BBTK_DECLARE_INPUT(ErrorValue,T); + BBTK_DECLARE_INPUT(I,int); + BBTK_DECLARE_INPUT(ErrorValue,T); BBTK_DECLARE_OUTPUT(Out,T); BBTK_PROCESS(DoIt); - void DoIt(); + void DoIt(); }; //================================================================= @@ -62,7 +62,7 @@ namespace bbstd typedef std::vector Tvector; BBTK_TEMPLATE_INPUT(GetVectorElement, In,"Input",Tvector); BBTK_TEMPLATE_INPUT(GetVectorElement, I, "Input",int); - BBTK_TEMPLATE_INPUT(GetVectorElement, ErrorValue, "ErrorValue",T); + BBTK_TEMPLATE_INPUT(GetVectorElement, ErrorValue, "ErrorValue",T); BBTK_TEMPLATE_OUTPUT(GetVectorElement,Out,"Output",T); BBTK_END_DESCRIBE_TEMPLATE_BLACK_BOX(GetVectorElement); //================================================================= @@ -76,7 +76,7 @@ namespace bbstd bbSetOutputOut( bbGetInputIn()[bbGetInputI()] ); } else { bbSetOutputOut( bbGetInputErrorValue() ); - } + } } //================================================================= diff --git a/packages/vtk/src/bbvtkGetVectorElement.h b/packages/vtk/src/bbvtkGetVectorElement.h index 6993b5c..f8b29c2 100644 --- a/packages/vtk/src/bbvtkGetVectorElement.h +++ b/packages/vtk/src/bbvtkGetVectorElement.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbvtkGetVectorElement.h,v $ Language: C++ - Date: $Date: 2011/07/02 08:00:36 $ - Version: $Revision: 1.2 $ + Date: $Date: 2011/07/22 17:42:57 $ + Version: $Revision: 1.3 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -45,10 +45,10 @@ namespace bbvtk BBTK_TEMPLATE_BLACK_BOX_INTERFACE(GetVectorElement,bbtk::AtomicBlackBox,T); BBTK_DECLARE_INPUT(In,std::vector); BBTK_DECLARE_INPUT(I,int); - BBTK_DECLARE_INPUT(ErrorValue,T); + BBTK_DECLARE_INPUT(ErrorValue,T); BBTK_DECLARE_OUTPUT(Out,T); BBTK_PROCESS(DoIt); - void DoIt(); + void DoIt(); }; //================================================================= @@ -78,7 +78,7 @@ namespace bbvtk } else { bbSetOutputOut( bbGetInputErrorValue() ); - } + } } //================================================================= diff --git a/packages/vtk/src/bbvtkMagnitud.cxx b/packages/vtk/src/bbvtkMagnitud.cxx index cc4a2a2..07926ac 100644 --- a/packages/vtk/src/bbvtkMagnitud.cxx +++ b/packages/vtk/src/bbvtkMagnitud.cxx @@ -26,8 +26,7 @@ void Magnitud::Process() // * TYPE is the C++ type of the input/output // (the one provided in the attribute 'type' of the tag 'input') - - // ---------- +// ---------- if (bbGetInputIn()!=NULL) { vGreenToRedLut->SetHueRange(0.6667,0.0); vGreenToRedLut->Build(); @@ -316,13 +315,13 @@ void Magnitud::Process() //temp->GetData( vMultipleContourMapper->GetOutput() ); //bbSetOutputOutTest( temp ); - + } // if - + } // process - - - + + + //===== // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) //===== diff --git a/packages/vtk/src/bbvtkStructuredPointsReader.cxx b/packages/vtk/src/bbvtkStructuredPointsReader.cxx index 21bfd47..74f6d6b 100644 --- a/packages/vtk/src/bbvtkStructuredPointsReader.cxx +++ b/packages/vtk/src/bbvtkStructuredPointsReader.cxx @@ -26,10 +26,10 @@ void StructuredPointsReader::Process() // * TYPE is the C++ type of the input/output // (the one provided in the attribute 'type' of the tag 'input') - //warning: comparison with string literal results in unspecified behaviour + //warning: comparison with string literal results in unspecified behaviour //if ( bbGetInputIn().c_str()!="") - std::string empty(""); // JPR - if ( bbGetInputIn().c_str()!=empty) + std::string empty(""); // JPR + if ( bbGetInputIn().c_str()!=empty) { spr -> SetFileName( bbGetInputIn().c_str() ); sp = spr->GetOutput();