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 "bbstdWriteColumnsString.h"
5 #include "bbstdPackage.h"
9 BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,WriteColumnsString)
10 BBTK_BLACK_BOX_IMPLEMENTATION(WriteColumnsString,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)
14 void WriteColumnsString::Process()
17 std::cout << "MLER WriteColumnsString::Process Start " << std::endl;
19 std::ofstream write_fi;
20 write_fi.open(bbGetInputFileName().c_str());
21 //std::cout<<"write_fi "<<bbGetInputFileName().c_str()<<std::endl;
22 std::vector<std::string> headers = bbGetInputHeaders();
26 if(write_fi.is_open())
28 for(i=0 ;i< headers.size(); i++ )
30 write_fi << headers[i] << "\t";
33 for(j=0; j< bbGetInputlstData1().size();j++)
35 write_fi << bbGetInputlstData1()[j] << "\n";
38 std::cout<<"size Header"<<headers.size()<<std::endl;
41 }// if write_fi.is_open()
44 std::cout<<"No es posible abrir"<<std::endl;
49 bbSetOutputOutFileName("Prueba.txt");
51 std::cout << "MLER WriteColumnsString::End Process " << std::endl;
55 // 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)
57 void WriteColumnsString::bbUserSetDefaultValues()
60 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
61 // Here we initialize the input 'In' to 0
62 bbSetInputFileName("");
66 // 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)
68 void WriteColumnsString::bbUserInitializeProcessing()
71 // THE INITIALIZATION METHOD BODY :
73 // but this is where you should allocate the internal/output pointers
79 // 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)
81 void WriteColumnsString::bbUserFinalizeProcessing()
84 // THE FINALIZATION METHOD BODY :
86 // but this is where you should desallocate the internal/output pointers