+void VectorFilterString::EraseDuplicateLines()
+{
+ std::vector< std::vector< std::string > * > pLstVec;
+ std::vector< std::vector< std::string > * > pLstVecOut;
+ std::vector< std::string > In0 = bbGetInputIn0();
+ std::vector< std::string > In1 = bbGetInputIn1();
+ std::vector< std::string > In2 = bbGetInputIn2();
+ std::vector< std::string > In3 = bbGetInputIn3();
+ std::vector< std::string > In4 = bbGetInputIn4();
+ std::vector< std::string > In5 = bbGetInputIn5();
+ std::vector< std::string > In6 = bbGetInputIn6();
+ std::vector< std::string > In7 = bbGetInputIn7();
+ std::vector< std::string > In8 = bbGetInputIn8();
+ std::vector< std::string > In9 = bbGetInputIn9();
+ if (bbGetInputIn0().size()!=0) { pLstVec.push_back( &In0 ); }
+ if (bbGetInputIn1().size()!=0) { pLstVec.push_back( &In1 ); }
+ if (bbGetInputIn2().size()!=0) { pLstVec.push_back( &In2 ); }
+ if (bbGetInputIn3().size()!=0) { pLstVec.push_back( &In3 ); }
+ if (bbGetInputIn4().size()!=0) { pLstVec.push_back( &In4 ); }
+ if (bbGetInputIn5().size()!=0) { pLstVec.push_back( &In5 ); }
+ if (bbGetInputIn6().size()!=0) { pLstVec.push_back( &In6 ); }
+ if (bbGetInputIn7().size()!=0) { pLstVec.push_back( &In7 ); }
+ if (bbGetInputIn8().size()!=0) { pLstVec.push_back( &In8 ); }
+ if (bbGetInputIn9().size()!=0) { pLstVec.push_back( &In9 ); }
+ std::vector< std::string > Out0;
+ std::vector< std::string > Out1;
+ std::vector< std::string > Out2;
+ std::vector< std::string > Out3;
+ std::vector< std::string > Out4;
+ std::vector< std::string > Out5;
+ std::vector< std::string > Out6;
+ std::vector< std::string > Out7;
+ std::vector< std::string > Out8;
+ std::vector< std::string > Out9;
+ pLstVecOut.push_back( &Out0 );
+ pLstVecOut.push_back( &Out1 );
+ pLstVecOut.push_back( &Out2 );
+ pLstVecOut.push_back( &Out3 );
+ pLstVecOut.push_back( &Out4 );
+ pLstVecOut.push_back( &Out5 );
+ pLstVecOut.push_back( &Out6 );
+ pLstVecOut.push_back( &Out7 );
+ pLstVecOut.push_back( &Out8 );
+ pLstVecOut.push_back( &Out9 );
+ std::string tmp1;
+ std::string tmp2;
+ if (bbGetInputIn0().size()!=0) // At least one element
+ {
+ bool okSizeVec=true;
+ int ipLstvec;
+ for (ipLstvec=1;ipLstvec<pLstVec.size();ipLstvec++)
+ {
+ if ( (*pLstVec[ipLstvec]).size()!=(*pLstVec[0]).size() ) { okSizeVec=false; }
+ }
+ if ( okSizeVec==false)
+ {
+ printf("EED VectorFilterString::Process WARNING! vectors are not of the same size.\n");
+ } else {
+ int iLine;
+ int ipLstvec2;
+ bool okLine;
+ int size = 0;
+ if (bbGetInputType()==8) { size = pLstVec.size(); }
+ if (bbGetInputType()==9) { size = 1; }
+ for (iLine=1 ; iLine < (*pLstVec[0]).size() ; iLine++ )
+ {
+ okLine=false;
+// for ( ipLstvec2=0 ; ipLstvec2<pLstVec.size() ; ipLstvec2++)
+// for ( ipLstvec2=0 ; ipLstvec2<1 ; ipLstvec2++)
+ for ( ipLstvec2=0 ; ipLstvec2<size ; ipLstvec2++)
+ {
+ tmp1=(*pLstVec[ipLstvec2])[iLine];
+ tmp2=(*pLstVec[ipLstvec2])[iLine-1];
+ if ( tmp1.compare(tmp2)!=0 ) { okLine=true; }
+ } // for ipLstVec2
+ if ( (okLine==true) || (iLine==1) )
+ {
+ for (ipLstvec2=0 ; ipLstvec2<pLstVec.size() ; ipLstvec2++)
+ {
+ (*pLstVecOut[ipLstvec2]).push_back( (*pLstVec[ipLstvec2])[iLine] );
+ } // for
+ } // if okLine
+ } // for iLine
+ } // if okSizeVec
+ } // bbGetInputIn0() size
+ bbSetOutputOut0( Out0 );
+ bbSetOutputOut1( Out1 );
+ bbSetOutputOut2( Out2 );
+ bbSetOutputOut3( Out3 );
+ bbSetOutputOut4( Out4 );
+ bbSetOutputOut5( Out5 );
+ bbSetOutputOut6( Out6 );
+ bbSetOutputOut7( Out7 );
+ bbSetOutputOut8( Out8 );
+ bbSetOutputOut9( Out9 );
+}
+