4 #include "ModelAPI_Attribute.h"
5 #include "GeomDataAPI.h"
6 #include "GeomDataAPI_Point.h"
7 #include "GeomDataAPI_Dir.h"
8 #include "GeomDataAPI_Point2D.h"
14 template<class T> std::shared_ptr<T> castTo(std::shared_ptr<ModelAPI_Attribute> theObject)
16 return std::dynamic_pointer_cast<T>(theObject);
20 // to avoid error on this
21 #define GEOMDATAAPI_EXPORT
22 #define MODELAPI_EXPORT
24 // standard definitions
26 %include "std_string.i"
28 %include "std_shared_ptr.i"
30 %shared_ptr(ModelAPI_Attribute)
31 %shared_ptr(GeomDataAPI_Point)
32 %shared_ptr(GeomDataAPI_Dir)
33 %shared_ptr(GeomDataAPI_Point2D)
35 // all supported interfaces
36 %include "ModelAPI_Attribute.h"
37 %include "GeomDataAPI_Point.h"
38 %include "GeomDataAPI_Dir.h"
39 %include "GeomDataAPI_Point2D.h"
41 template<class T> std::shared_ptr<T> castTo(std::shared_ptr<ModelAPI_Attribute> theObject);
42 %template(geomDataAPI_Point) castTo<GeomDataAPI_Point>;
43 %template(geomDataAPI_Dir) castTo<GeomDataAPI_Dir>;
44 %template(geomDataAPI_Point2D) castTo<GeomDataAPI_Point2D>;