Salome HOME
Use full attribute type name in INTERFACE_N
[modules/shaper.git] / src / ExchangeAPI / ExchangeAPI_Export.h
1 // Name   : ExchangeAPI_Export.h
2 // Purpose: 
3 //
4 // History:
5 // 07/06/16 - Sergey POKHODENKO - Creation of the file
6
7 #ifndef SRC_EXCHANGEAPI_EXCHANGEAPI_EXPORT_H_
8 #define SRC_EXCHANGEAPI_EXCHANGEAPI_EXPORT_H_
9
10 //--------------------------------------------------------------------------------------
11 #include "ExchangeAPI.h"
12
13 #include <list>
14 #include <string>
15
16 #include <ModelHighAPI_Interface.h>
17 #include <ModelHighAPI_Macro.h>
18
19 #include <ExchangePlugin_ExportFeature.h>
20 //--------------------------------------------------------------------------------------
21 class ModelHighAPI_Selection;
22 //--------------------------------------------------------------------------------------
23 /**\class ExchangeAPI_Export
24  * \ingroup CPPHighAPI
25  * \brief Interface for Export feature
26  */
27 class ExchangeAPI_Export : public ModelHighAPI_Interface
28 {
29 public:
30   /// Constructor without values
31   EXCHANGEAPI_EXPORT
32   explicit ExchangeAPI_Export(const std::shared_ptr<ModelAPI_Feature> & theFeature);
33   /// Constructor with values
34   EXCHANGEAPI_EXPORT
35   ExchangeAPI_Export(const std::shared_ptr<ModelAPI_Feature> & theFeature,
36                      const std::string & theFilePath,
37                      const std::string & theFileFormat,
38                      const std::list<ModelHighAPI_Selection> & theSelectionList);
39   /// Destructor
40   EXCHANGEAPI_EXPORT
41   virtual ~ExchangeAPI_Export();
42
43   INTERFACE_3(ExchangePlugin_ExportFeature::ID(),
44               filePath, ExchangePlugin_ExportFeature::FILE_PATH_ID(), ModelAPI_AttributeString, /** File path */,
45               fileFormat, ExchangePlugin_ExportFeature::FILE_FORMAT_ID(), ModelAPI_AttributeString, /** File format */,
46               selectionList, ExchangePlugin_ExportFeature::SELECTION_LIST_ID(), ModelAPI_AttributeSelectionList, /** Selection list */
47   )
48
49   /// Set file path (without execute)
50   EXCHANGEAPI_EXPORT
51   void setFilePath(const std::string & theFilePath);
52
53   /// Set file format (without execute)
54   EXCHANGEAPI_EXPORT
55   void setFileFormat(const std::string & theFileFormat);
56
57
58   /// Set selection list (without execute)
59   EXCHANGEAPI_EXPORT
60   void setSelectionList(const std::list<ModelHighAPI_Selection> & theSelectionList);
61 };
62
63 //! Pointer on Export object
64 typedef std::shared_ptr<ExchangeAPI_Export> ExportPtr;
65
66 /**\ingroup CPPHighAPI
67  * \brief Create Export feature
68  */
69 EXCHANGEAPI_EXPORT
70 ExportPtr exportToFile(const std::shared_ptr<ModelAPI_Document> & thePart,
71                        const std::string & theFilePath,
72                        const std::string & theFileFormat,
73                        const std::list<ModelHighAPI_Selection> & theSelectionList);
74
75 //--------------------------------------------------------------------------------------
76 //--------------------------------------------------------------------------------------
77 #endif /* SRC_EXCHANGEAPI_EXCHANGEAPI_EXPORT_H_ */