2 * ExchangePlugin_ImportFeature.h
4 * Created on: Aug 28, 2014
8 #ifndef EXCHANGEPLUGIN_IMPORTFEATURE_H_
9 #define EXCHANGEPLUGIN_IMPORTFEATURE_H_
11 #include <ExchangePlugin.h>
12 #include <ModelAPI_Feature.h>
18 #define LibHandle HMODULE
19 #define LoadLib( name ) LoadLibrary( name )
20 #define GetProc GetProcAddress
21 #define UnLoadLib( handle ) FreeLibrary( handle );
24 #define LibHandle void*
25 #define LoadLib( name ) dlopen( name, RTLD_LAZY | RTLD_GLOBAL)
27 #define UnLoadLib( handle ) dlclose( handle );
30 class EXCHANGEPLUGIN_EXPORT ExchangePlugin_ImportFeature : public ModelAPI_Feature
34 inline static const std::string& ID()
36 static const std::string MY_IMPORT_ID("Import");
39 /// attribute name of referenced face
40 inline static const std::string& FILE_PATH_ID()
42 static const std::string MY_FILE_PATH_ID("import_file_selector");
43 return MY_FILE_PATH_ID;
46 ExchangePlugin_ImportFeature();
47 virtual ~ExchangePlugin_ImportFeature();
49 /// Returns the unique kind of a feature
50 virtual const std::string& getKind();
52 /// Request for initialization of data model of the feature: adding all attributes
53 virtual void initAttributes();
55 /// Computes or recomputes the results
56 virtual void execute();
58 virtual bool isInHistory()
64 bool importFile(const std::string& theFileName);
65 LibHandle loadImportPlugin(const std::string& theFormatName);
69 #endif /* IMPORT_IMPORTFEATURE_H_ */