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)
4 #include "bbstdVectorFilterString.h"
5 #include "bbstdPackage.h"
9 BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,VectorFilterString)
10 BBTK_BLACK_BOX_IMPLEMENTATION(VectorFilterString,bbtk::AtomicBlackBox);
12 // 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)
15 void VectorFilterString::ConnectionRepetitions( std::vector<std::string> vIn,std::vector<std::string> *vOut )
17 int i,size=vIn.size();
22 if (vIn[i].compare( vIn[itmp])==0)
27 vOut->push_back(std::to_string(acum));
31 vOut->push_back(std::to_string(acum));
34 void VectorFilterString::Process()
37 // THE MAIN PROCESSING METHOD BODY
38 // Here we simply set the input 'In' value to the output 'Out'
39 // And print out the output value
40 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
41 // void bbSet{Input|Output}NAME(const TYPE&)
42 // const TYPE& bbGet{Input|Output}NAME() const
44 // * NAME is the name of the input/output
45 // (the one provided in the attribute 'name' of the tag 'input')
46 // * TYPE is the C++ type of the input/output
47 // (the one provided in the attribute 'type' of the tag 'input')
49 // bbSetOutputOut( bbGetInputIn() );
50 // std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
52 if (bbGetInputType()==0)
54 std::vector<std::string> vOut0;
55 std::vector<std::string> vOut1;
56 std::vector<std::string> vOut2;
57 std::vector<std::string> vOut3;
58 std::vector<std::string> vOut4;
59 std::vector<std::string> vOut5;
60 std::vector<std::string> vOut6;
61 std::vector<std::string> vOut7;
62 std::vector<std::string> vOut8;
63 std::vector<std::string> vOut9;
64 ConnectionRepetitions( bbGetInputIn0() , &vOut0 );
65 ConnectionRepetitions( bbGetInputIn1() , &vOut1 );
66 ConnectionRepetitions( bbGetInputIn2() , &vOut2 );
67 ConnectionRepetitions( bbGetInputIn3() , &vOut3 );
68 ConnectionRepetitions( bbGetInputIn4() , &vOut4 );
69 ConnectionRepetitions( bbGetInputIn5() , &vOut5 );
70 ConnectionRepetitions( bbGetInputIn6() , &vOut6 );
71 ConnectionRepetitions( bbGetInputIn7() , &vOut7 );
72 ConnectionRepetitions( bbGetInputIn8() , &vOut8 );
73 ConnectionRepetitions( bbGetInputIn9() , &vOut9 );
74 bbSetOutputOut0( vOut0 );
75 bbSetOutputOut1( vOut1 );
76 bbSetOutputOut2( vOut2 );
77 bbSetOutputOut3( vOut3 );
78 bbSetOutputOut4( vOut4 );
79 bbSetOutputOut5( vOut5 );
80 bbSetOutputOut6( vOut6 );
81 bbSetOutputOut7( vOut7 );
82 bbSetOutputOut8( vOut8 );
83 bbSetOutputOut9( vOut9 );
90 // 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)
92 void VectorFilterString::bbUserSetDefaultValues()
95 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
96 // Here we initialize the input 'In' to 0
101 // 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)
103 void VectorFilterString::bbUserInitializeProcessing()
106 // THE INITIALIZATION METHOD BODY :
108 // but this is where you should allocate the internal/output pointers
114 // 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)
116 void VectorFilterString::bbUserFinalizeProcessing()
119 // THE FINALIZATION METHOD BODY :
121 // but this is where you should desallocate the internal/output pointers
126 // EO namespace bbstd