4 #include "ModelAPI_Attribute.h"
5 #include "GeomDataAPI.h"
6 #include "GeomDataAPI_Point.h"
7 #include "GeomDataAPI_Dir.h"
8 #include "GeomDataAPI_Point2D.h"
10 template<class T> std::shared_ptr<T> castTo(std::shared_ptr<ModelAPI_Attribute> theObject)
12 return std::dynamic_pointer_cast<T>(theObject);
16 // to avoid error on this
17 #define GEOMDATAAPI_EXPORT
18 #define MODELAPI_EXPORT
20 // standard definitions
22 %include "std_string.i"
24 %include "std_shared_ptr.i"
26 %shared_ptr(ModelAPI_Attribute)
27 %shared_ptr(GeomDataAPI_Point)
28 %shared_ptr(GeomDataAPI_Dir)
29 %shared_ptr(GeomDataAPI_Point2D)
31 // all supported interfaces
32 %include "ModelAPI_Attribute.h"
33 %include "GeomDataAPI_Point.h"
34 %include "GeomDataAPI_Dir.h"
35 %include "GeomDataAPI_Point2D.h"
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>;