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 #ifndef __bbstdTransposeVectors_h_INCLUDED__
5 #define __bbstdTransposeVectors_h_INCLUDED__
6 #include "bbstd_EXPORT.h"
7 #include "bbtkAtomicBlackBox.h"
13 class bbstd_EXPORT TransposeVectors
15 public bbtk::AtomicBlackBox
17 BBTK_TEMPLATE_BLACK_BOX_INTERFACE(TransposeVectors,bbtk::AtomicBlackBox,T);
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)
22 BBTK_DECLARE_INPUT(In0,std::vector<T>);
23 BBTK_DECLARE_INPUT(In1,std::vector<T>);
24 BBTK_DECLARE_INPUT(In2,std::vector<T>);
25 BBTK_DECLARE_INPUT(In3,std::vector<T>);
26 BBTK_DECLARE_INPUT(In4,std::vector<T>);
27 BBTK_DECLARE_INPUT(In5,std::vector<T>);
28 BBTK_DECLARE_INPUT(In6,std::vector<T>);
29 BBTK_DECLARE_INPUT(In7,std::vector<T>);
30 BBTK_DECLARE_INPUT(In8,std::vector<T>);
31 BBTK_DECLARE_INPUT(In9,std::vector<T>);
32 BBTK_DECLARE_OUTPUT(Out0,std::vector<T>);
33 BBTK_DECLARE_OUTPUT(Out1,std::vector<T>);
34 BBTK_DECLARE_OUTPUT(Out2,std::vector<T>);
35 BBTK_DECLARE_OUTPUT(Out3,std::vector<T>);
36 BBTK_DECLARE_OUTPUT(Out4,std::vector<T>);
37 BBTK_DECLARE_OUTPUT(Out5,std::vector<T>);
38 BBTK_DECLARE_OUTPUT(Out6,std::vector<T>);
39 BBTK_DECLARE_OUTPUT(Out7,std::vector<T>);
40 BBTK_DECLARE_OUTPUT(Out8,std::vector<T>);
41 BBTK_DECLARE_OUTPUT(Out9,std::vector<T>);
45 // 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)
48 BBTK_BEGIN_DESCRIBE_TEMPLATE_BLACK_BOX(TransposeVectors,bbtk::AtomicBlackBox);
49 BBTK_NAME("TransposeVector"+bbtk::HumanTypeName<std::vector<T> >());
50 BBTK_AUTHOR("Info-Dev");
51 BBTK_DESCRIPTION("No Description.");
52 BBTK_CATEGORY("empty");
55 typedef std::vector<T> Tvector;
56 BBTK_TEMPLATE_INPUT(TransposeVectors,In0,"Vector input",Tvector);
57 BBTK_TEMPLATE_INPUT(TransposeVectors,In1,"Vector input",Tvector);
58 BBTK_TEMPLATE_INPUT(TransposeVectors,In2,"Vector input",Tvector);
59 BBTK_TEMPLATE_INPUT(TransposeVectors,In3,"Vector input",Tvector);
60 BBTK_TEMPLATE_INPUT(TransposeVectors,In4,"Vector input",Tvector);
61 BBTK_TEMPLATE_INPUT(TransposeVectors,In5,"Vector input",Tvector);
62 BBTK_TEMPLATE_INPUT(TransposeVectors,In6,"Vector input",Tvector);
63 BBTK_TEMPLATE_INPUT(TransposeVectors,In7,"Vector input",Tvector);
64 BBTK_TEMPLATE_INPUT(TransposeVectors,In8,"Vector input",Tvector);
65 BBTK_TEMPLATE_INPUT(TransposeVectors,In9,"Vector input",Tvector);
67 BBTK_TEMPLATE_OUTPUT(TransposeVectors,Out0,"Vector output",Tvector);
68 BBTK_TEMPLATE_OUTPUT(TransposeVectors,Out1,"Vector output",Tvector);
69 BBTK_TEMPLATE_OUTPUT(TransposeVectors,Out2,"Vector output",Tvector);
70 BBTK_TEMPLATE_OUTPUT(TransposeVectors,Out3,"Vector output",Tvector);
71 BBTK_TEMPLATE_OUTPUT(TransposeVectors,Out4,"Vector output",Tvector);
72 BBTK_TEMPLATE_OUTPUT(TransposeVectors,Out5,"Vector output",Tvector);
73 BBTK_TEMPLATE_OUTPUT(TransposeVectors,Out6,"Vector output",Tvector);
74 BBTK_TEMPLATE_OUTPUT(TransposeVectors,Out7,"Vector output",Tvector);
75 BBTK_TEMPLATE_OUTPUT(TransposeVectors,Out8,"Vector output",Tvector);
76 BBTK_TEMPLATE_OUTPUT(TransposeVectors,Out9,"Vector output",Tvector);
78 BBTK_END_DESCRIBE_TEMPLATE_BLACK_BOX(TransposeVectors);
81 //=================================================================
83 void TransposeVectors<T>::DoIt()
86 std::vector<T> tmpVec;
101 unsigned int s0 = bbGetInputIn0().size();
102 unsigned int s1 = bbGetInputIn1().size();
103 unsigned int s2 = bbGetInputIn2().size();
104 unsigned int s3 = bbGetInputIn3().size();
105 unsigned int s4 = bbGetInputIn4().size();
106 unsigned int s5 = bbGetInputIn5().size();
107 unsigned int s6 = bbGetInputIn6().size();
108 unsigned int s7 = bbGetInputIn7().size();
109 unsigned int s8 = bbGetInputIn8().size();
110 unsigned int s9 = bbGetInputIn9().size();
113 if (s0>0) { jSize++; }
114 if (s1>0) { jSize++; }
115 if (s2>0) { jSize++; }
116 if (s3>0) { jSize++; }
117 if (s4>0) { jSize++; }
118 if (s5>0) { jSize++; }
119 if (s6>0) { jSize++; }
120 if (s7>0) { jSize++; }
121 if (s8>0) { jSize++; }
122 if (s9>0) { jSize++; }
125 for (j=0;j<jSize;j++)
128 if (j==0){ tmpVec = bbGetInputIn0(); }
129 if (j==1){ tmpVec = bbGetInputIn1(); }
130 if (j==2){ tmpVec = bbGetInputIn2(); }
131 if (j==3){ tmpVec = bbGetInputIn3(); }
132 if (j==4){ tmpVec = bbGetInputIn4(); }
133 if (j==5){ tmpVec = bbGetInputIn5(); }
134 if (j==6){ tmpVec = bbGetInputIn6(); }
135 if (j==7){ tmpVec = bbGetInputIn7(); }
136 if (j==8){ tmpVec = bbGetInputIn8(); }
137 if (j==9){ tmpVec = bbGetInputIn9(); }
140 if (tmpVec.size()<=s0 )
142 if (i==0){ out0.push_back( tmpVec[i] ); }
143 if (i==1){ out1.push_back( tmpVec[i] ); }
144 if (i==2){ out2.push_back( tmpVec[i] ); }
145 if (i==3){ out3.push_back( tmpVec[i] ); }
146 if (i==4){ out4.push_back( tmpVec[i] ); }
147 if (i==5){ out5.push_back( tmpVec[i] ); }
148 if (i==6){ out6.push_back( tmpVec[i] ); }
149 if (i==7){ out7.push_back( tmpVec[i] ); }
150 if (i==8){ out8.push_back( tmpVec[i] ); }
151 if (i==9){ out9.push_back( tmpVec[i] ); }
152 } // if //tmpVec size
155 bbSetOutputOut0(out0);
156 bbSetOutputOut1(out1);
157 bbSetOutputOut2(out2);
158 bbSetOutputOut3(out3);
159 bbSetOutputOut4(out4);
160 bbSetOutputOut5(out5);
161 bbSetOutputOut6(out6);
162 bbSetOutputOut7(out7);
163 bbSetOutputOut8(out8);
164 bbSetOutputOut9(out9);
166 //=================================================================
168 //=================================================================
170 void TransposeVectors<T>::bbUserSetDefaultValues()
173 //=================================================================
175 void TransposeVectors<T>::bbUserInitializeProcessing()
178 //=================================================================
180 void TransposeVectors<T>::bbUserFinalizeProcessing()
183 //=================================================================
190 // 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)
193 // EO namespace bbstd
195 #endif // __bbstdTransposeVectors_h_INCLUDED__