{
data()->addAttribute(ExchangePlugin_ExportFeature::EXPORT_TYPE_ID(), ModelAPI_AttributeString::typeId());
data()->addAttribute(ExchangePlugin_ExportFeature::FILE_PATH_ID(), ModelAPI_AttributeString::typeId());
+ data()->addAttribute(ExchangePlugin_ExportFeature::XAO_FILE_PATH_ID(), ModelAPI_AttributeString::typeId());
data()->addAttribute(ExchangePlugin_ExportFeature::FILE_FORMAT_ID(), ModelAPI_AttributeString::typeId());
data()->addAttribute(ExchangePlugin_ExportFeature::SELECTION_LIST_ID(), ModelAPI_AttributeSelectionList::typeId());
data()->addAttribute(ExchangePlugin_ExportFeature::XAO_AUTHOR_ID(), ModelAPI_AttributeString::typeId());
data()->addAttribute(ExchangePlugin_ExportFeature::XAO_GEOMETRY_NAME_ID(), ModelAPI_AttributeString::typeId());
ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), ExchangePlugin_ExportFeature::SELECTION_LIST_ID());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), ExchangePlugin_ExportFeature::XAO_FILE_PATH_ID());
ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), ExchangePlugin_ExportFeature::XAO_AUTHOR_ID());
ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), ExchangePlugin_ExportFeature::XAO_GEOMETRY_NAME_ID());
}
+void ExchangePlugin_ExportFeature::attributeChanged(const std::string& theID)
+{
+ if (theID == XAO_FILE_PATH_ID()) {
+ string(ExchangePlugin_ExportFeature::FILE_PATH_ID())->setValue(
+ string(ExchangePlugin_ExportFeature::XAO_FILE_PATH_ID())->value());
+ }
+}
+
/*
* Computes or recomputes the results
*/
static const std::string MY_FILE_PATH_ID("file_path");
return MY_FILE_PATH_ID;
}
+ /// attribute name of xao file path
+ inline static const std::string& XAO_FILE_PATH_ID()
+ {
+ static const std::string MY_XAO_FILE_PATH_ID("xao_file_path");
+ return MY_XAO_FILE_PATH_ID;
+ }
/// attribute name of file format
inline static const std::string& FILE_FORMAT_ID()
{
/// Request for initialization of data model of the feature: adding all attributes
EXCHANGEPLUGIN_EXPORT virtual void initAttributes();
+ /// Reimplemented from ModelAPI_Feature::attributeChanged()
+ EXCHANGEPLUGIN_EXPORT virtual void attributeChanged(const std::string& theID);
+
/// Computes or recomputes the results
EXCHANGEPLUGIN_EXPORT virtual void execute();