Salome HOME
Issue #1860: fix end lines with spaces
[modules/shaper.git] / src / ModelHighAPI / ModelHighAPI_Tools.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2 // Name   : ModelHighAPI_Tools.h
3 // Purpose:
4 //
5 // History:
6 // 07/06/16 - Sergey POKHODENKO - Creation of the file
7
8 #ifndef SRC_MODELHIGHAPI_MODELHIGHAPI_TOOLS_H_
9 #define SRC_MODELHIGHAPI_MODELHIGHAPI_TOOLS_H_
10
11 //--------------------------------------------------------------------------------------
12 #include "ModelHighAPI.h"
13
14 #include <GeomAPI_Shape.h>
15
16 #include <list>
17 #include <memory>
18 #include <string>
19 //--------------------------------------------------------------------------------------
20 class GeomAPI_Dir;
21 class GeomAPI_Pnt;
22 class GeomAPI_Pnt2d;
23 //--------------------------------------------------------------------------------------
24 class GeomDataAPI_Dir;
25 class GeomDataAPI_Point;
26 class GeomDataAPI_Point2D;
27 //--------------------------------------------------------------------------------------
28 class ModelAPI_AttributeBoolean;
29 class ModelAPI_AttributeDouble;
30 class ModelAPI_AttributeIntArray;
31 class ModelAPI_AttributeInteger;
32 class ModelAPI_AttributeRefAttr;
33 class ModelAPI_AttributeRefAttrList;
34 class ModelAPI_AttributeReference;
35 class ModelAPI_AttributeRefList;
36 class ModelAPI_AttributeSelection;
37 class ModelAPI_AttributeSelectionList;
38 class ModelAPI_AttributeString;
39 class ModelAPI_Object;
40 //--------------------------------------------------------------------------------------
41 class ModelHighAPI_Double;
42 class ModelHighAPI_Integer;
43 class ModelHighAPI_RefAttr;
44 class ModelHighAPI_Reference;
45 class ModelHighAPI_Selection;
46 //--------------------------------------------------------------------------------------
47 MODELHIGHAPI_EXPORT
48 void fillAttribute(const std::shared_ptr<GeomAPI_Pnt2d> & theValue,
49                    const std::shared_ptr<GeomDataAPI_Point2D> & theAttribute);
50
51 MODELHIGHAPI_EXPORT
52 void fillAttribute(const std::shared_ptr<GeomDataAPI_Point2D> & theAttribute,
53                    double theX, double theY);
54
55 MODELHIGHAPI_EXPORT
56 void fillAttribute(const std::shared_ptr<GeomAPI_Dir> & theValue,
57                    const std::shared_ptr<GeomDataAPI_Dir> & theAttribute);
58
59 MODELHIGHAPI_EXPORT
60 void fillAttribute(const std::shared_ptr<GeomAPI_Pnt> & theValue,
61                    const std::shared_ptr<GeomDataAPI_Point> & theAttribute);
62
63 //--------------------------------------------------------------------------------------
64 MODELHIGHAPI_EXPORT
65 void fillAttribute(bool theValue,
66                    const std::shared_ptr<ModelAPI_AttributeBoolean> & theAttribute);
67
68 MODELHIGHAPI_EXPORT
69 void fillAttribute(const ModelHighAPI_Double & theValue,
70                    const std::shared_ptr<ModelAPI_AttributeDouble> & theAttribute);
71
72 MODELHIGHAPI_EXPORT
73 void fillAttribute(double theValue,
74                    const std::shared_ptr<ModelAPI_AttributeDouble> & theAttribute);
75
76 MODELHIGHAPI_EXPORT
77 void fillAttribute(const ModelHighAPI_Integer & theValue,
78                    const std::shared_ptr<ModelAPI_AttributeInteger> & theAttribute);
79
80 MODELHIGHAPI_EXPORT
81 void fillAttribute(int theValue,
82                    const std::shared_ptr<ModelAPI_AttributeInteger> & theAttribute);
83
84 MODELHIGHAPI_EXPORT
85 void fillAttribute(const ModelHighAPI_RefAttr & theValue,
86                    const std::shared_ptr<ModelAPI_AttributeRefAttr> & theAttribute);
87
88 MODELHIGHAPI_EXPORT
89 void fillAttribute(const std::list<ModelHighAPI_RefAttr> & theValue,
90                    const std::shared_ptr<ModelAPI_AttributeRefAttrList> & theAttribute);
91
92 MODELHIGHAPI_EXPORT
93 void fillAttribute(const ModelHighAPI_Reference & theValue,
94                    const std::shared_ptr<ModelAPI_AttributeReference> & theAttribute);
95
96 MODELHIGHAPI_EXPORT
97 void fillAttribute(const std::list<ModelHighAPI_Reference> & theValue,
98                    const std::shared_ptr<ModelAPI_AttributeRefList> & theAttribute);
99
100 MODELHIGHAPI_EXPORT
101 void fillAttribute(const std::shared_ptr<ModelAPI_Object> & theValue,
102                    const std::shared_ptr<ModelAPI_AttributeReference> & theAttribute);
103
104 MODELHIGHAPI_EXPORT
105 void fillAttribute(const std::list<std::shared_ptr<ModelAPI_Object> > & theValue,
106                    const std::shared_ptr<ModelAPI_AttributeRefList> & theAttribute);
107
108 MODELHIGHAPI_EXPORT
109 void fillAttribute(const std::list<ModelHighAPI_Selection> & theValue,
110                    const std::shared_ptr<ModelAPI_AttributeRefList> & theAttribute);
111
112 MODELHIGHAPI_EXPORT
113 void fillAttribute(const ModelHighAPI_Selection & theValue,
114                    const std::shared_ptr<ModelAPI_AttributeSelection> & theAttribute);
115
116 MODELHIGHAPI_EXPORT
117 void fillAttribute(const std::list<ModelHighAPI_Selection> & theValue,
118                    const std::shared_ptr<ModelAPI_AttributeSelectionList> & theAttribute);
119
120 MODELHIGHAPI_EXPORT
121 void fillAttribute(const std::string & theValue,
122                    const std::shared_ptr<ModelAPI_AttributeString> & theAttribute);
123 MODELHIGHAPI_EXPORT
124 void fillAttribute(const char * theValue,
125                    const std::shared_ptr<ModelAPI_AttributeString> & theAttribute);
126
127 MODELHIGHAPI_EXPORT
128 GeomAPI_Shape::ShapeType shapeTypeByStr(std::string theShapeTypeStr);
129
130 MODELHIGHAPI_EXPORT
131 GeomAPI_Shape::ShapeType getShapeType(const ModelHighAPI_Selection& theSelection);
132
133 /// Performs the high level API dump, then closes all and executes the script:
134 /// model must be recreated fully, with all attributes
135 /// \returns true if check is well done
136 MODELHIGHAPI_EXPORT
137 bool checkPythonDump();
138
139 //--------------------------------------------------------------------------------------
140 //--------------------------------------------------------------------------------------
141 #endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_TOOLS_H_ */