From 3ad7d7afaa8e65b92c90c8308077e964ae00f7c6 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Fri, 10 Dec 2021 19:14:42 +0100 Subject: [PATCH] #3478 VectorfilterString Box add the insert string option --- packages/std/src/bbstdVectorFilterString.cxx | 67 +++++++++++++++++--- packages/std/src/bbstdVectorFilterString.h | 3 +- 2 files changed, 61 insertions(+), 9 deletions(-) diff --git a/packages/std/src/bbstdVectorFilterString.cxx b/packages/std/src/bbstdVectorFilterString.cxx index 1973e7b..a08d721 100644 --- a/packages/std/src/bbstdVectorFilterString.cxx +++ b/packages/std/src/bbstdVectorFilterString.cxx @@ -74,9 +74,57 @@ void VectorFilterString::FilterByFindinIn0() bbSetOutputOut7( vOut7 ); bbSetOutputOut8( vOut8 ); bbSetOutputOut9( vOut9 ); - } +void VectorFilterString::InsertStringPos() +{ + printf("VectorFilterString::InsertStringPos Start\n" ); + std::vector vOut0; + std::vector vOut1; + std::vector vOut2; + std::vector vOut3; + std::vector vOut4; + std::vector vOut5; + std::vector vOut6; + std::vector vOut7; + std::vector vOut8; + std::vector 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 vIn,std::vector *vOut ); void FilterByFindinIn0(); +void InsertStringPos(); //===== @@ -71,7 +72,7 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(VectorFilterString,bbtk::AtomicBlackBox); BBTK_INPUT(VectorFilterString,In7,"Input vector",std::vector,""); BBTK_INPUT(VectorFilterString,In8,"Input vector",std::vector,""); BBTK_INPUT(VectorFilterString,In9,"Input vector",std::vector,""); - 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,""); -- 2.47.1