1 #ifndef __bbSlicerSlicerLibToBlackBoxSrc_h_INCLUDED__
2 #define __bbSlicerSlicerLibToBlackBoxSrc_h_INCLUDED__
3 #include "bbSlicer_EXPORT.h"
4 #include "bbtkAtomicBlackBox.h"
19 #include <ModuleDescriptionParser.h>
20 #include <ModuleParameterGroup.h>
21 #include <ModuleDescription.h>
22 #include <ModuleParameter.h>
24 #include <ModuleDescriptionUtilities.h>
26 #include "CreationTool.h"
30 class bbSlicer_EXPORT SlicerLibToBlackBoxSrc
32 public bbtk::AtomicBlackBox {
33 BBTK_BLACK_BOX_INTERFACE ( SlicerLibToBlackBoxSrc , bbtk::AtomicBlackBox ) ;
34 BBTK_DECLARE_INPUT ( LibFullPath , std::string ) ;
35 BBTK_DECLARE_INPUT ( SrcDestinationDir , std::string ) ;
36 BBTK_PROCESS ( Process ) ;
39 /// STD LD_OPEN CALLS ///
40 char* getModuleDescription ( const std::string lib ) ;
42 void saveFile ( const std::string content , const std::string file_name ) ;
43 std::string loadFile ( const std::string filename ) ;
44 std::string loadDummyBody ( ) ;
45 std::string loadDummyHeader ( ) ;
46 /// BBTK BOX CREATION ///
47 std::string updateBoxDescription ( const ModuleDescription* module , std::string _header ) ;
48 std::string updateBoxName ( const ModuleDescription* module , std::string content ) ;
49 std::string getHeaderFileName ( const ModuleDescription* module ) ;
50 std::string getBodyFileName ( const ModuleDescription* module ) ;
51 std::string updateBoxInputs ( const ModuleDescription* module , std::string content ) ;
52 const int getNumberOfArguments ( const ModuleDescription* module ) ;
53 std::string updateProcessMethod ( const ModuleDescription* module , std::string content , std::string lib ) ;
54 std::vector < std::string > getFilesByExtention ( std::string dir , std::string ext ) ;
57 BBTK_BEGIN_DESCRIBE_BLACK_BOX ( SlicerLibToBlackBoxSrc , bbtk::AtomicBlackBox ) ;
58 BBTK_NAME ( "SlicerLibToBlackBoxSrc" ) ;
59 BBTK_AUTHOR ( "Juan Gabriel RIVEROS REYES" ) ;
60 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" ) ;
61 BBTK_CATEGORY ( "" ) ;
62 BBTK_INPUT ( SlicerLibToBlackBoxSrc , LibFullPath , "Library full path" , std::string , "" ) ;
63 BBTK_INPUT ( SlicerLibToBlackBoxSrc , SrcDestinationDir , "Source code destination directory" , std::string , "" ) ;
64 BBTK_END_DESCRIBE_BLACK_BOX ( SlicerLibToBlackBoxSrc ) ;