X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk_Slicer_PKG%2Fsrc%2FbbSlicerSlicerLibDirToBlackBoxSrc.h;fp=bbtk_Slicer_PKG%2Fsrc%2FbbSlicerSlicerLibDirToBlackBoxSrc.h;h=0742501c7eb29d4698c8491e0e9d7c28d28ca39d;hb=b7a0497a4afc48d5230c279aeab20eb756e4427b;hp=0000000000000000000000000000000000000000;hpb=462cbc78485df39d3141c2d1e6137c4b78ab5db2;p=creaCLI.git diff --git a/bbtk_Slicer_PKG/src/bbSlicerSlicerLibDirToBlackBoxSrc.h b/bbtk_Slicer_PKG/src/bbSlicerSlicerLibDirToBlackBoxSrc.h new file mode 100644 index 0000000..0742501 --- /dev/null +++ b/bbtk_Slicer_PKG/src/bbSlicerSlicerLibDirToBlackBoxSrc.h @@ -0,0 +1,69 @@ +#ifndef __bbSlicerSlicerLibDirToBlackBoxSrc_h_INCLUDED__ +#define __bbSlicerSlicerLibDirToBlackBoxSrc_h_INCLUDED__ + +#include "bbSlicer_EXPORT.h" +#include "bbtkAtomicBlackBox.h" + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#include "CreationTool.h" + +namespace bbSlicer { + + class bbSlicer_EXPORT SlicerLibDirToBlackBoxSrc + : + public bbtk::AtomicBlackBox { + BBTK_BLACK_BOX_INTERFACE ( SlicerLibDirToBlackBoxSrc , bbtk::AtomicBlackBox ) ; + BBTK_DECLARE_INPUT ( LibDirectoryFullPath , 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 ( SlicerLibDirToBlackBoxSrc , bbtk::AtomicBlackBox ) ; + BBTK_NAME ( "SlicerLibDirToBlackBoxSrc" ) ; + BBTK_AUTHOR ( "Juan gabriel RIVEROS REYES" ) ; + BBTK_DESCRIPTION ( "Generates all C++ source code from all Slicers shared libs in a directory for later compilation" ) ; + BBTK_CATEGORY ( "" ) ; + BBTK_INPUT ( SlicerLibDirToBlackBoxSrc , LibDirectoryFullPath , "Full path to shared libraries' directory" , std::string , "" ) ; + BBTK_INPUT ( SlicerLibDirToBlackBoxSrc , SrcDestinationDir , "Source code destination directory" , std::string , "" ) ; + BBTK_END_DESCRIBE_BLACK_BOX ( SlicerLibDirToBlackBoxSrc ) ; + +} + +#endif +