1 #ifndef __bbSlicerSlicerLibDirToBlackBoxSrc_h_INCLUDED__
2 #define __bbSlicerSlicerLibDirToBlackBoxSrc_h_INCLUDED__
4 #include "bbSlicer_EXPORT.h"
5 #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 SlicerLibDirToBlackBoxSrc
32 public bbtk::AtomicBlackBox {
33 BBTK_BLACK_BOX_INTERFACE ( SlicerLibDirToBlackBoxSrc , bbtk::AtomicBlackBox ) ;
34 BBTK_DECLARE_INPUT ( LibDirectoryFullPath , 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 ( SlicerLibDirToBlackBoxSrc , bbtk::AtomicBlackBox ) ;
58 BBTK_NAME ( "SlicerLibDirToBlackBoxSrc" ) ;
59 BBTK_AUTHOR ( "Juan gabriel RIVEROS REYES" ) ;
60 BBTK_DESCRIPTION ( "Generates all C++ source code from all Slicers shared libs in a directory for later compilation" ) ;
61 BBTK_CATEGORY ( "" ) ;
62 BBTK_INPUT ( SlicerLibDirToBlackBoxSrc , LibDirectoryFullPath , "Full path to shared libraries' directory" , std::string , "" ) ;
63 BBTK_INPUT ( SlicerLibDirToBlackBoxSrc , SrcDestinationDir , "Source code destination directory" , std::string , "" ) ;
64 BBTK_END_DESCRIBE_BLACK_BOX ( SlicerLibDirToBlackBoxSrc ) ;