From 5a6206aa946a3906e103f64675ba5924adf0ff89 Mon Sep 17 00:00:00 2001 From: spo Date: Tue, 7 Jun 2016 16:42:35 +0300 Subject: [PATCH] Add Bool, Pnt, Pnt2d and Dir attributes --- src/ModelHighAPI/CMakeLists.txt | 3 ++ src/ModelHighAPI/ModelHighAPI_Tools.cpp | 37 +++++++++++++++++++++++++ src/ModelHighAPI/ModelHighAPI_Tools.h | 25 +++++++++++++++++ 3 files changed, 65 insertions(+) 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); -- 2.39.2