20 #ifndef EXCHANGEPLUGIN_IMPORTPART_H_
21 #define EXCHANGEPLUGIN_IMPORTPART_H_
23 #include <ExchangePlugin.h>
24 #include <ModelAPI_Feature.h>
35 inline static const std::string&
ID()
37 static const std::string MY_IMPORT_ID(
"ImportPart");
43 static const std::string MY_FILE_PATH_ID(
"file_path");
44 return MY_FILE_PATH_ID;
49 static const std::string MY_TARGET_PART_ID(
"target_part");
50 return MY_TARGET_PART_ID;
55 static const std::string MY_TARGET_PARTS_LIST_ID(
"target_parts_list");
56 return MY_TARGET_PARTS_LIST_ID;
62 EXCHANGEPLUGIN_EXPORT
virtual const std::string&
getKind()
72 EXCHANGEPLUGIN_EXPORT
virtual void attributeChanged(
const std::string& theID);
75 EXCHANGEPLUGIN_EXPORT
virtual void execute();
78 EXCHANGEPLUGIN_EXPORT
virtual bool isMacro()
const {
return true; }
Feature for import the structure of Part into the current document.
Definition: ExchangePlugin_ImportPart.h:32
static const std::string & TARGET_PARTS_LIST_ID()
attribute name of list of target parts
Definition: ExchangePlugin_ImportPart.h:53
ExchangePlugin_ImportPart()
Default constructor.
Definition: ExchangePlugin_ImportPart.cpp:45
virtual EXCHANGEPLUGIN_EXPORT bool isMacro() const
Returns true if this feature is used as macro: creates other features and then removed.
Definition: ExchangePlugin_ImportPart.h:78
virtual EXCHANGEPLUGIN_EXPORT void execute()
Computes or recomputes the results.
Definition: ExchangePlugin_ImportPart.cpp:57
static const std::string & FILE_PATH_ID()
attribute name of file path
Definition: ExchangePlugin_ImportPart.h:41
virtual EXCHANGEPLUGIN_EXPORT void initAttributes()
Request for initialization of data model of the feature: adding all attributes.
Definition: ExchangePlugin_ImportPart.cpp:49
static const std::string & ID()
Feature kind.
Definition: ExchangePlugin_ImportPart.h:35
virtual EXCHANGEPLUGIN_EXPORT bool isPreviewNeeded() const
Reimplemented from ModelAPI_Feature::isPreviewNeeded(). Returns false.
Definition: ExchangePlugin_ImportPart.h:81
virtual EXCHANGEPLUGIN_EXPORT void attributeChanged(const std::string &theID)
Called on change of any argument-attribute of this object.
Definition: ExchangePlugin_ImportPart.cpp:81
static const std::string & TARGET_PART_ID()
attribute name of target part
Definition: ExchangePlugin_ImportPart.h:47
virtual EXCHANGEPLUGIN_EXPORT const std::string & getKind()
Returns the unique kind of a feature.
Definition: ExchangePlugin_ImportPart.h:62
Feature function that represents the particular functionality of this operation.
Definition: ModelAPI_Feature.h:41