From: espinosa Date: Tue, 31 Mar 2015 09:09:55 +0000 (+0200) Subject: #2560 BBTK Feature New Normal - bbstd package : WriteColumnsString X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=e897f6dace779d7d6b7870f3345b108a2dbf2c5c;p=bbtk.git #2560 BBTK Feature New Normal - bbstd package : WriteColumnsString --- diff --git a/packages/std/src/bbstdWriteColumnsString.cxx b/packages/std/src/bbstdWriteColumnsString.cxx new file mode 100644 index 0000000..064342e --- /dev/null +++ b/packages/std/src/bbstdWriteColumnsString.cxx @@ -0,0 +1,136 @@ +//===== +// 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::cout << "MLER WriteColumnsString::Process Start " << std::endl; + + + std::ofstream write_fi; + write_fi.open(bbGetInputFileName().c_str()); + + std::vector headers = bbGetInputHeaders(); //Headers Input + + 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; + + std::cout << "values size"<); + + BBTK_DECLARE_INPUT(lstData1,std::vector ); + BBTK_DECLARE_INPUT(lstData2,std::vector ); + BBTK_DECLARE_INPUT(lstData3,std::vector ); + BBTK_DECLARE_INPUT(lstData4,std::vector ); + BBTK_DECLARE_INPUT(lstData5,std::vector ); + BBTK_DECLARE_INPUT(lstData6,std::vector ); + BBTK_DECLARE_INPUT(lstData7,std::vector ); + BBTK_DECLARE_INPUT(lstData8,std::vector ); + BBTK_DECLARE_INPUT(lstData9,std::vector ); + + BBTK_DECLARE_OUTPUT(OutFileName,std::string); + BBTK_PROCESS(Process); + void Process(); +//===== +// 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) +//===== +}; + +BBTK_BEGIN_DESCRIBE_BLACK_BOX(WriteColumnsString,bbtk::AtomicBlackBox); +BBTK_NAME("WriteColumnsString"); +BBTK_AUTHOR("Monica ESPINOSA"); +BBTK_DESCRIPTION("Write Columns to file"); +BBTK_CATEGORY("read/write"); + +BBTK_INPUT(WriteColumnsString,FileName,"File name",std::string,""); +BBTK_INPUT(WriteColumnsString,Headers,"Headers of Columns",std::vector,""); + +BBTK_INPUT(WriteColumnsString,lstData1,"vector of data",std::vector,""); +BBTK_INPUT(WriteColumnsString,lstData2,"vector of data",std::vector,""); +BBTK_INPUT(WriteColumnsString,lstData3,"vector of data",std::vector,""); +BBTK_INPUT(WriteColumnsString,lstData4,"vector of data",std::vector,""); +BBTK_INPUT(WriteColumnsString,lstData5,"vector of data",std::vector,""); +BBTK_INPUT(WriteColumnsString,lstData6,"vector of data",std::vector,""); +BBTK_INPUT(WriteColumnsString,lstData7,"vector of data",std::vector,""); +BBTK_INPUT(WriteColumnsString,lstData8,"vector of data",std::vector,""); +BBTK_INPUT(WriteColumnsString,lstData9,"vector of data",std::vector,""); + +BBTK_OUTPUT(WriteColumnsString,OutFileName,"File Name",std::string,""); +BBTK_END_DESCRIBE_BLACK_BOX(WriteColumnsString); +//===== +// 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) +//===== +} +// EO namespace bbstd + +#endif // __bbstdWriteColumnsString_h_INCLUDED__ +