X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk_Slicer_PKG%2Fsrc%2FbbSlicerSlicerLibToBlackBoxSrc.h;fp=bbtk_Slicer_PKG%2Fsrc%2FbbSlicerSlicerLibToBlackBoxSrc.h;h=1fa3670df1941cf0dfaefeae7e9495d8e45bc04a;hb=b7a0497a4afc48d5230c279aeab20eb756e4427b;hp=0000000000000000000000000000000000000000;hpb=462cbc78485df39d3141c2d1e6137c4b78ab5db2;p=creaCLI.git diff --git a/bbtk_Slicer_PKG/src/bbSlicerSlicerLibToBlackBoxSrc.h b/bbtk_Slicer_PKG/src/bbSlicerSlicerLibToBlackBoxSrc.h new file mode 100644 index 0000000..1fa3670 --- /dev/null +++ b/bbtk_Slicer_PKG/src/bbSlicerSlicerLibToBlackBoxSrc.h @@ -0,0 +1,69 @@ +#ifndef __bbSlicerSlicerLibToBlackBoxSrc_h_INCLUDED__ +#define __bbSlicerSlicerLibToBlackBoxSrc_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 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 +