From: spo Date: Tue, 7 Jun 2016 10:48:02 +0000 (+0300) Subject: Use not only ModelAPI_Attribute* in INTERFACE_N X-Git-Tag: V_2.4.0~91^2~74 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=16167ea683e05d4affb498377261bda39b61e9cc;p=modules%2Fshaper.git Use not only ModelAPI_Attribute* in INTERFACE_N --- diff --git a/src/ConstructionAPI/ConstructionAPI_Point.h b/src/ConstructionAPI/ConstructionAPI_Point.h index f1b8da8bc..d2af33298 100644 --- a/src/ConstructionAPI/ConstructionAPI_Point.h +++ b/src/ConstructionAPI/ConstructionAPI_Point.h @@ -42,7 +42,8 @@ public: INTERFACE_3(ConstructionPlugin_Point::ID(), x, ConstructionPlugin_Point::X(), ModelAPI_AttributeDouble, /** X attribute */, y, ConstructionPlugin_Point::Y(), ModelAPI_AttributeDouble, /** Y attribute */, - z, ConstructionPlugin_Point::Z(), ModelAPI_AttributeDouble, /** Z attribute */) + z, ConstructionPlugin_Point::Z(), ModelAPI_AttributeDouble, /** Z attribute */ + ) /// Set point values CONSTRUCTIONAPI_EXPORT diff --git a/src/ExchangeAPI/ExchangeAPI_Import.h b/src/ExchangeAPI/ExchangeAPI_Import.h index 095172a18..015b374f3 100644 --- a/src/ExchangeAPI/ExchangeAPI_Import.h +++ b/src/ExchangeAPI/ExchangeAPI_Import.h @@ -36,7 +36,8 @@ public: virtual ~ExchangeAPI_Import(); INTERFACE_1(ExchangePlugin_ImportFeature::ID(), - filePath, ExchangePlugin_ImportFeature::FILE_PATH_ID(), ModelAPI_AttributeString, /** File path */) + filePath, ExchangePlugin_ImportFeature::FILE_PATH_ID(), ModelAPI_AttributeString, /** File path */ + ) /// Set point values EXCHANGEAPI_EXPORT diff --git a/src/ExchangeAPI/ExchangeAPI_swig.h b/src/ExchangeAPI/ExchangeAPI_swig.h index 80219bb7c..b830f5d7b 100644 --- a/src/ExchangeAPI/ExchangeAPI_swig.h +++ b/src/ExchangeAPI/ExchangeAPI_swig.h @@ -8,8 +8,8 @@ #define SRC_EXCHANGEAPI_EXCHANGEAPI_SWIG_H_ #include - #include "ExchangeAPI.h" + #include "ExchangeAPI.h" #include "ExchangeAPI_Export.h" #include "ExchangeAPI_Import.h" diff --git a/src/ModelHighAPI/ModelHighAPI_Macro.h b/src/ModelHighAPI/ModelHighAPI_Macro.h index a2ef23c6b..4d2e9e5b9 100644 --- a/src/ModelHighAPI/ModelHighAPI_Macro.h +++ b/src/ModelHighAPI/ModelHighAPI_Macro.h @@ -8,21 +8,20 @@ #define SRC_MODELHIGHAPI_MODELHIGHAPI_MACRO_H_ //-------------------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -//-------------------------------------------------------------------------------------- -// See ModelAPI_Feature functions -#define FN_ModelAPI_AttributeBoolean boolean -#define FN_ModelAPI_AttributeDocRef document -#define FN_ModelAPI_AttributeDouble real -#define FN_ModelAPI_AttributeInteger integer -#define FN_ModelAPI_AttributeRefAttr refattr -#define FN_ModelAPI_AttributeReference reference -#define FN_ModelAPI_AttributeRefList reflist -#define FN_ModelAPI_AttributeSelection selection -#define FN_ModelAPI_AttributeSelectionList selectionList -#define FN_ModelAPI_AttributeString string - //-------------------------------------------------------------------------------------- #define VAR_NAME(NAME) my##NAME @@ -38,7 +37,7 @@ //-------------------------------------------------------------------------------------- // Used in INTERFACE_N inside START_INIT/END_INIT for set variable with attribute received from feature #define SET_ATTRIBUTE(NAME, TYPE, ATT_NAME) \ - VAR_NAME(NAME) = feature()->FN_##TYPE(ATT_NAME); \ + VAR_NAME(NAME) = std::dynamic_pointer_cast(feature()->attribute(ATT_NAME)); \ if (!VAR_NAME(NAME)) \ return false;