Salome HOME
Resolve batch runtime errors on debian squeeze Dev_1.0.1
authorsbh <sergey.belash@opencascade.com>
Tue, 17 Feb 2015 13:49:40 +0000 (16:49 +0300)
committersbh <sergey.belash@opencascade.com>
Tue, 17 Feb 2015 13:49:40 +0000 (16:49 +0300)
74 files changed:
doc/first_feature_help.doc
src/Config/Config_ModuleReader.cpp
src/ConstructionPlugin/ConstructionPlugin_Axis.cpp
src/ConstructionPlugin/ConstructionPlugin_Plane.cpp
src/ConstructionPlugin/ConstructionPlugin_Point.cpp
src/ExchangePlugin/ExchangePlugin_ImportFeature.cpp
src/FeaturesPlugin/FeaturesPlugin_Boolean.cpp
src/FeaturesPlugin/FeaturesPlugin_Extrusion.cpp
src/FeaturesPlugin/FeaturesPlugin_Group.cpp
src/FeaturesPlugin/FeaturesPlugin_Placement.cpp
src/FeaturesPlugin/Test/TestBoolean.py
src/FeaturesPlugin/Test/TestExtrusion.py
src/FeaturesPlugin/Test/TestGroup.py
src/GeomAlgoAPI/GeomAlgoAPI_Boolean.h
src/GeomData/CMakeLists.txt
src/GeomDataAPI/CMakeLists.txt
src/GeomDataAPI/GeomDataAPI_Dir.cpp [new file with mode: 0644]
src/GeomDataAPI/GeomDataAPI_Dir.h
src/GeomDataAPI/GeomDataAPI_Point.cpp [new file with mode: 0644]
src/GeomDataAPI/GeomDataAPI_Point.h
src/GeomDataAPI/GeomDataAPI_Point2D.cpp [new file with mode: 0644]
src/GeomDataAPI/GeomDataAPI_Point2D.h
src/GeomDataAPI/Test/TestConstants.py
src/Model/Model_Data.cpp
src/Model/Model_ResultPart.cpp
src/Model/Model_Update.cpp
src/ModelAPI/ModelAPI_AttributeBoolean.cpp
src/ModelAPI/ModelAPI_AttributeBoolean.h
src/ModelAPI/ModelAPI_AttributeDocRef.cpp
src/ModelAPI/ModelAPI_AttributeDocRef.h
src/ModelAPI/ModelAPI_AttributeDouble.cpp
src/ModelAPI/ModelAPI_AttributeDouble.h
src/ModelAPI/ModelAPI_AttributeInteger.cpp
src/ModelAPI/ModelAPI_AttributeInteger.h
src/ModelAPI/ModelAPI_AttributeRefAttr.cpp
src/ModelAPI/ModelAPI_AttributeRefAttr.h
src/ModelAPI/ModelAPI_AttributeRefList.cpp
src/ModelAPI/ModelAPI_AttributeRefList.h
src/ModelAPI/ModelAPI_AttributeReference.cpp
src/ModelAPI/ModelAPI_AttributeReference.h
src/ModelAPI/ModelAPI_AttributeSelection.cpp
src/ModelAPI/ModelAPI_AttributeSelection.h
src/ModelAPI/ModelAPI_AttributeSelectionList.cpp
src/ModelAPI/ModelAPI_AttributeSelectionList.h
src/ModelAPI/ModelAPI_AttributeString.cpp
src/ModelAPI/ModelAPI_AttributeString.h
src/ModelAPI/ModelAPI_ShapeValidator.cpp
src/ModelAPI/Test/TestConstants.py
src/PartSet/CMakeLists.txt
src/PartSet/PartSet_Tools.cpp
src/PartSet/PartSet_Validators.cpp
src/SketchPlugin/CMakeLists.txt
src/SketchPlugin/SketchPlugin_Arc.cpp
src/SketchPlugin/SketchPlugin_Circle.cpp
src/SketchPlugin/SketchPlugin_ConstraintCoincidence.cpp
src/SketchPlugin/SketchPlugin_ConstraintDistance.cpp
src/SketchPlugin/SketchPlugin_ConstraintLength.cpp
src/SketchPlugin/SketchPlugin_ConstraintParallel.cpp
src/SketchPlugin/SketchPlugin_ConstraintPerpendicular.cpp
src/SketchPlugin/SketchPlugin_ConstraintRadius.cpp
src/SketchPlugin/SketchPlugin_ConstraintRigid.cpp
src/SketchPlugin/SketchPlugin_Line.cpp
src/SketchPlugin/SketchPlugin_Point.cpp
src/SketchPlugin/SketchPlugin_Sketch.cpp
src/SketchPlugin/SketchPlugin_Validators.cpp
src/SketchPlugin/Test/TestConstraintConcidence.py
src/SketchPlugin/Test/TestConstraintDistance.py
src/SketchPlugin/Test/TestConstraintLength.py
src/SketchPlugin/Test/TestConstraintParallel.py
src/SketchPlugin/Test/TestConstraintPerpendicular.py
src/SketchPlugin/Test/TestConstraintRadius.py
src/SketchPlugin/Test/TestConstraintRigid.py
src/SketchPlugin/Test/TestSketchArcCircle.py
src/SketchSolver/SketchSolver_Constraint.cpp

index c40f79d60385df593ee133385c53e9990e4c3aca..fc7f1f9ebaecfdac6ef9144b02b4b1f68521c073 100644 (file)
@@ -118,13 +118,13 @@ And like a plugin implements a functionality to create 'feature' objects by stri
 \code
 void ConstructionPlugin_Point::initAttributes()
 {
-  data()->addAttribute("DoubleCounterData", ModelAPI_AttributeDouble::type());
+  data()->addAttribute("DoubleCounterData", ModelAPI_AttributeDouble::typeId());
 }
 \endcode
 Python:
 \code
   def initAttributes(self):
-    self.data().addAttribute("DoubleCounterData", ModelAPI.ModelAPI_AttributeDouble.type())
+    self.data().addAttribute("DoubleCounterData", ModelAPI.ModelAPI_AttributeDouble.typeId())
 \endcode
 As you may notice, this method defines that feature has a widget with "DoubleCounterData" id, which has Double type. Therefore, if your feature uses, in example, three widgets, the `initAttributes()` method should 'init' three attributes.
 \n
index 6acffa268d3e46e2ac66c57df2602a93688c271f..74ab766966a98c590d0079cc2405311950aa781f 100644 (file)
@@ -194,6 +194,7 @@ void Config_ModuleReader::loadLibrary(const std::string& theLibName)
     #ifndef WIN32
     anErrorMsg += ": " + std::string(dlerror());
     #endif
+    std::cerr << anErrorMsg << std::endl;
     Events_Error::send(anErrorMsg);
   }
 }
index f0e45a5bf0bb9bc8cedc988e6cc0a6612ec6ca6b..78de925dcae942f6780ebc1806b97a7069286a5b 100644 (file)
@@ -23,8 +23,8 @@ ConstructionPlugin_Axis::ConstructionPlugin_Axis()
 
 void ConstructionPlugin_Axis::initAttributes()
 {
-  data()->addAttribute(POINT_ATTR_FIRST,  ModelAPI_AttributeSelection::type());
-  data()->addAttribute(POINT_ATTR_SECOND, ModelAPI_AttributeSelection::type());
+  data()->addAttribute(POINT_ATTR_FIRST,  ModelAPI_AttributeSelection::typeId());
+  data()->addAttribute(POINT_ATTR_SECOND, ModelAPI_AttributeSelection::typeId());
 }
 
 void ConstructionPlugin_Axis::execute()
index 5475402437a3a707cf5e5dbb3ef90dc55be4f413..07d3d24bc65fa7725ccd7a870ea21d477dcd0314 100644 (file)
@@ -22,8 +22,8 @@ ConstructionPlugin_Plane::ConstructionPlugin_Plane()
 
 void ConstructionPlugin_Plane::initAttributes()
 {
-  data()->addAttribute(FACE_ATTR,  ModelAPI_AttributeSelection::type());
-  data()->addAttribute(DISTANCE_ATTR, ModelAPI_AttributeDouble::type());
+  data()->addAttribute(FACE_ATTR,  ModelAPI_AttributeSelection::typeId());
+  data()->addAttribute(DISTANCE_ATTR, ModelAPI_AttributeDouble::typeId());
 }
 
 void ConstructionPlugin_Plane::execute()
index 9539004b7645ed5ff075cfa952fb4f46fc82753c..7a9d66b2d6eedd161ea362b427cbc5793a21877b 100644 (file)
@@ -21,9 +21,9 @@ ConstructionPlugin_Point::ConstructionPlugin_Point()
 
 void ConstructionPlugin_Point::initAttributes()
 {
-  data()->addAttribute(POINT_ATTR_X, ModelAPI_AttributeDouble::type());
-  data()->addAttribute(POINT_ATTR_Y, ModelAPI_AttributeDouble::type());
-  data()->addAttribute(POINT_ATTR_Z, ModelAPI_AttributeDouble::type());
+  data()->addAttribute(POINT_ATTR_X, ModelAPI_AttributeDouble::typeId());
+  data()->addAttribute(POINT_ATTR_Y, ModelAPI_AttributeDouble::typeId());
+  data()->addAttribute(POINT_ATTR_Z, ModelAPI_AttributeDouble::typeId());
 }
 
 void ConstructionPlugin_Point::execute()
