X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk_Slicer_PKG%2Fsrc%2FbbSlicerModuleWrapper.h;fp=bbtk_Slicer_PKG%2Fsrc%2FbbSlicerModuleWrapper.h;h=5dbb45825ee7784e81e625dc0d1a641694afb294;hb=ba07bca141bd819a79c6684aa1b56b0a705aa664;hp=0000000000000000000000000000000000000000;hpb=b7eae6222a248a38098c688c9653e0d11ac8bcdc;p=creaCLI.git diff --git a/bbtk_Slicer_PKG/src/bbSlicerModuleWrapper.h b/bbtk_Slicer_PKG/src/bbSlicerModuleWrapper.h new file mode 100644 index 0000000..5dbb458 --- /dev/null +++ b/bbtk_Slicer_PKG/src/bbSlicerModuleWrapper.h @@ -0,0 +1,73 @@ +#ifndef __bbSlicerModuleWrapper_h_INCLUDED__ +#define __bbSlicerModuleWrapper_h_INCLUDED__ + +#include "bbSlicer_EXPORT.h" +#include "bbtkAtomicBlackBox.h" +#include "iostream" + + +#include +#include +#include +#include +#include + + +#include +#include +#include +#include + +#include +#include + +#include "CreationTool.h" + +namespace bbSlicer { + + class bbSlicer_EXPORT ModuleWrapper + : + public bbtk::AtomicBlackBox { + BBTK_BLACK_BOX_INTERFACE ( ModuleWrapper , bbtk::AtomicBlackBox ) ; + BBTK_DECLARE_INPUT ( Path_to_library , std::string ) ; + BBTK_DECLARE_INPUT ( Path_to_souce , std::string ) ; + BBTK_PROCESS ( Process ) ; + void Process ( ) ; + private: + /// STD LD_OPEN CALLS /// + + char* getModuleDescription ( std::string lib ) ; + + /// FILE RELATED /// + + void saveFile ( std::string content , std::string file_name ) ; + std::string loadFile ( std::string filename ) ; + std::string loadDummyHeader ( ) ; + std::string loadDummyBody ( ) ; + + /// BBTK BOX CREATION /// + + std::string updateProcessMethod ( const ModuleDescription* module , std::string content , std::string lib ) ; + std::string updateBoxDescription ( const ModuleDescription* module , std::string _header ) ; + std::string updateBoxInputs ( const ModuleDescription* module , std::string content ) ; + std::string updateBoxName ( const ModuleDescription* module , std::string content ) ; + const int getNumberOfArguments ( const ModuleDescription* module ) ; + std::string getHeaderFileName ( const ModuleDescription* module ) ; + std::string getBodyFileName ( const ModuleDescription* module ) ; + + } ; + + BBTK_BEGIN_DESCRIBE_BLACK_BOX ( ModuleWrapper , bbtk::AtomicBlackBox ) ; + BBTK_NAME ( "ModuleWrapper" ) ; + BBTK_AUTHOR ( "Juan Gabriel Riveros" ) ; + BBTK_DESCRIPTION ( "Interoperability Module" ) ; + BBTK_CATEGORY ( "Interoperability Module" ) ; + BBTK_INPUT ( ModuleWrapper , Path_to_library , "Shared library full path" , std::string , "" ) ; + BBTK_INPUT ( ModuleWrapper , Path_to_souce , "Slicer Interoperability pkg source directory" , std::string , "" ) ; + BBTK_END_DESCRIBE_BLACK_BOX ( ModuleWrapper ) ; + +} +// EO namespace bbSlicer + +#endif // __bbSlicerModuleWrapper_h_INCLUDED__ +