bbSetOutputOut7( vOut7 );
bbSetOutputOut8( vOut8 );
bbSetOutputOut9( vOut9 );
-
}
+void VectorFilterString::InsertStringPos()
+{
+ printf("VectorFilterString::InsertStringPos Start\n" );
+ std::vector<std::string> vOut0;
+ std::vector<std::string> vOut1;
+ std::vector<std::string> vOut2;
+ std::vector<std::string> vOut3;
+ std::vector<std::string> vOut4;
+ std::vector<std::string> vOut5;
+ std::vector<std::string> vOut6;
+ std::vector<std::string> vOut7;
+ std::vector<std::string> vOut8;
+ std::vector<std::string> vOut9;
+
+ int i,size = bbGetInputIn0().size();
+ std::string sk1 = bbGetInputsk1();
+ printf("VectorFilterString::InsertStringPos sk1=%s sk2=%s \n", bbGetInputsk1().c_str() , bbGetInputsk2().c_str() );
+ int pos = atoi( bbGetInputsk2().c_str() );
+
+ printf("VectorFilterString::InsertStringPos pos=%d sk1=%s \n", pos, sk1.c_str() );
+ for (i=0; i<size; i++)
+ {
+ vOut0.push_back( bbGetInputIn0()[i].insert(pos,sk1) );
+ printf("VectorFilterString::InsertStringPos i=%s \n", vOut0[i].c_str() );
+ if ( i < bbGetInputIn1().size() ) { vOut1.push_back( bbGetInputIn1()[i].insert(pos,sk1) ); }
+ if ( i < bbGetInputIn2().size() ) { vOut2.push_back( bbGetInputIn2()[i].insert(pos,sk1) ); }
+ if ( i < bbGetInputIn3().size() ) { vOut3.push_back( bbGetInputIn3()[i].insert(pos,sk1) ); }
+ if ( i < bbGetInputIn4().size() ) { vOut4.push_back( bbGetInputIn4()[i].insert(pos,sk1) ); }
+ if ( i < bbGetInputIn5().size() ) { vOut5.push_back( bbGetInputIn5()[i].insert(pos,sk1) ); }
+ if ( i < bbGetInputIn6().size() ) { vOut6.push_back( bbGetInputIn6()[i].insert(pos,sk1) ); }
+ if ( i < bbGetInputIn7().size() ) { vOut7.push_back( bbGetInputIn7()[i].insert(pos,sk1) ); }
+ if ( i < bbGetInputIn8().size() ) { vOut8.push_back( bbGetInputIn8()[i].insert(pos,sk1) ); }
+ if ( i < bbGetInputIn9().size() ) { vOut9.push_back( bbGetInputIn9()[i].insert(pos,sk1) ); }
+ } // for i
+
+ bbSetOutputOut0( vOut0 );
+ bbSetOutputOut1( vOut1 );
+ bbSetOutputOut2( vOut2 );
+ bbSetOutputOut3( vOut3 );
+ bbSetOutputOut4( vOut4 );
+ bbSetOutputOut5( vOut5 );
+ bbSetOutputOut6( vOut6 );
+ bbSetOutputOut7( vOut7 );
+ bbSetOutputOut8( vOut8 );
+ bbSetOutputOut9( vOut9 );
+printf("VectorFilterString::InsertStringPos End\n" );
+}
+
+
void VectorFilterString::Process()
{
bbSetOutputOut9( vOut9 );
}
+ if (bbGetInputType()==2)
+ {
+ FilterByFindinIn0();
+ }
- if (bbGetInputType()==2)
- {
- FilterByFindinIn0();
- }
-
+ if (bbGetInputType()==3)
+ {
+ InsertStringPos();
+ }
}
//=====
// 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)
// if any
}
-}
-// EO namespace bbstd
+
+} // EO namespace bbstd
void ConnectionRepetitions( std::vector<std::string> vIn,std::vector<std::string> *vOut );
void FilterByFindinIn0();
+void InsertStringPos();
//=====
BBTK_INPUT(VectorFilterString,In7,"Input vector",std::vector<std::string>,"");
BBTK_INPUT(VectorFilterString,In8,"Input vector",std::vector<std::string>,"");
BBTK_INPUT(VectorFilterString,In9,"Input vector",std::vector<std::string>,"");
- BBTK_INPUT(VectorFilterString,Type,"(Default 0) 0:count connected repetitions, 1:CleaningPointsConnectTwoMesh sk1 criterium, 2: Select lines contain sk1 in In0 (the other intputs In1..In9 are afected)",int,"");
+ BBTK_INPUT(VectorFilterString,Type,"(Default 0) 0:count connected repetitions, 1:CleaningPointsConnectTwoMesh sk1 criterium, 2: Select lines contain sk1 in In0 (the other intputs In1..In9 are afected, 3: insert string:sk1 in position:sk2 for all elements )",int,"");
BBTK_INPUT(VectorFilterString,sk1,"constant 1",std::string,"");
BBTK_INPUT(VectorFilterString,sk2,"constant 2",std::string,"");