4 #include <boost/shared_ptr.hpp>
6 #include "ModelAPI_Attribute.h"
7 #include "GeomDataAPI.h"
8 #include "GeomDataAPI_Point.h"
9 #include "GeomDataAPI_Dir.h"
10 #include "GeomDataAPI_Point2D.h"
12 template<class T> boost::shared_ptr<T> castTo(boost::shared_ptr<ModelAPI_Attribute> theObject)
14 return boost::dynamic_pointer_cast<T>(theObject);
18 // to avoid error on this
19 #define GEOMDATAAPI_EXPORT
20 #define MODELAPI_EXPORT
22 // standard definitions
24 %include "std_string.i"
28 %include <boost_shared_ptr.i>
29 %shared_ptr(ModelAPI_Attribute)
30 %shared_ptr(GeomDataAPI_Point)
31 %shared_ptr(GeomDataAPI_Dir)
32 %shared_ptr(GeomDataAPI_Point2D)
34 // all supported interfaces
35 %include "ModelAPI_Attribute.h"
36 %include "GeomDataAPI_Point.h"
37 %include "GeomDataAPI_Dir.h"
38 %include "GeomDataAPI_Point2D.h"
40 template<class T> boost::shared_ptr<T> castTo(boost::shared_ptr<ModelAPI_Attribute> theObject);
41 %template(geomDataAPI_Point) castTo<GeomDataAPI_Point>;
42 %template(geomDataAPI_Dir) castTo<GeomDataAPI_Dir>;
43 %template(geomDataAPI_Point2D) castTo<GeomDataAPI_Point2D>;