4 #include "GeomAPI_Interface.h"
5 #include "GeomAPI_Shape.h"
7 #include "ModelAPI_Document.h"
8 #include "ModelAPI_Session.h"
9 #include "ModelAPI_Object.h"
10 #include "ModelAPI_Feature.h"
11 #include "ModelAPI_Data.h"
12 #include "ModelAPI_Attribute.h"
13 #include "ModelAPI_AttributeDocRef.h"
14 #include "ModelAPI_AttributeDouble.h"
15 #include "ModelAPI_AttributeInteger.h"
16 #include "ModelAPI_AttributeString.h"
17 #include "ModelAPI_AttributeReference.h"
18 #include "ModelAPI_AttributeRefAttr.h"
19 #include "ModelAPI_Validator.h"
20 #include "ModelAPI_AttributeRefList.h"
21 #include "ModelAPI_Result.h"
22 #include "ModelAPI_ResultConstruction.h"
23 #include "ModelAPI_ResultBody.h"
24 #include "ModelAPI_ResultPart.h"
26 template<class T> boost::shared_ptr<T> castTo(boost::shared_ptr<ModelAPI_Result> theObject)
28 return boost::dynamic_pointer_cast<T>(theObject);
34 // to avoid error on this
35 #define MODELAPI_EXPORT
36 #define GEOMAPI_EXPORT
38 // standard definitions
40 %include "std_string.i"
44 %include <boost_shared_ptr.i>
45 // For ModelAPI_ResultConstruction.shape()
46 %shared_ptr(GeomAPI_Interface)
47 %shared_ptr(GeomAPI_Shape)
48 %shared_ptr(ModelAPI_Document)
49 %shared_ptr(ModelAPI_Session)
50 %shared_ptr(ModelAPI_Object)
51 %shared_ptr(ModelAPI_Feature)
52 %shared_ptr(ModelAPI_Data)
53 %shared_ptr(ModelAPI_Attribute)
54 %shared_ptr(ModelAPI_AttributeDocRef)
55 %shared_ptr(ModelAPI_AttributeDouble)
56 %shared_ptr(ModelAPI_AttributeInteger)
57 %shared_ptr(ModelAPI_AttributeString)
58 %shared_ptr(ModelAPI_AttributeReference)
59 %shared_ptr(ModelAPI_AttributeRefAttr)
60 %shared_ptr(ModelAPI_AttributeRefList)
61 %shared_ptr(ModelAPI_Result)
62 %shared_ptr(ModelAPI_ResultConstruction)
63 %shared_ptr(ModelAPI_ResultBody)
64 %shared_ptr(ModelAPI_ResultPart)
66 // all supported interfaces
67 %include "GeomAPI_Interface.h"
68 %include "GeomAPI_Shape.h"
69 %include "ModelAPI_Document.h"
70 %include "ModelAPI_Session.h"
71 %include "ModelAPI_Object.h"
72 %include "ModelAPI_Feature.h"
73 %include "ModelAPI_Data.h"
74 %include "ModelAPI_Attribute.h"
75 %include "ModelAPI_AttributeDocRef.h"
76 %include "ModelAPI_AttributeDouble.h"
77 %include "ModelAPI_AttributeInteger.h"
78 %include "ModelAPI_AttributeString.h"
79 %include "ModelAPI_AttributeReference.h"
80 %include "ModelAPI_AttributeRefAttr.h"
81 %include "ModelAPI_Validator.h"
82 %include "ModelAPI_AttributeRefList.h"
83 %include "ModelAPI_Result.h"
84 %include "ModelAPI_ResultConstruction.h"
85 %include "ModelAPI_ResultBody.h"
86 %include "ModelAPI_ResultPart.h"
88 %template(ObjectList) std::list<boost::shared_ptr<ModelAPI_Object> >;
89 %template(ResultList) std::list<boost::shared_ptr<ModelAPI_Result> >;
91 template<class T> boost::shared_ptr<T> castTo(boost::shared_ptr<ModelAPI_Result> theObject);
92 %template(modelAPI_ResultConstruction) castTo<ModelAPI_ResultConstruction>;
93 %template(modelAPI_ResultBody) castTo<ModelAPI_ResultBody>;
94 %template(modelAPI_ResultPart) castTo<ModelAPI_ResultPart>;