//===== // 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 "bbcreaMiniToolsCreateReport01.h" #include "bbcreaMiniToolsPackage.h" namespace bbcreaMiniTools { BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMiniTools,CreateReport01) BBTK_BLACK_BOX_IMPLEMENTATION(CreateReport01,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 CreateReport01::Process() { // THE MAIN PROCESSING METHOD BODY // Here we simply set the input 'In' value to the output 'Out' // And print out the output value // INPUT/OUTPUT ACCESSORS ARE OF THE FORM : // void bbSet{Input|Output}NAME(const TYPE&) // const TYPE& bbGet{Input|Output}NAME() const // Where : // * NAME is the name of the input/output // (the one provided in the attribute 'name' of the tag 'input') // * TYPE is the C++ type of the input/output // (the one provided in the attribute 'type' of the tag 'input') // bbSetOutputOut( bbGetInputIn() ); // std::cout << "Output value = " < lstPatients = bbGetInputLstPatientsID(); std::vector lstTitles1 = bbGetInputLstTitles1(); std::vector lstTitles2 = bbGetInputLstTitles2(); std::vector lstStepsPath = bbGetInputLstStepsPath(); std::vector lstCommentsPath= bbGetInputLstCommentsPath(); std::vector lstOut00; std::vector lstOut01; std::vector lstOut02; std::vector lstOut03; std::vector lstOut04; std::vector lstOut05; std::vector lstOut06; std::vector lstOut07; std::vector lstOut08; std::vector lstOut09; std::vector lstOut10; std::vector< std::vector* > pLstOut; pLstOut.push_back( &lstOut00 ); pLstOut.push_back( &lstOut01 ); pLstOut.push_back( &lstOut02 ); pLstOut.push_back( &lstOut03 ); pLstOut.push_back( &lstOut04 ); pLstOut.push_back( &lstOut05 ); pLstOut.push_back( &lstOut06 ); pLstOut.push_back( &lstOut07 ); pLstOut.push_back( &lstOut08 ); pLstOut.push_back( &lstOut09 ); pLstOut.push_back( &lstOut10 ); int iTitle2,sizeTitles2 = lstTitles2.size(); for (iTitle2=0 ; iTitle2push_back( lstTitles2[iTitle2] ); pLstOut[iTitle2]->push_back( " " ); } // for iTitle2 int id; int i,sizeLstPatientsID = lstPatients.size(); int j,sizeLstStepsPath = lstStepsPath.size(); int jj,sizeLstCommentsPath = lstCommentsPath.size(); std::string stdPATIENT(""); std::string pathFile; FILE *ff; char tmpTitle[255]; char tmpValue[255]; for ( i=0 ; ipush_back( lstPatients[i] ); pLstOut[0]->push_back( " " ); pLstOut[0]->push_back( " " ); pLstOut[0]->push_back( " " ); pLstOut[0]->push_back( " " ); for (j=0; jpush_back( tmpValue ); fscanf(ff,"%s ",tmpTitle); // State fscanf(ff,"%s ",tmpValue); // pLstOut[id]->push_back( tmpValue ); fscanf(ff,"%s ",tmpTitle); // Date fscanf(ff,"%s ",tmpValue); // pLstOut[id]->push_back( tmpValue ); fscanf(ff,"%s ",tmpTitle); // Time fscanf(ff,"%s ",tmpValue); // pLstOut[id]->push_back( tmpValue ); pLstOut[id]->push_back( " " ); fclose(ff); } else { pLstOut[id]->push_back( " " ); pLstOut[id]->push_back( " " ); pLstOut[id]->push_back( " " ); pLstOut[id]->push_back( " " ); pLstOut[id]->push_back( " " ); }// if ff } // for j for ( jj=0; jjpush_back( tmpValue ); pLstOut[id]->push_back( " " ); pLstOut[id]->push_back( " " ); pLstOut[id]->push_back( " " ); pLstOut[id]->push_back( " " ); fclose(ff); } else { pLstOut[id]->push_back( " " ); pLstOut[id]->push_back( " " ); pLstOut[id]->push_back( " " ); pLstOut[id]->push_back( " " ); pLstOut[id]->push_back( " " ); }// if ff } // for j } // for i bbSetOutputOut00( lstOut00 ); bbSetOutputOut01( lstOut01 ); bbSetOutputOut02( lstOut02 ); bbSetOutputOut03( lstOut03 ); bbSetOutputOut04( lstOut04 ); bbSetOutputOut05( lstOut05 ); bbSetOutputOut06( lstOut06 ); bbSetOutputOut07( lstOut07 ); bbSetOutputOut08( lstOut08 ); bbSetOutputOut09( lstOut09 ); bbSetOutputOut10( lstOut10 ); } //===== // 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 CreateReport01::bbUserSetDefaultValues() { // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX // Here we initialize the input 'In' to 0 // bbSetInputIn(0); } //===== // 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 CreateReport01::bbUserInitializeProcessing() { // THE INITIALIZATION METHOD BODY : // Here does nothing // but this is where you should allocate the internal/output pointers // if any } //===== // 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 CreateReport01::bbUserFinalizeProcessing() { // THE FINALIZATION METHOD BODY : // Here does nothing // but this is where you should desallocate the internal/output pointers // if any } } // EO namespace bbcreaMiniTools