//===== // 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) //===== #include "bbstdWriteColumnsString.h" #include "bbstdPackage.h" namespace bbstd { BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,WriteColumnsString) BBTK_BLACK_BOX_IMPLEMENTATION(WriteColumnsString,bbtk::AtomicBlackBox); //===== // 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) //===== void WriteColumnsString::Process() { std::ofstream write_fi; write_fi.open(bbGetInputFileName().c_str()); std::vector headers = bbGetInputHeaders(); //Headers Input bool onHeaders = bbGetInputOnHeaders(); std::vector > values; values.push_back(bbGetInputlstData1()); values.push_back(bbGetInputlstData2()); values.push_back(bbGetInputlstData3()); values.push_back(bbGetInputlstData4()); values.push_back(bbGetInputlstData5()); values.push_back(bbGetInputlstData6()); values.push_back(bbGetInputlstData7()); values.push_back(bbGetInputlstData8()); values.push_back(bbGetInputlstData9()); std::vector >::iterator it; for(it = values.begin() ; it != values.end() ; ) { if((*it).empty()) { it = values.erase(it); }else { it++; } } if(write_fi.is_open()) { if(onHeaders == true) // If onHeaders is true, the file is write with Headers. { //Add each header input write to file for(unsigned int i=0 ;i< headers.size(); i++ ) { if(i==(headers.size()-1)) { write_fi << headers[i] << "\n"; }else{ write_fi << headers[i] << "\t"; } }//for headersSize } unsigned int colSize = values[0].size(); for(unsigned int j=0;j