Salome HOME
Issue #1735 name of Deflection
[modules/shaper.git] / src / ExchangeAPI / ExchangeAPI_Import.h
1 // Name   : ExchangeAPI_Import.h
2 // Purpose: 
3 //
4 // History:
5 // 07/06/16 - Sergey POKHODENKO - Creation of the file
6
7 #ifndef SRC_EXCHANGEAPI_EXCHANGEAPI_IMPORT_H_
8 #define SRC_EXCHANGEAPI_EXCHANGEAPI_IMPORT_H_
9
10 //--------------------------------------------------------------------------------------
11 #include "ExchangeAPI.h"
12
13 #include <string>
14
15 #include <ExchangePlugin_ImportFeature.h>
16
17 #include <ModelHighAPI_Interface.h>
18 #include <ModelHighAPI_Macro.h>
19 //--------------------------------------------------------------------------------------
20 /**\class ExchangeAPI_Import
21  * \ingroup CPPHighAPI
22  * \brief Interface for Import feature
23  */
24 class ExchangeAPI_Import : public ModelHighAPI_Interface
25 {
26 public:
27   /// Constructor without values
28   EXCHANGEAPI_EXPORT
29   explicit ExchangeAPI_Import(const std::shared_ptr<ModelAPI_Feature> & theFeature);
30   /// Constructor with values
31   EXCHANGEAPI_EXPORT
32   ExchangeAPI_Import(const std::shared_ptr<ModelAPI_Feature> & theFeature,
33                      const std::string & theFilePath);
34   /// Destructor
35   EXCHANGEAPI_EXPORT
36   virtual ~ExchangeAPI_Import();
37
38   INTERFACE_1(ExchangePlugin_ImportFeature::ID(),
39               filePath, ExchangePlugin_ImportFeature::FILE_PATH_ID(), ModelAPI_AttributeString, /** File path */
40   )
41
42   /// Set point values
43   EXCHANGEAPI_EXPORT
44   void setFilePath(const std::string & theFilePath);
45
46   /// Dump wrapped feature
47   EXCHANGEAPI_EXPORT
48   virtual void dump(ModelHighAPI_Dumper& theDumper) const;
49 };
50
51 //! Pointer on Import object
52 typedef std::shared_ptr<ExchangeAPI_Import> ImportPtr;
53
54 /**\ingroup CPPHighAPI
55  * \brief Create Import feature
56  */
57 EXCHANGEAPI_EXPORT
58 ImportPtr addImport(const std::shared_ptr<ModelAPI_Document> & thePart,
59                     const std::string & theFilePath);
60
61 //--------------------------------------------------------------------------------------
62 //--------------------------------------------------------------------------------------
63 #endif /* SRC_EXCHANGEAPI_EXCHANGEAPI_IMPORT_H_ */