index 85a025f6832ec3b9861f70cd949803cc3ba0ec2a..7a32e8510aac7ccf3ebbce68446aa78ad472e5d0 100644 (file)
@@ -52,7 +52,7 @@ const std::string& ExchangePlugin_ImportFeature::getKind()
  */
 void ExchangePlugin_ImportFeature::initAttributes()
 {
-  data()->addAttribute(ExchangePlugin_ImportFeature::FILE_PATH_ID(), ModelAPI_AttributeString::type());
+  data()->addAttribute(ExchangePlugin_ImportFeature::FILE_PATH_ID(), ModelAPI_AttributeString::typeId());
 }
 
 /*
index 779baa1f10ba51e6adf047583888dd1f10919130..2932d5e5cce410fa963f068e5579554a3dcfc13c 100644 (file)
@@ -23,9 +23,9 @@ FeaturesPlugin_Boolean::FeaturesPlugin_Boolean()
 
 void FeaturesPlugin_Boolean::initAttributes()
 {
-  data()->addAttribute(FeaturesPlugin_Boolean::TYPE_ID(), ModelAPI_AttributeInteger::type());
-  data()->addAttribute(FeaturesPlugin_Boolean::OBJECT_ID(), ModelAPI_AttributeReference::type());
-  data()->addAttribute(FeaturesPlugin_Boolean::TOOL_ID(), ModelAPI_AttributeReference::type());
+  data()->addAttribute(FeaturesPlugin_Boolean::TYPE_ID(), ModelAPI_AttributeInteger::typeId());
+  data()->addAttribute(FeaturesPlugin_Boolean::OBJECT_ID(), ModelAPI_AttributeReference::typeId());
+  data()->addAttribute(FeaturesPlugin_Boolean::TOOL_ID(), ModelAPI_AttributeReference::typeId());
 }
 
 std::shared_ptr<GeomAPI_Shape> FeaturesPlugin_Boolean::getShape(const std::string& theAttrName)
index 265ba65761ebb4871d0d9eea4dfe68ca8a2b9cd4..042ee8e2157974b835e93ab8f3ea808cb4cc350e 100644 (file)
@@ -27,9 +27,9 @@ FeaturesPlugin_Extrusion::FeaturesPlugin_Extrusion()
 
 void FeaturesPlugin_Extrusion::initAttributes()
 {
-  data()->addAttribute(FeaturesPlugin_Extrusion::FACE_ID(), ModelAPI_AttributeSelection::type());
-  data()->addAttribute(FeaturesPlugin_Extrusion::SIZE_ID(), ModelAPI_AttributeDouble::type());
-  data()->addAttribute(FeaturesPlugin_Extrusion::REVERSE_ID(), ModelAPI_AttributeBoolean::type());
+  data()->addAttribute(FeaturesPlugin_Extrusion::FACE_ID(), ModelAPI_AttributeSelection::typeId());
+  data()->addAttribute(FeaturesPlugin_Extrusion::SIZE_ID(), ModelAPI_AttributeDouble::typeId());
+  data()->addAttribute(FeaturesPlugin_Extrusion::REVERSE_ID(), ModelAPI_AttributeBoolean::typeId());
 }
 
 void FeaturesPlugin_Extrusion::execute()
index 4708c6fc0f6250ac69e73772326676ae865043b9..98c6266ef83756dc29e10aac3e2b208c5ceebb08 100644 (file)
@@ -22,8 +22,8 @@ FeaturesPlugin_Group::FeaturesPlugin_Group()
 
 void FeaturesPlugin_Group::initAttributes()
 {
-  //data()->addAttribute(FeaturesPlugin_Group::NAME_ID(), ModelAPI_AttributeString::type());
-  data()->addAttribute(FeaturesPlugin_Group::LIST_ID(), ModelAPI_AttributeSelectionList::type());
+  //data()->addAttribute(FeaturesPlugin_Group::NAME_ID(), ModelAPI_AttributeString::typeId());
+  data()->addAttribute(FeaturesPlugin_Group::LIST_ID(), ModelAPI_AttributeSelectionList::typeId());
 }
 
 void FeaturesPlugin_Group::execute()
index 44ad7523e4f6330e8853cec73da101699c1def22..ae772bd442c1943e95708bde3960e5cf55828c21 100644 (file)
@@ -24,8 +24,8 @@ FeaturesPlugin_Placement::FeaturesPlugin_Placement()
 
 void FeaturesPlugin_Placement::initAttributes()
 {
-  data()->addAttribute(FeaturesPlugin_Placement::BASE_FACE_ID(), ModelAPI_AttributeSelection::type());
-  data()->addAttribute(FeaturesPlugin_Placement::ATTRACT_FACE_ID(), ModelAPI_AttributeSelection::type());
+  data()->addAttribute(FeaturesPlugin_Placement::BASE_FACE_ID(), ModelAPI_AttributeSelection::typeId());
+  data()->addAttribute(FeaturesPlugin_Placement::ATTRACT_FACE_ID(), ModelAPI_AttributeSelection::typeId());
 }
 
 void FeaturesPlugin_Placement::execute()
index 94aa22e8e5158a83d93ef1484d27b742dd054908..ab00fa3f45e954ec0c72ecdb5b98982d9c39471d 100644 (file)
@@ -8,9 +8,9 @@
         static const std::string MY_TOOL_ID("tool_object");
         static const std::string MY_TYPE_ID("bool_type");
         
-        data()->addAttribute(FeaturesPlugin_Boolean::OBJECT_ID(), ModelAPI_AttributeReference::type());
-        data()->addAttribute(FeaturesPlugin_Boolean::TOOL_ID(), ModelAPI_AttributeReference::type());
-        data()->addAttribute(FeaturesPlugin_Boolean::TYPE_ID(), ModelAPI_AttributeInteger::type());
+        data()->addAttribute(FeaturesPlugin_Boolean::OBJECT_ID(), ModelAPI_AttributeReference::typeId());
+        data()->addAttribute(FeaturesPlugin_Boolean::TOOL_ID(), ModelAPI_AttributeReference::typeId());
+        data()->addAttribute(FeaturesPlugin_Boolean::TYPE_ID(), ModelAPI_AttributeInteger::typeId());
 """
 #=========================================================================
 # Initialization of the test
index 2d6cc6a5e8f76db48900825116c0bae6bce69605..9edca8a3bc611b180bdceb96df9a6d05463c7049 100644 (file)
@@ -8,9 +8,9 @@
         static const std::string MY_SIZE_ID("extrusion_size");
         static const std::string MY_REVERSE_ID("extrusion_reverse");
           
-        data()->addAttribute(FeaturesPlugin_Extrusion::FACE_ID(), ModelAPI_AttributeSelection::type());
-        data()->addAttribute(FeaturesPlugin_Extrusion::SIZE_ID(), ModelAPI_AttributeDouble::type());
-        data()->addAttribute(FeaturesPlugin_Extrusion::REVERSE_ID(), ModelAPI_AttributeBoolean::type());
+        data()->addAttribute(FeaturesPlugin_Extrusion::FACE_ID(), ModelAPI_AttributeSelection::typeId());
+        data()->addAttribute(FeaturesPlugin_Extrusion::SIZE_ID(), ModelAPI_AttributeDouble::typeId());
+        data()->addAttribute(FeaturesPlugin_Extrusion::REVERSE_ID(), ModelAPI_AttributeBoolean::typeId());
 """
 #=========================================================================
 # Initialization of the test
index bb446e26ccd314ae14e997f5b2aaef6416b63a87..e888ff654f8b0ad599d1ab507b82dcafcacf2af3 100644 (file)
@@ -6,7 +6,7 @@
         static const std::string MY_GROUP_ID("Group");
         static const std::string MY_GROUP_LIST_ID("group_list");
         
-        data()->addAttribute(FeaturesPlugin_Group::LIST_ID(), ModelAPI_AttributeSelectionList::type());
+        data()->addAttribute(FeaturesPlugin_Group::LIST_ID(), ModelAPI_AttributeSelectionList::typeId());
 """
 #=========================================================================
 # Initialization of the test
index a8a5659de8ea2470759c9cd481f87936663de983..9ca251863ef5a812ecc7479b340f8b5820424b52 100644 (file)
@@ -8,9 +8,12 @@
 #define GeomAlgoAPI_Boolean_H_
 
 #include <GeomAlgoAPI.h>
-#include <GeomAPI_Shape.h>
 #include <GeomAlgoAPI_MakeShape.h>
+
+#include <GeomAPI_Shape.h>
+#include <GeomAPI_Interface.h>
 #include <GeomAPI_DataMapOfShapeShape.h>
+
 #include <memory>
 
 /**\class GeomAlgoAPI_Boolean
index 0469a36ea768c12b201f73fdca3a005f11a7d5e3..16a1329d7382314c2ada67edeff0597589ef648c 100644 (file)
@@ -16,6 +16,7 @@ SET(PROJECT_SOURCES
 )
 
 SET(PROJECT_LIBRARIES
+    GeomDataAPI
     ModelAPI 
     GeomAPI 
     Events
index 1f8880b751c479b752b6b736ba1eb38b3b90869f..581fef7d81df1dc122ce6f37227c054a5f254a7d 100644 (file)
@@ -12,21 +12,36 @@ SET(PROJECT_HEADERS
     GeomDataAPI_Point2D.h
 )
 
-SET(CMAKE_SWIG_FLAGS "-Wall")
+SET(PROJECT_SOURCES
+    GeomDataAPI_Point.cpp
+    GeomDataAPI_Dir.cpp
+    GeomDataAPI_Point2D.cpp
+)
 
-SET_SOURCE_FILES_PROPERTIES(GeomDataAPI.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(GeomDataAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+SET(PROJECT_LIBRARIES
+    ModelAPI
+)
 
-INCLUDE_DIRECTORIES(
+INCLUDE_DIRECTORIES( 
   ../ModelAPI
 )
 
+ADD_DEFINITIONS(-DGEOMDATAAPI_EXPORTS)
+ADD_LIBRARY(GeomDataAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+SET_TARGET_PROPERTIES(GeomDataAPI PROPERTIES LINKER_LANGUAGE CXX)
+TARGET_LINK_LIBRARIES(GeomDataAPI ${PROJECT_LIBRARIES})
+
+SET(CMAKE_SWIG_FLAGS "-Wall")
+
+SET_SOURCE_FILES_PROPERTIES(GeomDataAPI.i PROPERTIES CPLUSPLUS ON)
+SET_SOURCE_FILES_PROPERTIES(GeomDataAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+
 SET(SWIG_SCRIPTS
   ${CMAKE_CURRENT_BINARY_DIR}/GeomDataAPI.py
 )
 
 SET(SWIG_LINK_LIBRARIES
-  ModelAPI
+  GeomDataAPI
   ${PYTHON_LIBRARIES}
 )
 
@@ -38,6 +53,7 @@ IF(WIN32)
 ENDIF(WIN32)
 
 INSTALL(TARGETS _GeomDataAPI DESTINATION swig)
+INSTALL(TARGETS GeomDataAPI DESTINATION swig)
 INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION swig)
 
 ADD_UNIT_TESTS(TestConstants.py)
diff --git a/src/GeomDataAPI/GeomDataAPI_Dir.cpp b/src/GeomDataAPI/GeomDataAPI_Dir.cpp
new file mode 100644 (file)
index 0000000..cfb37d6
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
+// File:        GeomDataAPI_Dir.cpp
+// Created:     24 Apr 2014
+// Author:      Mikhail PONIKAROV
+
+
+#include <GeomDataAPI_Dir.h>
+
+std::string GeomDataAPI_Dir::attributeType()
+{
+  return typeId();
+}
+
+GeomDataAPI_Dir::GeomDataAPI_Dir()
+{
+}
+
+GeomDataAPI_Dir::~GeomDataAPI_Dir()
+{
+
+}
index 968edb2325670112dc8e008c5afb2bb9c383ea1e..85a3cc031d3a7a365f5bb6676b3b19399c17ef76 100644 (file)
@@ -35,22 +35,18 @@ class GeomDataAPI_Dir : public ModelAPI_Attribute
   virtual std::shared_ptr<GeomAPI_Dir> dir() = 0;
 
   /// Returns the type of this class of attributes
-  static inline std::string type()
+  static std::string typeId()
   {
     return std::string("Dir");
   }
 
   /// Returns the type of this class of attributes, not static method
-  virtual std::string attributeType()
-  {
-    return type();
-  }
+  GEOMDATAAPI_EXPORT virtual std::string attributeType();
 
  protected:
   /// Objects are created for features automatically
-  GeomDataAPI_Dir()
-  {
-  }
+  GEOMDATAAPI_EXPORT GeomDataAPI_Dir();
+  GEOMDATAAPI_EXPORT virtual ~GeomDataAPI_Dir();
 };
 
 #endif
diff --git a/src/GeomDataAPI/GeomDataAPI_Point.cpp b/src/GeomDataAPI/GeomDataAPI_Point.cpp
new file mode 100644 (file)
index 0000000..a5874ba
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
+// File:        GeomDataAPI_Point.cpp
+// Created:     24 Apr 2014
+// Author:      Mikhail PONIKAROV
+
+#include <GeomDataAPI_Point.h>
+
+std::string GeomDataAPI_Point::attributeType()
+{
+  return typeId();
+}
+
+GeomDataAPI_Point::GeomDataAPI_Point()
+{
+}
+
+GeomDataAPI_Point::~GeomDataAPI_Point()
+{
+}
index 9209e521013a827e33aabaea45fd13b8639f722a..245f9b0f80c65732e8647226c8297493a8f54d71 100644 (file)
@@ -35,22 +35,18 @@ class GeomDataAPI_Point : public ModelAPI_Attribute
   virtual std::shared_ptr<GeomAPI_Pnt> pnt() = 0;
 
   /// Returns the type of this class of attributes
-  static inline std::string type()
+  static std::string typeId()
   {
     return std::string("Point");
   }
 
   /// Returns the type of this class of attributes, not static method
-  virtual std::string attributeType()
-  {
-    return type();
-  }
+  GEOMDATAAPI_EXPORT virtual std::string attributeType();
 
  protected:
   /// Objects are created for features automatically
-  GeomDataAPI_Point()
-  {
-  }
+  GEOMDATAAPI_EXPORT GeomDataAPI_Point();
+  GEOMDATAAPI_EXPORT virtual ~GeomDataAPI_Point();
 };
 
 #endif
diff --git a/src/GeomDataAPI/GeomDataAPI_Point2D.cpp b/src/GeomDataAPI/GeomDataAPI_Point2D.cpp
new file mode 100644 (file)
index 0000000..dd8b39e
--- /dev/null
@@ -0,0 +1,26 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
+// File:        GeomDataAPI_Point2D.cpp
+// Created:     24 Apr 2014
+// Author:      Mikhail PONIKAROV
+
+
+#include <GeomDataAPI_Point2D.h>
+
+void GeomDataAPI_Point2D::move(const double theDeltaX, const double theDeltaY)
+{
+  setValue(x() + theDeltaX, y() + theDeltaY);
+}
+
+std::string GeomDataAPI_Point2D::attributeType()
+{
+  return typeId();
+}
+
+GeomDataAPI_Point2D::GeomDataAPI_Point2D()
+{
+}
+
+GeomDataAPI_Point2D::~GeomDataAPI_Point2D()
+{
+}
index 83acc0b57e05bb510735a3dd5991ce272d07b2bc..3c67bec90d85c9e7a39cd68156b76c2db745c349 100644 (file)
@@ -7,7 +7,7 @@
 #ifndef GeomDataAPI_Point2D_H_
 #define GeomDataAPI_Point2D_H_
 
-#include "GeomDataAPI.h"
+#include <GeomDataAPI.h>
 #include <ModelAPI_Attribute.h>
 
 class GeomAPI_Pnt2d;
@@ -33,29 +33,21 @@ class GeomDataAPI_Point2D : public ModelAPI_Attribute
   virtual std::shared_ptr<GeomAPI_Pnt2d> pnt() = 0;
 
   /// Appends the delta values to point
-  void move(const double theDeltaX, const double theDeltaY)
-  {
-    setValue(x() + theDeltaX, y() + theDeltaY);
-  }
-
+  GEOMDATAAPI_EXPORT void move(const double theDeltaX, const double theDeltaY);
 
   /// Returns the type of this class of attributes
-  static inline std::string type()
+  static std::string typeId()
   {
     return std::string("Point2D");
   }
 
   /// Returns the type of this class of attributes, not static method
-  virtual std::string attributeType()
-  {
-    return type();
-  }
+  GEOMDATAAPI_EXPORT virtual std::string attributeType();
 
  protected:
   /// Objects are created for features automatically
-  GeomDataAPI_Point2D()
-  {
-  }
+  GEOMDATAAPI_EXPORT GeomDataAPI_Point2D();
+  GEOMDATAAPI_EXPORT virtual ~GeomDataAPI_Point2D();
 };
 
 #endif
index bb6bc044afec44519b189ad7d18acd6b5765f06a..2af03aba1ef9cb28edc1b8b645aa1337c8f33b08 100644 (file)
@@ -2,6 +2,6 @@
 # Test GeomDataAPI static methods
 #===============================================================================
 from GeomDataAPI import *
-assert (GeomDataAPI_Point.type() == "Point")
-assert (GeomDataAPI_Dir.type() == "Dir")  
-assert (GeomDataAPI_Point2D.type() == "Point2D")  
\ No newline at end of file
+assert (GeomDataAPI_Point.typeId() == "Point")
+assert (GeomDataAPI_Dir.typeId() == "Dir")  
+assert (GeomDataAPI_Point2D.typeId() == "Point2D")  
\ No newline at end of file
index e13eaa406e5b6199c198ebf86dfb074140c5130a..f280f8fc6f3670e3709a5ca9eabb77a504c627e5 100644 (file)
@@ -70,33 +70,33 @@ void Model_Data::addAttribute(const std::string& theID, const std::string theAtt
 {
   TDF_Label anAttrLab = myLab.FindChild(myAttrs.size() + 1);
   ModelAPI_Attribute* anAttr = 0;
-  if (theAttrType == ModelAPI_AttributeDocRef::type()) {
+  if (theAttrType == ModelAPI_AttributeDocRef::typeId()) {
     anAttr = new Model_AttributeDocRef(anAttrLab);
-  } else if (theAttrType == Model_AttributeInteger::type()) {
+  } else if (theAttrType == Model_AttributeInteger::typeId()) {
     anAttr = new Model_AttributeInteger(anAttrLab);
-  } else if (theAttrType == ModelAPI_AttributeDouble::type()) {
+  } else if (theAttrType == ModelAPI_AttributeDouble::typeId()) {
     anAttr = new Model_AttributeDouble(anAttrLab);
-  } else if (theAttrType == Model_AttributeBoolean::type()) {
+  } else if (theAttrType == Model_AttributeBoolean::typeId()) {
     anAttr = new Model_AttributeBoolean(anAttrLab);
-  } else if (theAttrType == Model_AttributeString::type()) {
+  } else if (theAttrType == Model_AttributeString::typeId()) {
     anAttr = new Model_AttributeString(anAttrLab);
-  } else if (theAttrType == ModelAPI_AttributeReference::type()) {
+  } else if (theAttrType == ModelAPI_AttributeReference::typeId()) {
     anAttr = new Model_AttributeReference(anAttrLab);
-  } else if (theAttrType == ModelAPI_AttributeSelection::type()) {
+  } else if (theAttrType == ModelAPI_AttributeSelection::typeId()) {
     anAttr = new Model_AttributeSelection(anAttrLab);
-  } else if (theAttrType == ModelAPI_AttributeSelectionList::type()) {
+  } else if (theAttrType == ModelAPI_AttributeSelectionList::typeId()) {
     anAttr = new Model_AttributeSelectionList(anAttrLab);
-  } else if (theAttrType == ModelAPI_AttributeRefAttr::type()) {
+  } else if (theAttrType == ModelAPI_AttributeRefAttr::typeId()) {
     anAttr = new Model_AttributeRefAttr(anAttrLab);
-  } else if (theAttrType == ModelAPI_AttributeRefList::type()) {
+  } else if (theAttrType == ModelAPI_AttributeRefList::typeId()) {
     anAttr = new Model_AttributeRefList(anAttrLab);
   } 
   // create also GeomData attributes here because only here the OCAF strucure is known
-  else if (theAttrType == GeomData_Point::type()) {
+  else if (theAttrType == GeomData_Point::typeId()) {
     anAttr = new GeomData_Point(anAttrLab);
-  } else if (theAttrType == GeomData_Dir::type()) {
+  } else if (theAttrType == GeomData_Dir::typeId()) {
     anAttr = new GeomData_Dir(anAttrLab);
-  } else if (theAttrType == GeomData_Point2D::type()) {
+  } else if (theAttrType == GeomData_Point2D::typeId()) {
     anAttr = new GeomData_Point2D(anAttrLab);
   }
   if (anAttr) {
@@ -268,21 +268,21 @@ void Model_Data::referencesToObjects(
   std::list<ObjectPtr> aReferenced; // not inside of cycle to avoid excess memory menagement
   for(; anAttr != myAttrs.end(); anAttr++) {
     std::string aType = anAttr->second->attributeType();
-    if (aType == ModelAPI_AttributeReference::type()) { // reference to object
+    if (aType == ModelAPI_AttributeReference::typeId()) { // reference to object
       std::shared_ptr<ModelAPI_AttributeReference> aRef = std::dynamic_pointer_cast<
           ModelAPI_AttributeReference>(anAttr->second);
       aReferenced.push_back(aRef->value());
-    } else if (aType == ModelAPI_AttributeRefAttr::type()) { // reference to attribute or object
+    } else if (aType == ModelAPI_AttributeRefAttr::typeId()) { // reference to attribute or object
       std::shared_ptr<ModelAPI_AttributeRefAttr> aRef = std::dynamic_pointer_cast<
           ModelAPI_AttributeRefAttr>(anAttr->second);
       aReferenced.push_back(aRef->isObject() ? aRef->object() : aRef->attr()->owner());
-    } else if (aType == ModelAPI_AttributeRefList::type()) { // list of references
+    } else if (aType == ModelAPI_AttributeRefList::typeId()) { // list of references
       aReferenced = std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(anAttr->second)->list();
-    } else if (aType == ModelAPI_AttributeSelection::type()) { // selection attribute
+    } else if (aType == ModelAPI_AttributeSelection::typeId()) { // selection attribute
       std::shared_ptr<ModelAPI_AttributeSelection> aRef = std::dynamic_pointer_cast<
           ModelAPI_AttributeSelection>(anAttr->second);
       aReferenced.push_back(aRef->context());
-    } else if (aType == ModelAPI_AttributeSelectionList::type()) { // list of selection attributes
+    } else if (aType == ModelAPI_AttributeSelectionList::typeId()) { // list of selection attributes
       std::shared_ptr<ModelAPI_AttributeSelectionList> aRef = std::dynamic_pointer_cast<
           ModelAPI_AttributeSelectionList>(anAttr->second);
       for(int a = aRef->size() - 1; a >= 0; a--) {
index 0392787f3c7a2b7a44558b0b851a81a3914a5eb6..a54ca670999c64d005f81c59f45d2a4712baf07e 100644 (file)
@@ -28,7 +28,7 @@ void Model_ResultPart::setData(std::shared_ptr<ModelAPI_Data> theData)
 {
   ModelAPI_Result::setData(theData);
   if (theData) {
-    data()->addAttribute(DOC_REF(), ModelAPI_AttributeDocRef::type());
+    data()->addAttribute(DOC_REF(), ModelAPI_AttributeDocRef::typeId());
   }
 }
 
index d6f02c5f79f2bf3eae4970f4042fa91e4b40f390..dd2b02b4cb066dcd7fad1921a4f71e65f7a38c6e 100644 (file)
@@ -250,7 +250,7 @@ bool Model_Update::updateFeature(FeaturePtr theFeature)
               //std::cout<<"Execute feature "<<theFeature->getKind()<<std::endl;
               // before execution update the selection attributes if any
               list<AttributePtr> aRefs = 
-                theFeature->data()->attributes(ModelAPI_AttributeSelection::type());
+                theFeature->data()->attributes(ModelAPI_AttributeSelection::typeId());
               list<AttributePtr>::iterator aRefsIter = aRefs.begin();
               for (; aRefsIter != aRefs.end(); aRefsIter++) {
                 std::shared_ptr<ModelAPI_AttributeSelection> aSel =
@@ -260,7 +260,7 @@ bool Model_Update::updateFeature(FeaturePtr theFeature)
                     aState = ModelAPI_StateInvalidArgument;
                 }
               }
-              aRefs = theFeature->data()->attributes(ModelAPI_AttributeSelectionList::type());
+              aRefs = theFeature->data()->attributes(ModelAPI_AttributeSelectionList::typeId());
               for (aRefsIter = aRefs.begin(); aRefsIter != aRefs.end(); aRefsIter++) {
                 std::shared_ptr<ModelAPI_AttributeSelectionList> aSel =
                   std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(*aRefsIter);
index 722c14fcd743a1772ac36cf45cfdba9ec4d6509e..5f0eb921be21967b0303c546dd57c5cd4baf20a2 100644 (file)
@@ -8,7 +8,7 @@
 
 std::string ModelAPI_AttributeBoolean::attributeType()
 {
-  return type();
+  return typeId();
 }
 
 /// To virtually destroy the fields of successors
index 122ffa70fdf700a67eb5c653e32a94005ca3da9e..661a8ffea25263f6a738875e789a9e29335b7ce4 100644 (file)
@@ -24,7 +24,7 @@ class ModelAPI_AttributeBoolean : public ModelAPI_Attribute
   MODELAPI_EXPORT virtual bool value() = 0;
 
   /// Returns the type of this class of attributes
-  MODELAPI_EXPORT static std::string type()
+  MODELAPI_EXPORT static std::string typeId()
   {
     return "Boolean";
   }
index 69563831ac607a57a96c1480a6cd1d5002816815..bf71a47260e33565c3275b84dfc45efbc8f5522b 100644 (file)
@@ -8,7 +8,7 @@
 
 std::string ModelAPI_AttributeDocRef::attributeType()
 {
-  return type();
+  return typeId();
 }
 
 ModelAPI_AttributeDocRef::~ModelAPI_AttributeDocRef()
index b1149c7f3ff873ff41b0e33822ab325ee3bb933a..0772c9fc3eba1aaaf538ff1a422ea073bfff16ef 100644 (file)
@@ -25,7 +25,7 @@ class ModelAPI_AttributeDocRef : public ModelAPI_Attribute
   MODELAPI_EXPORT virtual std::shared_ptr<ModelAPI_Document> value() = 0;
 
   /// Returns the type of this class of attributes
-  MODELAPI_EXPORT static std::string type()
+  MODELAPI_EXPORT static std::string typeId()
   {
     return "DocRef";
   }
index 7847dfabd7a94b621210446a0541d426dcbc7f3a..3aa85ae70f261a1ebf0e3c4e4ab05f1ebd00f7d1 100644 (file)
@@ -8,7 +8,7 @@
 
 std::string ModelAPI_AttributeDouble::attributeType()
 {
-  return type();
+  return typeId();
 }
 
 ModelAPI_AttributeDouble::~ModelAPI_AttributeDouble()
index 498b4050901c7d0cdb4b54be64e5ebcf358684cf..291bc18831bc0e94509b34bd66356c0ee250a966 100644 (file)
@@ -24,7 +24,7 @@ class ModelAPI_AttributeDouble : public ModelAPI_Attribute
   MODELAPI_EXPORT virtual double value() = 0;
 
   /// Returns the type of this class of attributes
-  MODELAPI_EXPORT static std::string type()
+  MODELAPI_EXPORT static std::string typeId()
   {
     return "Double";
   }
index afb2376a97d29b867f86a752b3fb66b08d452b11..94849fb138cdc96fb31e5774b779184e5ae65bb0 100644 (file)
@@ -9,7 +9,7 @@
 
 std::string ModelAPI_AttributeInteger::attributeType()
 {
-  return type();
+  return typeId();
 }
 
 /// To virtually destroy the fields of successors
index c1bc9e6afec24f1ee67304c277ecfbeb9dd983fa..e683166d32179ffcc6c9a92b63a2c576d8fe985e 100644 (file)
@@ -28,7 +28,7 @@ class ModelAPI_AttributeInteger : public ModelAPI_Attribute
   MODELAPI_EXPORT virtual int value() = 0;
 
   /// Returns the type of this class of attributes
-  MODELAPI_EXPORT static std::string type()
+  MODELAPI_EXPORT static std::string typeId()
   {
     return "Integer";
   }
index 35bd2d74d1b7b597541e5c2fb2be050963a5bf6f..523f289824adee59be301b48c9305ab8a2b94f56 100644 (file)
@@ -10,7 +10,7 @@
 
 std::string ModelAPI_AttributeRefAttr::attributeType()
 {
-  return type();
+  return typeId();
 }
 
 ModelAPI_AttributeRefAttr::~ModelAPI_AttributeRefAttr()
index bd4c7c4f41615c840b2bb7e69366ae7de959cda3..2d2580ab7c5a4ca2b8285548a9ff10e0a063b0f2 100644 (file)
@@ -35,7 +35,7 @@ class ModelAPI_AttributeRefAttr : public ModelAPI_Attribute
   MODELAPI_EXPORT virtual ObjectPtr object() = 0;
 
   /// Returns the type of this class of attributes
-  MODELAPI_EXPORT static std::string type()
+  MODELAPI_EXPORT static std::string typeId()
   {
     return "RefAttr";
   }
index ded44b22ccc3ea50e97958905268dc1d916d382d..eaedcc07421f066a659d6079d7d49c60a2259663 100644 (file)
@@ -9,7 +9,7 @@
 
 std::string ModelAPI_AttributeRefList::attributeType()
 {
-  return type();
+  return typeId();
 }
 
 ModelAPI_AttributeRefList::~ModelAPI_AttributeRefList()
index 9384d2855215acefab356e10b75e32e0a259c357..12235c5b8586f68079cb757a2aef474ed9561996 100644 (file)
@@ -20,7 +20,7 @@ class ModelAPI_AttributeRefList : public ModelAPI_Attribute
 {
  public:
   /// Returns the type of this class of attributes
-  MODELAPI_EXPORT static std::string type()
+  MODELAPI_EXPORT static std::string typeId()
   {
     return "RefList";
   }
index 4c13608200c21acd8876e729a05fe083c5d5aa07..1eb90580f5faa49c3cebc664cb6253d237a4db7b 100644 (file)
@@ -8,7 +8,7 @@
 
 std::string ModelAPI_AttributeReference::attributeType()
 {
-  return type();
+  return typeId();
 }
 
 ModelAPI_AttributeReference::~ModelAPI_AttributeReference()
index c90d78fe71fb6968bf40d6565bfa35acba4e2e32..948debd230c84159d0d439e7e420e5232b46ee84 100644 (file)
@@ -25,7 +25,7 @@ class ModelAPI_AttributeReference : public ModelAPI_Attribute
   MODELAPI_EXPORT virtual ObjectPtr value() = 0;
 
   /// Returns the type of this class of attributes
-  MODELAPI_EXPORT static std::string type()
+  MODELAPI_EXPORT static std::string typeId()
   {
     return "Reference";
   }
index e5accc0ca348f20d9643de84d129e571660006d7..455e6322478cbe08e488eaf724358968f545be18 100644 (file)
@@ -10,7 +10,7 @@
 
 std::string ModelAPI_AttributeSelection::attributeType()
 {
-  return type();
+  return typeId();
 }
 
 ModelAPI_AttributeSelection::~ModelAPI_AttributeSelection()
index b2986b3bb3b6fa963fd15c0977cbfb8e96b1ebeb..495da4180492d8eb36b9d62ba4d6e7978e6bd698 100644 (file)
@@ -33,7 +33,7 @@ class ModelAPI_AttributeSelection : public ModelAPI_Attribute
   virtual bool update() = 0;
 
   /// Returns the type of this class of attributes
-  static std::string type()
+  static std::string typeId()
   {
     return "Selection";
   }
index e88f4c7a8f43a87a64a772844f44d54b941f4bbf..a3b06f3ee58005c62e0097fbd56547f90c174de9 100644 (file)
@@ -9,7 +9,7 @@
 
 std::string ModelAPI_AttributeSelectionList::attributeType()
 {
-  return type();
+  return typeId();
 }
 
 ModelAPI_AttributeSelectionList::~ModelAPI_AttributeSelectionList()
index cc8077e325bfa221c9c0d58aefa784fd53a8c236..f440dcb92dcc65bcc7647407b553e274bb8709a0 100644 (file)
@@ -45,7 +45,7 @@ class ModelAPI_AttributeSelectionList : public ModelAPI_Attribute
   virtual void clear() = 0;
 
   /// Returns the type of this class of attributes
-  static std::string type()
+  static std::string typeId()
   {
     return "SelectionList";
   }
index 19df8f5ddd2258493a50f7caf812faf3b0316537..3c647633bb8bb27d76c9e356c33c9228df1bd592 100644 (file)
@@ -9,7 +9,7 @@
 
 std::string ModelAPI_AttributeString::attributeType()
 {
-  return type();
+  return typeId();
 }
 
 ModelAPI_AttributeString::~ModelAPI_AttributeString()
index 26f4b4e8a5f1f3e4797873938d88a3b338a65eeb..b3e0ad0e298d0d5a2be046c8cb45519db55b5e67 100644 (file)
@@ -26,7 +26,7 @@ class ModelAPI_AttributeString : public ModelAPI_Attribute
   MODELAPI_EXPORT virtual std::string value() = 0;
 
   /// Returns the type of this class of attributes
-  MODELAPI_EXPORT static std::string type()
+  MODELAPI_EXPORT static std::string typeId()
   {
     return "String";
   }
index b451ed1bb6a0da11fca64b59fe369df1ca2f09c0..8de8d27679c530607eba6f4c06ffc619891a6e65 100644 (file)
@@ -16,7 +16,7 @@ bool ModelAPI_ShapeValidator::isValid(const FeaturePtr& theFeature,
   std::string aCurrentAttributeId = theAttribute->id();
   // get all feature attributes
   std::list<AttributePtr> anAttrs = 
-                   theFeature->data()->attributes(ModelAPI_AttributeSelection::type());
+                   theFeature->data()->attributes(ModelAPI_AttributeSelection::typeId());
   if (anAttrs.size() > 0 && theShape.get() != NULL) {
     std::list<AttributePtr>::iterator anAttr = anAttrs.begin();
     for(; anAttr != anAttrs.end(); anAttr++) {
index fd851f31042303b71a63cd7925e873d1691ded77..c15375d72726aac12387d0a8fff9d3fafbfc6579 100644 (file)
@@ -3,8 +3,8 @@
 #===============================================================================
 from ModelAPI import *
 assert (ModelAPI_Feature.group() == "Features")
-assert (ModelAPI_AttributeDocRef.type() == "DocRef")
-assert (ModelAPI_AttributeDouble.type() == "Double")
-assert (ModelAPI_AttributeReference.type() == "Reference")
-assert (ModelAPI_AttributeRefAttr.type() == "RefAttr")
-assert (ModelAPI_AttributeRefList.type() == "RefList")
\ No newline at end of file
+assert (ModelAPI_AttributeDocRef.typeId() == "DocRef")
+assert (ModelAPI_AttributeDouble.typeId() == "Double")
+assert (ModelAPI_AttributeReference.typeId() == "Reference")
+assert (ModelAPI_AttributeRefAttr.typeId() == "RefAttr")
+assert (ModelAPI_AttributeRefList.typeId() == "RefList")
\ No newline at end of file
index 8c0eff95509abcfe7d2d04ecaad31d1ecb94be5e..f919c05fdb09f0506ecdeae3051f5548921ddca8 100644 (file)
@@ -42,6 +42,7 @@ SET(PROJECT_LIBRARIES
     ModuleBase
     Config
     GeomAPI
+    GeomDataAPI
     ${QT_LIBRARIES}
     ${CAS_KERNEL}
     ${CAS_SHAPE}
index 0b07da7e75db47c670207a7138059a3b9048c0fe..9157938f1fbb2e37928d7173ae094eb1acd5c5dd 100644 (file)
@@ -220,7 +220,7 @@ std::shared_ptr<GeomDataAPI_Point2D> PartSet_Tools::getFeaturePoint(FeaturePtr t
   std::shared_ptr<GeomAPI_Pnt2d> aClickedPoint = std::shared_ptr<GeomAPI_Pnt2d>(
                                                                  new GeomAPI_Pnt2d(theX, theY));
   std::list<std::shared_ptr<ModelAPI_Attribute> > anAttiributes =
-                                    theFeature->data()->attributes(GeomDataAPI_Point2D::type());
+                                    theFeature->data()->attributes(GeomDataAPI_Point2D::typeId());
   std::list<std::shared_ptr<ModelAPI_Attribute> >::const_iterator anIt = anAttiributes.begin(),
                                                                     aLast = anAttiributes.end();
   std::shared_ptr<GeomDataAPI_Point2D> aFPoint;
@@ -319,7 +319,7 @@ std::shared_ptr<GeomDataAPI_Point2D> PartSet_Tools::
   for (int i = 0; i < theSketch->numberOfSubs(); i++) {
     FeaturePtr aFeature = theSketch->subFeature(i);
     if (!theIgnore.contains(aFeature)) {
-      anAttiributes = aFeature->data()->attributes(GeomDataAPI_Point2D::type());
+      anAttiributes = aFeature->data()->attributes(GeomDataAPI_Point2D::typeId());
 
       std::list<std::shared_ptr<ModelAPI_Attribute> >::const_iterator anIt;
       for (anIt = anAttiributes.cbegin(); anIt != anAttiributes.cend(); ++anIt) {
@@ -362,7 +362,7 @@ void PartSet_Tools::setConstraints(CompositeFeaturePtr theSketch, FeaturePtr the
   for (; anIt != aLast; anIt++) {
     FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(*anIt);
     // find the given point in the feature attributes
-    anAttiributes = aFeature->data()->attributes(GeomDataAPI_Point2D::type());
+    anAttiributes = aFeature->data()->attributes(GeomDataAPI_Point2D::typeId());
     std::list<std::shared_ptr<ModelAPI_Attribute> >::const_iterator anIt = anAttiributes.begin(),
         aLast = anAttiributes.end();
     std::shared_ptr<GeomDataAPI_Point2D> aFPoint;
@@ -626,7 +626,7 @@ AttributePtr PartSet_Tools::findAttributeBy2dPoint(ObjectPtr theObj,
 
         // find the given point in the feature attributes
         std::list<AttributePtr> anAttiributes = 
-          aFeature->data()->attributes(GeomDataAPI_Point2D::type());
+          aFeature->data()->attributes(GeomDataAPI_Point2D::typeId());
         std::list<AttributePtr>::const_iterator anIt = anAttiributes.begin(), 
                                                 aLast = anAttiributes.end();
         for (; anIt != aLast && !anAttribute; anIt++) {
index 278c3e637906497337b4230cf972e978c90ed773..30d95d4729e786de0cd6f168a3f6bb2ec876b95c 100644 (file)
@@ -116,7 +116,7 @@ bool PartSet_DifferentObjectsValidator::isValid(const FeaturePtr& theFeature,
 {
   // Check RefAttr attributes
   std::list<std::shared_ptr<ModelAPI_Attribute> > anAttrs = 
-    theFeature->data()->attributes(ModelAPI_AttributeRefAttr::type());
+    theFeature->data()->attributes(ModelAPI_AttributeRefAttr::typeId());
   if (anAttrs.size() > 0) {
     std::list<std::shared_ptr<ModelAPI_Attribute> >::iterator anAttr = anAttrs.begin();
     for(; anAttr != anAttrs.end(); anAttr++) {
@@ -130,7 +130,7 @@ bool PartSet_DifferentObjectsValidator::isValid(const FeaturePtr& theFeature,
     }
   }
   // Check selection attributes
-  anAttrs = theFeature->data()->attributes(ModelAPI_AttributeSelection::type());
+  anAttrs = theFeature->data()->attributes(ModelAPI_AttributeSelection::typeId());
   if (anAttrs.size() > 0) {
     std::list<std::shared_ptr<ModelAPI_Attribute> >::iterator anAttr = anAttrs.begin();
     for(; anAttr != anAttrs.end(); anAttr++) {
@@ -144,7 +144,7 @@ bool PartSet_DifferentObjectsValidator::isValid(const FeaturePtr& theFeature,
     }
   }
   // Check selection attributes
-  anAttrs = theFeature->data()->attributes(ModelAPI_AttributeReference::type());
+  anAttrs = theFeature->data()->attributes(ModelAPI_AttributeReference::typeId());
   if (anAttrs.size() > 0) {
     std::list<std::shared_ptr<ModelAPI_Attribute> >::iterator anAttr = anAttrs.begin();
     for(; anAttr != anAttrs.end(); anAttr++) {
index d801aabacb294e48c188df5d896674172be61454..9d14f6b4c09a609f4f570e8f6d764d2288849f0d 100644 (file)
@@ -50,6 +50,7 @@ SET(PROJECT_LIBRARIES
     GeomAPI
     GeomAlgoAPI
     ModelAPI
+    GeomDataAPI
     ${CAS_KERNEL}
     ${CAS_SHAPE}
 )
index deb2b2faeb4df9d9c5a40f08aa6fd5039b362e9d..6295057977b2fc058736979d944cdfb1f3797114 100644 (file)
@@ -31,10 +31,10 @@ SketchPlugin_Arc::SketchPlugin_Arc()
 
 void SketchPlugin_Arc::initAttributes()
 {
-  data()->addAttribute(CENTER_ID(), GeomDataAPI_Point2D::type());
-  data()->addAttribute(START_ID(), GeomDataAPI_Point2D::type());
-  data()->addAttribute(END_ID(), GeomDataAPI_Point2D::type());
-  data()->addAttribute(EXTERNAL_ID(), ModelAPI_AttributeSelection::type());
+  data()->addAttribute(CENTER_ID(), GeomDataAPI_Point2D::typeId());
+  data()->addAttribute(START_ID(), GeomDataAPI_Point2D::typeId());
+  data()->addAttribute(END_ID(), GeomDataAPI_Point2D::typeId());
+  data()->addAttribute(EXTERNAL_ID(), ModelAPI_AttributeSelection::typeId());
   ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), EXTERNAL_ID());
 }
 
index e880df9afc2f7e47e06ddb185ae6ea4ce449c4ca..c92948bd2d711ad4081b2c06e0a218d2f6fc0114 100644 (file)
@@ -28,9 +28,9 @@ SketchPlugin_Circle::SketchPlugin_Circle()
 
 void SketchPlugin_Circle::initAttributes()
 {
-  data()->addAttribute(CENTER_ID(), GeomDataAPI_Point2D::type());
-  data()->addAttribute(RADIUS_ID(), ModelAPI_AttributeDouble::type());
-  data()->addAttribute(EXTERNAL_ID(), ModelAPI_AttributeSelection::type());
+  data()->addAttribute(CENTER_ID(), GeomDataAPI_Point2D::typeId());
+  data()->addAttribute(RADIUS_ID(), ModelAPI_AttributeDouble::typeId());
+  data()->addAttribute(EXTERNAL_ID(), ModelAPI_AttributeSelection::typeId());
   ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), EXTERNAL_ID());
 }
 
index 15f6d1cccfc0844d7e55f573fa3994e588d47781..02cf66ca06415735860e72076d76f67c2a3f8f03 100644 (file)
@@ -16,8 +16,8 @@ SketchPlugin_ConstraintCoincidence::SketchPlugin_ConstraintCoincidence()
 
 void SketchPlugin_ConstraintCoincidence::initAttributes()
 {
-  data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::type());
-  data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::type());
+  data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+  data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
 }
 
 void SketchPlugin_ConstraintCoincidence::execute()
index bdd410ec06de64bf7fb35e2f163e16f8c3de869b..38d4db89ec661e0dc6a5a715e175263f50660974 100644 (file)
@@ -25,10 +25,10 @@ SketchPlugin_ConstraintDistance::SketchPlugin_ConstraintDistance()
 //*************************************************************************************
 void SketchPlugin_ConstraintDistance::initAttributes()
 {
-  data()->addAttribute(SketchPlugin_Constraint::VALUE(), ModelAPI_AttributeDouble::type());
-  data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::type());
-  data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::type());
-  data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::type());
+  data()->addAttribute(SketchPlugin_Constraint::VALUE(), ModelAPI_AttributeDouble::typeId());
+  data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId());
+  data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+  data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
 }
 
 //*************************************************************************************
index 224ea32b5239cb53b2c8bc06a945a1f17b2aaca6..eb66e1d6bdb562c33e3c01bfe4adf8292425a584 100644 (file)
@@ -26,9 +26,9 @@ SketchPlugin_ConstraintLength::SketchPlugin_ConstraintLength()
 
 void SketchPlugin_ConstraintLength::initAttributes()
 {
-  data()->addAttribute(SketchPlugin_Constraint::VALUE(), ModelAPI_AttributeDouble::type());
-  data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::type());
-  data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::type());
+  data()->addAttribute(SketchPlugin_Constraint::VALUE(), ModelAPI_AttributeDouble::typeId());
+  data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId());
+  data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
 }
 
 void SketchPlugin_ConstraintLength::execute()
index 6997f4f0a36fbb8b30a8caa4edabe8573e0a49d0..f222602474584b52cc7571bbcf041bff61969307 100644 (file)
@@ -25,9 +25,9 @@ SketchPlugin_ConstraintParallel::SketchPlugin_ConstraintParallel()
 
 void SketchPlugin_ConstraintParallel::initAttributes()
 {
-  data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::type());
-  data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::type());
-  data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::type());
+  data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+  data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
+  data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId());
 }
 
 void SketchPlugin_ConstraintParallel::execute()
index c63555da559034615fbe754dc73a63acd7cc3e17..6137a1e23aba8f722b5d767f817ad798f5409bf7 100644 (file)
@@ -25,8 +25,8 @@ SketchPlugin_ConstraintPerpendicular::SketchPlugin_ConstraintPerpendicular()
 
 void SketchPlugin_ConstraintPerpendicular::initAttributes()
 {
-  data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::type());
-  data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::type());
+  data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+  data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
 }
 
 void SketchPlugin_ConstraintPerpendicular::execute()
index 135b6bbdb285d2b66a5671251c11866f814a2869..5ee8ea893e20a059a114ebbb3a17f12889b32bd5 100644 (file)
@@ -29,9 +29,9 @@ SketchPlugin_ConstraintRadius::SketchPlugin_ConstraintRadius()
 
 void SketchPlugin_ConstraintRadius::initAttributes()
 {
-  data()->addAttribute(SketchPlugin_Constraint::VALUE(), ModelAPI_AttributeDouble::type());
-  data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::type());
-  data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::type());
+  data()->addAttribute(SketchPlugin_Constraint::VALUE(), ModelAPI_AttributeDouble::typeId());
+  data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+  data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId());
 }
 
 void SketchPlugin_ConstraintRadius::execute()
index 5a7b9d5f9781283302182a23c2e8ad6a6013be56..a9d7fda022bf6ef98ba5dc592cd459950bd427ba 100644 (file)
@@ -18,7 +18,7 @@ SketchPlugin_ConstraintRigid::SketchPlugin_ConstraintRigid()
 
 void SketchPlugin_ConstraintRigid::initAttributes()
 {
-  data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::type());
+  data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
 }
 
 void SketchPlugin_ConstraintRigid::execute()
index 429f7e132cf55ae41fcd7a55d8ba8f85af136eb4..2525b642e17fe79d688fffa813b3d466f2400c7f 100644 (file)
@@ -27,9 +27,9 @@ SketchPlugin_Line::SketchPlugin_Line()
 
 void SketchPlugin_Line::initAttributes()
 {
-  data()->addAttribute(START_ID(), GeomDataAPI_Point2D::type());
-  data()->addAttribute(END_ID(), GeomDataAPI_Point2D::type());
-  data()->addAttribute(EXTERNAL_ID(), ModelAPI_AttributeSelection::type());
+  data()->addAttribute(START_ID(), GeomDataAPI_Point2D::typeId());
+  data()->addAttribute(END_ID(), GeomDataAPI_Point2D::typeId());
+  data()->addAttribute(EXTERNAL_ID(), ModelAPI_AttributeSelection::typeId());
   ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), EXTERNAL_ID());
 }
 
index 3fd71b5609e3429a5102ac7b9e314d69982802d2..cb2cad6de12cb3e4265aa7664737a340e9348736 100644 (file)
@@ -26,8 +26,8 @@ SketchPlugin_Point::SketchPlugin_Point()
 
 void SketchPlugin_Point::initAttributes()
 {
-  data()->addAttribute(SketchPlugin_Point::COORD_ID(), GeomDataAPI_Point2D::type());
-  data()->addAttribute(EXTERNAL_ID(), ModelAPI_AttributeSelection::type());
+  data()->addAttribute(SketchPlugin_Point::COORD_ID(), GeomDataAPI_Point2D::typeId());
+  data()->addAttribute(EXTERNAL_ID(), ModelAPI_AttributeSelection::typeId());
   ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), EXTERNAL_ID());
 }
 
index 8e9644e459fac19d312d3fd04a9281abf99902df..b85b3d209d0b1692b9836f970ee9aa5bab30fc3f 100644 (file)
@@ -43,13 +43,13 @@ SketchPlugin_Sketch::SketchPlugin_Sketch()
 
 void SketchPlugin_Sketch::initAttributes()
 {
-  data()->addAttribute(SketchPlugin_Sketch::ORIGIN_ID(), GeomDataAPI_Point::type());
-  data()->addAttribute(SketchPlugin_Sketch::DIRX_ID(), GeomDataAPI_Dir::type());
-  data()->addAttribute(SketchPlugin_Sketch::DIRY_ID(), GeomDataAPI_Dir::type());
-  data()->addAttribute(SketchPlugin_Sketch::NORM_ID(), GeomDataAPI_Dir::type());
-  data()->addAttribute(SketchPlugin_Sketch::FEATURES_ID(), ModelAPI_AttributeRefList::type());
+  data()->addAttribute(SketchPlugin_Sketch::ORIGIN_ID(), GeomDataAPI_Point::typeId());
+  data()->addAttribute(SketchPlugin_Sketch::DIRX_ID(), GeomDataAPI_Dir::typeId());
+  data()->addAttribute(SketchPlugin_Sketch::DIRY_ID(), GeomDataAPI_Dir::typeId());
+  data()->addAttribute(SketchPlugin_Sketch::NORM_ID(), GeomDataAPI_Dir::typeId());
+  data()->addAttribute(SketchPlugin_Sketch::FEATURES_ID(), ModelAPI_AttributeRefList::typeId());
   // the selected face, base for the sketcher plane, not obligatory
-  data()->addAttribute(SketchPlugin_Feature::EXTERNAL_ID(), ModelAPI_AttributeSelection::type());
+  data()->addAttribute(SketchPlugin_Feature::EXTERNAL_ID(), ModelAPI_AttributeSelection::typeId());
   ModelAPI_Session::get()->validators()->registerNotObligatory(
     getKind(), SketchPlugin_Feature::EXTERNAL_ID());
 }
index 29bdf3c27310df0ba7abadc7ca882ea353ef4f85..abef5066c21a8809d83327f5d92be9627796bb73 100644 (file)
@@ -62,7 +62,7 @@ bool SketchPlugin_DifferentObjectsValidator::isValid(const FeaturePtr& theFeatur
                                                  const ObjectPtr& theObject) const
 {
   std::list<std::shared_ptr<ModelAPI_Attribute> > anAttrs = 
-    theFeature->data()->attributes(ModelAPI_AttributeRefAttr::type());
+    theFeature->data()->attributes(ModelAPI_AttributeRefAttr::typeId());
   std::list<std::shared_ptr<ModelAPI_Attribute> >::iterator anAttr = anAttrs.begin();
   for(; anAttr != anAttrs.end(); anAttr++) {
     if (*anAttr) {
@@ -86,7 +86,7 @@ bool SketchPlugin_DifferentObjectsValidator::isValid(
     const FeaturePtr aFeature = std::dynamic_pointer_cast<ModelAPI_Feature>(anObj);
 
     std::list<std::shared_ptr<ModelAPI_Attribute> > anAttrs = 
-      aFeature->data()->attributes(ModelAPI_AttributeRefAttr::type());
+      aFeature->data()->attributes(ModelAPI_AttributeRefAttr::typeId());
     std::list<std::shared_ptr<ModelAPI_Attribute> >::iterator anAttr = anAttrs.begin();
     for(; anAttr != anAttrs.end(); anAttr++) {
       if (*anAttr && *anAttr != theAttribute) {
@@ -105,7 +105,7 @@ bool SketchPlugin_DifferentObjectsValidator::isValid(const FeaturePtr& theFeatur
   const std::list<std::string>& theArguments, const AttributePtr& theAttribute) const
 {
   std::list<std::shared_ptr<ModelAPI_Attribute> > anAttrs = 
-    theFeature->data()->attributes(ModelAPI_AttributeRefAttr::type());
+    theFeature->data()->attributes(ModelAPI_AttributeRefAttr::typeId());
   std::list<std::shared_ptr<ModelAPI_Attribute> >::iterator anAttr = anAttrs.begin();
   for(; anAttr != anAttrs.end(); anAttr++) {
     if (*anAttr) {
index 772c94b96ea400fa9efdd87a0966b289d072ff9e..5256acb2d1346fa9243190bca17e7fdba5001937 100644 (file)
@@ -12,8 +12,8 @@
         
     SketchPlugin_ConstraintCoincidence
         static const std::string MY_CONSTRAINT_COINCIDENCE_ID("SketchConstraintCoincidence");
-        data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::type());
-        data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::type());
+        data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+        data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
 
 """
 from GeomDataAPI import *
index 4c50263b2e1baf1ee85da7b24d4deffc29d85aee..f57728799eac37b5ab6549787d2eff8e98430937 100644 (file)
         
     SketchPlugin_ConstraintDistance
         static const std::string MY_CONSTRAINT_DISTANCE_ID("SketchConstraintDistance");
-        data()->addAttribute(SketchPlugin_Constraint::VALUE(),    ModelAPI_AttributeDouble::type());
-        data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::type());
-        data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::type());
-        data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::type());
+        data()->addAttribute(SketchPlugin_Constraint::VALUE(),    ModelAPI_AttributeDouble::typeId());
+        data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId());
+        data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+        data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
         
     
 """
index 48acf2c6b612bc12b12749f1bd089b5c8025f7ca..12915b42ea92bd87afdef79186337a0b80820f14 100644 (file)
@@ -4,9 +4,9 @@
         
     SketchPlugin_ConstraintLength
         static const std::string MY_CONSTRAINT_LENGTH_ID("SketchConstraintLength");
-        data()->addAttribute(SketchPlugin_Constraint::VALUE(),    ModelAPI_AttributeDouble::type());
-        data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::type());
-        data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::type());
+        data()->addAttribute(SketchPlugin_Constraint::VALUE(),    ModelAPI_AttributeDouble::typeId());
+        data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId());
+        data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
 
 """
 from GeomDataAPI import *
index 052e9272af1961924b4391a28c50aa2d93cdd02d..ce2dcea47d5ebe5533872863ad42f23c1e3204ba 100644 (file)
@@ -4,9 +4,9 @@
         
     SketchPlugin_ConstraintParallel
         static const std::string MY_CONSTRAINT_PARALLEL_ID("SketchConstraintParallel");
-        data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::type());
-        data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::type());
-        data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::type());
+        data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+        data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
+        data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId());
 
 """
 from GeomDataAPI import *
index 2f9c6bf069f7daaf11d36e93c2d9e68e38514965..435b7d8c426df88cf1a34bba70bb84b41478e192 100644 (file)
@@ -12,9 +12,9 @@
         
     SketchPlugin_ConstraintPerpendicular
         static const std::string MY_CONSTRAINT_PERPENDICULAR_ID("SketchConstraintPerpendicular");
-        data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::type());
-        data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::type());
-        data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::type()); 
+        data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+        data()->addAttribute(SketchPlugin_Constraint::ENTITY_B(), ModelAPI_AttributeRefAttr::typeId());
+        data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId()); 
 """
 from GeomDataAPI import *
 from ModelAPI import *
index cc71a412ff7b5cc2904f46584ffebbc896614d14..8adb6082d863cd14e2c12a4598e95a44b150c392 100644 (file)
@@ -12,9 +12,9 @@
         
     SketchPlugin_ConstraintRadius
         static const std::string MY_CONSTRAINT_RADIUS_ID("SketchConstraintRadius");
-        data()->addAttribute(SketchPlugin_Constraint::VALUE(),    ModelAPI_AttributeDouble::type());
-        data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::type());
-        data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::type());
+        data()->addAttribute(SketchPlugin_Constraint::VALUE(),    ModelAPI_AttributeDouble::typeId());
+        data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
+        data()->addAttribute(SketchPlugin_Constraint::FLYOUT_VALUE_PNT(), GeomDataAPI_Point2D::typeId());
 
 """
 from GeomDataAPI import *
index 9f6eaf31a9dbea5db0938cc25917b6b243e864d7..47dfadf51a9a54f14601bfd89e1b0a8b584c2950 100644 (file)
@@ -12,7 +12,7 @@
         
     SketchPlugin_ConstraintRigid
         static const std::string MY_CONSTRAINT_RIGID_ID("SketchConstraintRigid");
-        data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::type());
+        data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), ModelAPI_AttributeRefAttr::typeId());
 
 """
 from GeomDataAPI import *
index c59725e218a969c2fe77015a48e7cc1edd79edba..9835bf2cc2bdd5589c0aa7dff7ffac1610e6a6ef 100644 (file)
@@ -5,15 +5,15 @@
     static const std::string MY_CENTER_ID = "ArcCenter";
     static const std::string MY_START_ID = "ArcStartPoint";
     static const std::string MY_END_ID = "ArcEndPoint";
-    data()->addAttribute(SketchPlugin_Arc::CENTER_ID(), GeomDataAPI_Point2D::type());
-    data()->addAttribute(SketchPlugin_Arc::START_ID(),  GeomDataAPI_Point2D::type());
-    data()->addAttribute(SketchPlugin_Arc::END_ID(),    GeomDataAPI_Point2D::type());
+    data()->addAttribute(SketchPlugin_Arc::CENTER_ID(), GeomDataAPI_Point2D::typeId());
+    data()->addAttribute(SketchPlugin_Arc::START_ID(),  GeomDataAPI_Point2D::typeId());
+    data()->addAttribute(SketchPlugin_Arc::END_ID(),    GeomDataAPI_Point2D::typeId());
     
     static const std::string MY_CIRCLE_ID("SketchCircle");
     static const std::string MY_CIRCLE_CENTER_ID("CircleCenter");
     static const std::string MY_CIRCLE_RADIUS_ID("CircleRadius");
-    data()->addAttribute(SketchPlugin_Circle::CENTER_ID(), GeomDataAPI_Point2D::type());
-    data()->addAttribute(SketchPlugin_Circle::RADIUS_ID(), ModelAPI_AttributeDouble::type());
+    data()->addAttribute(SketchPlugin_Circle::CENTER_ID(), GeomDataAPI_Point2D::typeId());
+    data()->addAttribute(SketchPlugin_Circle::RADIUS_ID(), ModelAPI_AttributeDouble::typeId());
 """
 
 #=========================================================================
@@ -139,8 +139,8 @@ assert (anCircleCentr.y() == 0)
 assert (not anCircleCentr.isInitialized())
 aCircleRadius = aSketchCircle.real("CircleRadius")
 assert (type(aCircleRadius) == ModelAPI_AttributeDouble)
-# ModelAPI_AttributeDouble.type() is checked in ModelAPI_TestConstants
-assert (aCircleRadius.attributeType() == ModelAPI_AttributeDouble.type())
+# ModelAPI_AttributeDouble.typeId() is checked in ModelAPI_TestConstants
+assert (aCircleRadius.attributeType() == ModelAPI_AttributeDouble.typeId())
 assert (aCircleRadius.value() == 0)
 anCircleCentr.setValue(-25., -25)
 aCircleRadius.setValue(25.)
index 61a42b64cf43195b46d9b6bb549cffc78040aa83..79d47ccf0a905938b68f37e4e4fdddf6583cd9d9 100644 (file)
@@ -231,9 +231,9 @@ AttrType typeOfAttribute(std::shared_ptr<ModelAPI_Attribute> theAttribute)
   } else {
     if (anAttrRef->attr().get() != NULL) {
       const std::string aType = anAttrRef->attr()->attributeType();
-      if (aType == GeomDataAPI_Point2D::type())
+      if (aType == GeomDataAPI_Point2D::typeId())
         return POINT2D;
-      if (aType == GeomDataAPI_Point2D::type())
+      if (aType == GeomDataAPI_Point2D::typeId())
         return POINT2D;
     }
   }