]> SALOME platform Git repositories - modules/shaper.git/blob - src/ModelAPI/ModelAPI.i
Salome HOME
Sources formated according to the codeing standards
[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_PluginManager.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_AttributeReference.h"
16   #include "ModelAPI_AttributeRefAttr.h"
17   #include "ModelAPI_Validator.h"
18   #include "ModelAPI_AttributeRefList.h"
19   #include "ModelAPI_Result.h"
20   #include "ModelAPI_ResultConstruction.h"
21   
22   template<class T> boost::shared_ptr<T> castTo(boost::shared_ptr<ModelAPI_Result> theObject) 
23   { 
24     return boost::dynamic_pointer_cast<T>(theObject); 
25   }
26   
27    
28 %}
29
30 // to avoid error on this
31 #define MODELAPI_EXPORT
32 #define GEOMAPI_EXPORT
33
34 // standard definitions
35 %include "typemaps.i"
36 %include "std_string.i"
37 %include "std_list.i"
38
39 // boost pointers
40 %include <boost_shared_ptr.i>
41 // For ModelAPI_ResultConstruction.shape()
42 %shared_ptr(GeomAPI_Interface)
43 %shared_ptr(GeomAPI_Shape)
44 %shared_ptr(ModelAPI_Document)
45 %shared_ptr(ModelAPI_PluginManager)
46 %shared_ptr(ModelAPI_Object)
47 %shared_ptr(ModelAPI_Feature)
48 %shared_ptr(ModelAPI_Data)
49 %shared_ptr(ModelAPI_Attribute)
50 %shared_ptr(ModelAPI_AttributeDocRef)
51 %shared_ptr(ModelAPI_AttributeDouble)
52 %shared_ptr(ModelAPI_AttributeReference)
53 %shared_ptr(ModelAPI_AttributeRefAttr)
54 %shared_ptr(ModelAPI_AttributeRefList)
55 %shared_ptr(ModelAPI_Result)
56 %shared_ptr(ModelAPI_ResultConstruction)
57
58 // all supported interfaces
59 %include "GeomAPI_Interface.h"
60 %include "GeomAPI_Shape.h"
61 %include "ModelAPI_Document.h"
62 %include "ModelAPI_PluginManager.h"
63 %include "ModelAPI_Object.h"
64 %include "ModelAPI_Feature.h"
65 %include "ModelAPI_Data.h"
66 %include "ModelAPI_Attribute.h"
67 %include "ModelAPI_AttributeDocRef.h"
68 %include "ModelAPI_AttributeDouble.h"
69 %include "ModelAPI_AttributeReference.h"
70 %include "ModelAPI_AttributeRefAttr.h"
71 %include "ModelAPI_Validator.h"
72 %include "ModelAPI_AttributeRefList.h"
73 %include "ModelAPI_Result.h"
74 %include "ModelAPI_ResultConstruction.h"
75
76 %template(ObjectList) std::list<boost::shared_ptr<ModelAPI_Object> >;
77 %template(ResultList) std::list<boost::shared_ptr<ModelAPI_Result> >;
78
79 template<class T> boost::shared_ptr<T> castTo(boost::shared_ptr<ModelAPI_Result> theObject);
80 %template(modelAPI_ResultConstruction) castTo<ModelAPI_ResultConstruction>;