]> Creatis software - creaCLI.git/blobdiff - bbtk_Slicer_PKG/src/bbSlicerSlicerLibToBlackBoxSrc.h
NOTES:
[creaCLI.git] / bbtk_Slicer_PKG / src / bbSlicerSlicerLibToBlackBoxSrc.h
diff --git a/bbtk_Slicer_PKG/src/bbSlicerSlicerLibToBlackBoxSrc.h b/bbtk_Slicer_PKG/src/bbSlicerSlicerLibToBlackBoxSrc.h
new file mode 100644 (file)
index 0000000..1fa3670
--- /dev/null
@@ -0,0 +1,69 @@
+#ifndef __bbSlicerSlicerLibToBlackBoxSrc_h_INCLUDED__
+#define __bbSlicerSlicerLibToBlackBoxSrc_h_INCLUDED__
+#include "bbSlicer_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+
+
+#include <vector>
+
+#include <cstdlib>
+#include <sstream>
+#include <iostream>
+#include <fstream>
+
+#include <stdio.h>
+#include <dlfcn.h>
+#include <string.h>
+#include <dirent.h>
+
+#include <ModuleDescriptionParser.h>
+#include <ModuleParameterGroup.h>
+#include <ModuleDescription.h>
+#include <ModuleParameter.h>
+
+#include <ModuleDescriptionUtilities.h>
+
+#include "CreationTool.h"
+
+namespace bbSlicer {
+
+    class bbSlicer_EXPORT SlicerLibToBlackBoxSrc
+    :
+    public bbtk::AtomicBlackBox {
+        BBTK_BLACK_BOX_INTERFACE ( SlicerLibToBlackBoxSrc , bbtk::AtomicBlackBox ) ;
+        BBTK_DECLARE_INPUT ( LibFullPath , std::string ) ;
+        BBTK_DECLARE_INPUT ( SrcDestinationDir , std::string ) ;
+        BBTK_PROCESS ( Process ) ;
+        void Process ( ) ;
+
+        ///     STD LD_OPEN CALLS       ///
+        char* getModuleDescription ( const std::string lib ) ;
+        ///     FILE RELATED     ///
+        void saveFile ( const std::string content , const std::string file_name ) ;
+        std::string loadFile ( const std::string filename ) ;
+        std::string loadDummyBody ( ) ;
+        std::string loadDummyHeader ( ) ;
+        ///     BBTK BOX CREATION       /// 
+        std::string updateBoxDescription ( const ModuleDescription* module , std::string _header ) ;
+        std::string updateBoxName ( const ModuleDescription* module , std::string content ) ;
+        std::string getHeaderFileName ( const ModuleDescription* module ) ;
+        std::string getBodyFileName ( const ModuleDescription* module ) ;
+        std::string updateBoxInputs ( const ModuleDescription* module , std::string content ) ;
+        const int getNumberOfArguments ( const ModuleDescription* module ) ;
+        std::string updateProcessMethod ( const ModuleDescription* module , std::string content , std::string lib ) ;
+        std::vector < std::string > getFilesByExtention ( std::string dir , std::string ext ) ;
+    } ;
+
+    BBTK_BEGIN_DESCRIBE_BLACK_BOX ( SlicerLibToBlackBoxSrc , bbtk::AtomicBlackBox ) ;
+    BBTK_NAME ( "SlicerLibToBlackBoxSrc" ) ;
+    BBTK_AUTHOR ( "Juan Gabriel RIVEROS REYES" ) ;
+    BBTK_DESCRIPTION ( "Creates a sigle bbtk box from a single slicers shared library The code generated by this box is intended for later compilation and plug in" ) ;
+    BBTK_CATEGORY ( "" ) ;
+    BBTK_INPUT ( SlicerLibToBlackBoxSrc , LibFullPath , "Library full path" , std::string , "" ) ;
+    BBTK_INPUT ( SlicerLibToBlackBoxSrc , SrcDestinationDir , "Source code destination directory" , std::string , "" ) ;
+    BBTK_END_DESCRIBE_BLACK_BOX ( SlicerLibToBlackBoxSrc ) ;
+
+}
+
+#endif 
+