]> Creatis software - creaMiniTools.git/blobdiff - bbtk_package_creaMiniTools/src/bbcreaMiniToolsCreateReport01.cxx
#3421 template_creaPatientsSystem
[creaMiniTools.git] / bbtk_package_creaMiniTools / src / bbcreaMiniToolsCreateReport01.cxx
diff --git a/bbtk_package_creaMiniTools/src/bbcreaMiniToolsCreateReport01.cxx b/bbtk_package_creaMiniTools/src/bbcreaMiniToolsCreateReport01.cxx
new file mode 100644 (file)
index 0000000..c560157
--- /dev/null
@@ -0,0 +1,159 @@
+//===== 
+// 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 = " <<bbGetOutputOut() << std::endl;
+      
+    bbSetOutputLstTitles( bbGetInputLstTitles1() );
+    
+    std::vector<std::string> lstPatients    = bbGetInputLstPatientsID();
+    std::vector<std::string> lstTitles1     = bbGetInputLstTitles1();
+    std::vector<std::string> lstTitles2     = bbGetInputLstTitles2();
+    std::vector<std::string> lstStepsPath   = bbGetInputLstStepsPath();
+    std::vector<std::string> lstCommentsPath= bbGetInputLstCommentsPath();
+
+    std::vector<std::string> lstOut00;
+    std::vector<std::string> lstOut01;
+    std::vector<std::string> lstOut02;
+    std::vector<std::string> lstOut03;
+    std::vector<std::string> lstOut04;
+    std::vector<std::string> lstOut05;
+    std::vector<std::string> lstOut06;
+    std::vector<std::string> lstOut07;
+    std::vector<std::string> lstOut08;
+    std::vector<std::string> lstOut09;
+    std::vector<std::string> lstOut10;
+
+    std::vector< std::vector<std::string>* > 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 ; iTitle2<sizeTitles2 ; iTitle2++ )
+    {
+        pLstOut[iTitle2]->push_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();
+    for ( i=0 ;  i<sizeLstPatientsID ; i++ )
+    {
+        printf("EED CreateReport01::Process Patient:%s\n", lstPatients[i].c_str() );
+        pLstOut[0]->push_back( lstPatients[i] );
+        pLstOut[0]->push_back( " " );
+        pLstOut[0]->push_back( " " );
+        pLstOut[0]->push_back( " " );
+        
+        for (j=0; j<sizeLstStepsPath;j++)
+        {
+            id=j+1;
+            pLstOut[id]->push_back( "Step:"+std::to_string(j) );
+            pLstOut[id]->push_back( "2021/11/12" );
+            pLstOut[id]->push_back( "16h56" );
+            pLstOut[id]->push_back( " " );
+            printf("EED CreateReport01::Process Step:%s\n", lstStepsPath[j].c_str() );
+        } // for j
+
+        for ( jj=0; jj<sizeLstCommentsPath ; jj++ )
+        {
+            id=jj+1+sizeLstStepsPath;
+            pLstOut[id]->push_back( "Comment:"+std::to_string(jj) );
+            pLstOut[id]->push_back( "2021/11/12" );
+            pLstOut[id]->push_back( "16h56" );
+            pLstOut[id]->push_back( " " );
+            printf("EED CreateReport01::Process Comment:%s\n", lstCommentsPath[jj].c_str() );
+        } // 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
+
+