]> SALOME platform Git repositories - modules/shaper.git/blob - src/GeomDataAPI/GeomDataAPI.i
Salome HOME
Speed up the redraw of sketch with constraints moved by the point of the line
[modules/shaper.git] / src / GeomDataAPI / GeomDataAPI.i
1 /* GeomDataAPI.i */
2 %module GeomDataAPI
3 %{
4   #include "ModelAPI_Attribute.h"
5   #include "GeomDataAPI.h"
6   #include "GeomDataAPI_Point.h"
7   #include "GeomDataAPI_Dir.h"
8   #include "GeomDataAPI_Point2D.h"
9   
10   template<class T> std::shared_ptr<T> castTo(std::shared_ptr<ModelAPI_Attribute> theObject) 
11   { 
12     return std::dynamic_pointer_cast<T>(theObject); 
13   } 
14 %}
15
16 // to avoid error on this
17 #define GEOMDATAAPI_EXPORT
18 #define MODELAPI_EXPORT
19
20 // standard definitions
21 %include "typemaps.i"
22 %include "std_string.i"
23 %include "std_list.i"
24 %include "std_shared_ptr.i"
25
26 %shared_ptr(ModelAPI_Attribute)
27 %shared_ptr(GeomDataAPI_Point)
28 %shared_ptr(GeomDataAPI_Dir)
29 %shared_ptr(GeomDataAPI_Point2D)
30
31 // all supported interfaces
32 %include "ModelAPI_Attribute.h"
33 %include "GeomDataAPI_Point.h"
34 %include "GeomDataAPI_Dir.h"
35 %include "GeomDataAPI_Point2D.h"
36
37 template<class T> std::shared_ptr<T> castTo(std::shared_ptr<ModelAPI_Attribute> theObject);
38 %template(geomDataAPI_Point) castTo<GeomDataAPI_Point>;
39 %template(geomDataAPI_Dir) castTo<GeomDataAPI_Dir>;
40 %template(geomDataAPI_Point2D) castTo<GeomDataAPI_Point2D>;