]> Creatis software - bbtk.git/blob - packages/std/src/bbstdVectorFilterString.h
#3495 box VectorFilterString with EraseDuplicateLines option
[bbtk.git] / packages / std / src / bbstdVectorFilterString.h
1 //===== 
2 // 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)
3 //===== 
4 #ifndef __bbstdVectorFilterString_h_INCLUDED__
5 #define __bbstdVectorFilterString_h_INCLUDED__
6
7 #include "bbstd_EXPORT.h"
8 #include "bbtkAtomicBlackBox.h"
9 #include "iostream"
10
11 namespace bbstd
12 {
13
14 class bbstd_EXPORT VectorFilterString
15  : 
16    public bbtk::AtomicBlackBox
17 {
18   BBTK_BLACK_BOX_INTERFACE(VectorFilterString,bbtk::AtomicBlackBox);
19 //===== 
20 // 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)
21 //===== 
22   BBTK_DECLARE_INPUT(In0,std::vector<std::string>);
23   BBTK_DECLARE_INPUT(In1,std::vector<std::string>);
24   BBTK_DECLARE_INPUT(In2,std::vector<std::string>);
25   BBTK_DECLARE_INPUT(In3,std::vector<std::string>);
26   BBTK_DECLARE_INPUT(In4,std::vector<std::string>);
27   BBTK_DECLARE_INPUT(In5,std::vector<std::string>);
28   BBTK_DECLARE_INPUT(In6,std::vector<std::string>);
29   BBTK_DECLARE_INPUT(In7,std::vector<std::string>);
30   BBTK_DECLARE_INPUT(In8,std::vector<std::string>);
31   BBTK_DECLARE_INPUT(In9,std::vector<std::string>);
32   BBTK_DECLARE_INPUT(Type,int);
33   BBTK_DECLARE_INPUT(sk1,std::string);
34   BBTK_DECLARE_INPUT(sk2,std::string);
35
36   BBTK_DECLARE_OUTPUT(Out0,std::vector<std::string>);
37   BBTK_DECLARE_OUTPUT(Out1,std::vector<std::string>);
38   BBTK_DECLARE_OUTPUT(Out2,std::vector<std::string>);
39   BBTK_DECLARE_OUTPUT(Out3,std::vector<std::string>);
40   BBTK_DECLARE_OUTPUT(Out4,std::vector<std::string>);
41   BBTK_DECLARE_OUTPUT(Out5,std::vector<std::string>);
42   BBTK_DECLARE_OUTPUT(Out6,std::vector<std::string>);
43   BBTK_DECLARE_OUTPUT(Out7,std::vector<std::string>);
44   BBTK_DECLARE_OUTPUT(Out8,std::vector<std::string>);
45   BBTK_DECLARE_OUTPUT(Out9,std::vector<std::string>);
46   BBTK_PROCESS(Process);
47     void Process();
48     void CountConnectedRepetitions();
49     void ConnectionRepetitions( std::vector<std::string> vIn,std::vector<std::string> *vOut );
50     void FilterByFindinIn0();
51     void InsertStringPos();
52     void InvertLists();
53     void SwitchElement(std::vector<std::string> *pVec, int id1, int id2 );
54     void OrderLists();
55     void SubString();
56     void EraseDuplicateLines();
57     
58 //===== 
59 // 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)
60 //===== 
61 };
62
63 BBTK_BEGIN_DESCRIBE_BLACK_BOX(VectorFilterString,bbtk::AtomicBlackBox);
64   BBTK_NAME("VectorFilterString");
65   BBTK_AUTHOR("InfoDev");
66   BBTK_DESCRIPTION("No Description.");
67   BBTK_CATEGORY("empty");
68
69   BBTK_INPUT(VectorFilterString,In0,"Input vector",std::vector<std::string>,"");
70   BBTK_INPUT(VectorFilterString,In1,"Input vector",std::vector<std::string>,"");
71   BBTK_INPUT(VectorFilterString,In2,"Input vector",std::vector<std::string>,"");
72   BBTK_INPUT(VectorFilterString,In3,"Input vector",std::vector<std::string>,"");
73   BBTK_INPUT(VectorFilterString,In4,"Input vector",std::vector<std::string>,"");
74   BBTK_INPUT(VectorFilterString,In5,"Input vector",std::vector<std::string>,"");
75   BBTK_INPUT(VectorFilterString,In6,"Input vector",std::vector<std::string>,"");
76   BBTK_INPUT(VectorFilterString,In7,"Input vector",std::vector<std::string>,"");
77   BBTK_INPUT(VectorFilterString,In8,"Input vector",std::vector<std::string>,"");
78   BBTK_INPUT(VectorFilterString,In9,"Input vector",std::vector<std::string>,"");
79   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 ),  4:Invert input lists, 5:Order lists with (string)In0 criterius,  6:Order lists with  (double)In0 criterius,  7:sub string sk1=pos sk2=len for all lists,   8:Erase duplicated lines  In0..In9  9:Erase duplicated lines based in In0   ",int,"");
80   BBTK_INPUT(VectorFilterString,sk1,"constant 1",std::string,"");
81   BBTK_INPUT(VectorFilterString,sk2,"constant 2",std::string,"");
82
83   BBTK_OUTPUT(VectorFilterString,Out0,"First output",std::vector<std::string>,"");
84   BBTK_OUTPUT(VectorFilterString,Out1,"First output",std::vector<std::string>,"");
85   BBTK_OUTPUT(VectorFilterString,Out2,"First output",std::vector<std::string>,"");
86   BBTK_OUTPUT(VectorFilterString,Out3,"First output",std::vector<std::string>,"");
87   BBTK_OUTPUT(VectorFilterString,Out4,"First output",std::vector<std::string>,"");
88   BBTK_OUTPUT(VectorFilterString,Out5,"First output",std::vector<std::string>,"");
89   BBTK_OUTPUT(VectorFilterString,Out6,"First output",std::vector<std::string>,"");
90   BBTK_OUTPUT(VectorFilterString,Out7,"First output",std::vector<std::string>,"");
91   BBTK_OUTPUT(VectorFilterString,Out8,"First output",std::vector<std::string>,"");
92   BBTK_OUTPUT(VectorFilterString,Out9,"First output",std::vector<std::string>,"");
93
94 BBTK_END_DESCRIBE_BLACK_BOX(VectorFilterString);
95 //===== 
96 // 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)
97 //===== 
98 }
99 // EO namespace bbstd
100
101 #endif // __bbstdVectorFilterString_h_INCLUDED__
102