1 // Copyright (C) 2014-2020 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef EXCHANGEPLUGIN_EXPORTPART_H_
21 #define EXCHANGEPLUGIN_EXPORTPART_H_
23 #include <ExchangePlugin.h>
24 #include <ModelAPI_Feature.h>
27 * \class ExchangePlugin_ExportPart
29 * \brief Feature for export some results of a Part to the binary format for the further import.
31 class ExchangePlugin_ExportPart : public ModelAPI_Feature
35 inline static const std::string& ID()
37 static const std::string MY_EXPORT_ID("ExportPart");
40 /// attribute name of file path
41 inline static const std::string& FILE_PATH_ID()
43 static const std::string MY_FILE_PATH_ID("file_path");
44 return MY_FILE_PATH_ID;
46 /// attribute name of file format
47 inline static const std::string& FILE_FORMAT_ID()
49 static const std::string MY_FILE_FORMAT_ID("file_format");
50 return MY_FILE_FORMAT_ID;
52 /// attribute name of selection list
53 inline static const std::string& SELECTION_LIST_ID()
55 static const std::string MY_SELECTION_LIST_ID("selection_list");
56 return MY_SELECTION_LIST_ID;
58 /// Default constructor
59 ExchangePlugin_ExportPart();
61 /// Returns the unique kind of a feature
62 EXCHANGEPLUGIN_EXPORT virtual const std::string& getKind()
64 return ExchangePlugin_ExportPart::ID();
67 /// Request for initialization of data model of the feature: adding all attributes
68 EXCHANGEPLUGIN_EXPORT virtual void initAttributes();
70 /// Computes or recomputes the results
71 EXCHANGEPLUGIN_EXPORT virtual void execute();
73 /// Returns true if this feature is used as macro: creates other features and then removed.
74 EXCHANGEPLUGIN_EXPORT virtual bool isMacro() const { return true; }
76 /// Reimplemented from ModelAPI_Feature::isPreviewNeeded(). Returns false.
77 EXCHANGEPLUGIN_EXPORT virtual bool isPreviewNeeded() const { return false; }
79 /// Do not put in history.
80 /// Since it is not a macro, it is not deleted, but we don't want to see it.
81 bool isInHistory() { return false; }
84 #endif /* EXCHANGEPLUGIN_EXPORTPART_H_ */