Salome HOME
Bring batch tests to valid state
[modules/shaper.git] / src / ModelAPI / ModelAPI.i
1 /* ModelAPI.i */
2 %module ModelAPI
3 %{
4   #include "GeomAPI_Interface.h"
5   #include "GeomAPI_Shape.h"
6   #include "ModelAPI.h"
7   #include "ModelAPI_Document.h"
8   #include "ModelAPI_Session.h"
9   #include "ModelAPI_Object.h"
10   #include "ModelAPI_Feature.h"
11   #include "ModelAPI_CompositeFeature.h"
12   #include "ModelAPI_Data.h"
13   #include "ModelAPI_Attribute.h"
14   #include "ModelAPI_AttributeDocRef.h"
15   #include "ModelAPI_AttributeDouble.h"
16   #include "ModelAPI_AttributeInteger.h"
17   #include "ModelAPI_AttributeString.h"
18   #include "ModelAPI_AttributeReference.h"
19   #include "ModelAPI_AttributeRefAttr.h"
20   #include "ModelAPI_AttributeSelection.h"
21   #include "ModelAPI_AttributeSelectionList.h"
22   #include "ModelAPI_Validator.h"
23   #include "ModelAPI_AttributeRefList.h"
24   #include "ModelAPI_AttributeBoolean.h"
25   #include "ModelAPI_Result.h"
26   #include "ModelAPI_ResultConstruction.h"
27   #include "ModelAPI_ResultBody.h"
28   #include "ModelAPI_ResultPart.h"
29   
30   template<class T1, class T2> 
31   boost::shared_ptr<T1> boost_cast(boost::shared_ptr<T2> theObject)
32   { 
33     return boost::dynamic_pointer_cast<T1>(theObject); 
34   }
35   
36 %}
37
38 // to avoid error on this
39 #define MODELAPI_EXPORT
40 #define GEOMAPI_EXPORT
41
42 // standard definitions
43 %include "typemaps.i"
44 %include "std_string.i"
45 %include "std_list.i"
46
47 // boost pointers
48 %include <boost_shared_ptr.i>
49 // For ModelAPI_ResultConstruction.shape()
50 %shared_ptr(GeomAPI_Interface)
51 %shared_ptr(GeomAPI_Shape)
52 %shared_ptr(ModelAPI_Document)
53 %shared_ptr(ModelAPI_Session)
54 %shared_ptr(ModelAPI_Object)
55 %shared_ptr(ModelAPI_Feature)
56 %shared_ptr(ModelAPI_CompositeFeature)
57 %shared_ptr(ModelAPI_Data)
58 %shared_ptr(ModelAPI_Attribute)
59 %shared_ptr(ModelAPI_AttributeDocRef)
60 %shared_ptr(ModelAPI_AttributeDouble)
61 %shared_ptr(ModelAPI_AttributeInteger)
62 %shared_ptr(ModelAPI_AttributeString)
63 %shared_ptr(ModelAPI_AttributeReference)
64 %shared_ptr(ModelAPI_AttributeRefAttr)
65 %shared_ptr(ModelAPI_AttributeRefList)
66 %shared_ptr(ModelAPI_AttributeBoolean)
67 %shared_ptr(ModelAPI_AttributeSelection)
68 %shared_ptr(ModelAPI_AttributeSelectionList)
69 %shared_ptr(ModelAPI_Result)
70 %shared_ptr(ModelAPI_ResultConstruction)
71 %shared_ptr(ModelAPI_ResultBody)
72 %shared_ptr(ModelAPI_ResultPart)
73
74 // all supported interfaces
75 %include "GeomAPI_Interface.h"
76 %include "GeomAPI_Shape.h"
77 %include "ModelAPI_Document.h"
78 %include "ModelAPI_Session.h"
79 %include "ModelAPI_Object.h"
80 %include "ModelAPI_Feature.h"
81 %include "ModelAPI_CompositeFeature.h"
82 %include "ModelAPI_Data.h"
83 %include "ModelAPI_Attribute.h"
84 %include "ModelAPI_AttributeDocRef.h"
85 %include "ModelAPI_AttributeDouble.h"
86 %include "ModelAPI_AttributeInteger.h"
87 %include "ModelAPI_AttributeString.h"
88 %include "ModelAPI_AttributeReference.h"
89 %include "ModelAPI_AttributeRefAttr.h"
90 %include "ModelAPI_AttributeBoolean.h"
91 %include "ModelAPI_AttributeSelection.h"
92 %include "ModelAPI_AttributeSelectionList.h"
93 %include "ModelAPI_AttributeRefList.h"
94 %include "ModelAPI_Validator.h"
95 %include "ModelAPI_Result.h"
96 %include "ModelAPI_ResultConstruction.h"
97 %include "ModelAPI_ResultBody.h"
98 %include "ModelAPI_ResultPart.h"
99
100 %template(ObjectList) std::list<boost::shared_ptr<ModelAPI_Object> >;
101 %template(ResultList) std::list<boost::shared_ptr<ModelAPI_Result> >;
102
103 template<class T1, class T2> boost::shared_ptr<T1> boost_cast(boost::shared_ptr<T2> theObject);
104 %template(modelAPI_CompositeFeature) boost_cast<ModelAPI_CompositeFeature, ModelAPI_Feature>;
105 %template(modelAPI_ResultConstruction) boost_cast<ModelAPI_ResultConstruction, ModelAPI_Result>;
106 %template(modelAPI_ResultBody) boost_cast<ModelAPI_ResultBody, ModelAPI_Result>;
107 %template(modelAPI_ResultPart) boost_cast<ModelAPI_ResultPart, ModelAPI_Result>;
108
109