From: spo Date: Tue, 7 Jun 2016 13:42:35 +0000 (+0300) Subject: Add Bool, Pnt, Pnt2d and Dir attributes X-Git-Tag: V_2.4.0~91^2~73 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5a6206aa946a3906e103f64675ba5924adf0ff89;p=modules%2Fshaper.git Add Bool, Pnt, Pnt2d and Dir attributes --- diff --git a/src/ModelHighAPI/CMakeLists.txt b/src/ModelHighAPI/CMakeLists.txt index b513ee600..c495be0d1 100644 --- a/src/ModelHighAPI/CMakeLists.txt +++ b/src/ModelHighAPI/CMakeLists.txt @@ -21,6 +21,8 @@ SET(PROJECT_SOURCES SET(PROJECT_LIBRARIES Config Events + GeomAPI + GeomDataAPI ModelAPI ) @@ -45,6 +47,7 @@ SET(SWIG_LINK_LIBRARIES INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/src/Events ${PROJECT_SOURCE_DIR}/src/GeomAPI + ${PROJECT_SOURCE_DIR}/src/GeomDataAPI ${PROJECT_SOURCE_DIR}/src/ModelAPI ) diff --git a/src/ModelHighAPI/ModelHighAPI_Tools.cpp b/src/ModelHighAPI/ModelHighAPI_Tools.cpp index 478c19503..0c82867a6 100644 --- a/src/ModelHighAPI/ModelHighAPI_Tools.cpp +++ b/src/ModelHighAPI/ModelHighAPI_Tools.cpp @@ -7,6 +7,14 @@ //-------------------------------------------------------------------------------------- #include "ModelHighAPI_Tools.h" //-------------------------------------------------------------------------------------- +#include +#include +#include +//-------------------------------------------------------------------------------------- +#include +#include +#include +//-------------------------------------------------------------------------------------- #include #include #include @@ -22,6 +30,35 @@ //-------------------------------------------------------------------------------------- #include "ModelHighAPI_Double.h" #include "ModelHighAPI_Selection.h" + +//-------------------------------------------------------------------------------------- +void fillAttribute(const std::shared_ptr & theValue, + const std::shared_ptr & theAttribute) +{ + theAttribute->setValue(theValue); +} + +//-------------------------------------------------------------------------------------- +void fillAttribute(const std::shared_ptr & theValue, + const std::shared_ptr & theAttribute) +{ + theAttribute->setValue(theValue); +} + +//-------------------------------------------------------------------------------------- +void fillAttribute(const std::shared_ptr & theValue, + const std::shared_ptr & theAttribute) +{ + theAttribute->setValue(theValue); +} + +//-------------------------------------------------------------------------------------- +void fillAttribute(bool theValue, + const std::shared_ptr & theAttribute) +{ + theAttribute->setValue(theValue); +} + //-------------------------------------------------------------------------------------- void fillAttribute(const ModelHighAPI_Double & theValue, const std::shared_ptr & theAttribute) diff --git a/src/ModelHighAPI/ModelHighAPI_Tools.h b/src/ModelHighAPI/ModelHighAPI_Tools.h index f8e8b268e..fbfd81f97 100644 --- a/src/ModelHighAPI/ModelHighAPI_Tools.h +++ b/src/ModelHighAPI/ModelHighAPI_Tools.h @@ -14,6 +14,14 @@ #include #include //-------------------------------------------------------------------------------------- +class GeomAPI_Dir; +class GeomAPI_Pnt; +class GeomAPI_Pnt2d; +//-------------------------------------------------------------------------------------- +class GeomDataAPI_Dir; +class GeomDataAPI_Point; +class GeomDataAPI_Point2D; +//-------------------------------------------------------------------------------------- class ModelAPI_AttributeBoolean; class ModelAPI_AttributeDocRef; class ModelAPI_AttributeDouble; @@ -30,6 +38,23 @@ class ModelAPI_AttributeString; class ModelHighAPI_Double; class ModelHighAPI_Selection; //-------------------------------------------------------------------------------------- +MODELHIGHAPI_EXPORT +void fillAttribute(const std::shared_ptr & theValue, + const std::shared_ptr & theAttribute); + +MODELHIGHAPI_EXPORT +void fillAttribute(const std::shared_ptr & theValue, + const std::shared_ptr & theAttribute); + +MODELHIGHAPI_EXPORT +void fillAttribute(const std::shared_ptr & theValue, + const std::shared_ptr & theAttribute); + +//-------------------------------------------------------------------------------------- +MODELHIGHAPI_EXPORT +void fillAttribute(bool theValue, + const std::shared_ptr & theAttribute); + MODELHIGHAPI_EXPORT void fillAttribute(const ModelHighAPI_Double & theValue, const std::shared_ptr & theAttribute);