1 // Name : ModelHighAPI_Tools.h
5 // 07/06/16 - Sergey POKHODENKO - Creation of the file
7 #ifndef SRC_MODELHIGHAPI_MODELHIGHAPI_TOOLS_H_
8 #define SRC_MODELHIGHAPI_MODELHIGHAPI_TOOLS_H_
10 //--------------------------------------------------------------------------------------
11 #include "ModelHighAPI.h"
13 #include <GeomAPI_Shape.h>
18 //--------------------------------------------------------------------------------------
22 //--------------------------------------------------------------------------------------
23 class GeomDataAPI_Dir;
24 class GeomDataAPI_Point;
25 class GeomDataAPI_Point2D;
26 //--------------------------------------------------------------------------------------
27 class ModelAPI_AttributeBoolean;
28 class ModelAPI_AttributeDocRef;
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 //--------------------------------------------------------------------------------------
48 void fillAttribute(const std::shared_ptr<GeomAPI_Pnt2d> & theValue,
49 const std::shared_ptr<GeomDataAPI_Point2D> & theAttribute);
52 void fillAttribute(const std::shared_ptr<GeomDataAPI_Point2D> & theAttribute,
53 double theX, double theY);
56 void fillAttribute(const std::shared_ptr<GeomAPI_Dir> & theValue,
57 const std::shared_ptr<GeomDataAPI_Dir> & theAttribute);
60 void fillAttribute(const std::shared_ptr<GeomAPI_Pnt> & theValue,
61 const std::shared_ptr<GeomDataAPI_Point> & theAttribute);
63 //--------------------------------------------------------------------------------------
65 void fillAttribute(bool theValue,
66 const std::shared_ptr<ModelAPI_AttributeBoolean> & theAttribute);
69 void fillAttribute(const ModelHighAPI_Double & theValue,
70 const std::shared_ptr<ModelAPI_AttributeDouble> & theAttribute);
73 void fillAttribute(double theValue,
74 const std::shared_ptr<ModelAPI_AttributeDouble> & theAttribute);
77 void fillAttribute(const ModelHighAPI_Integer & theValue,
78 const std::shared_ptr<ModelAPI_AttributeInteger> & theAttribute);
81 void fillAttribute(int theValue,
82 const std::shared_ptr<ModelAPI_AttributeInteger> & theAttribute);
85 void fillAttribute(const ModelHighAPI_RefAttr & theValue,
86 const std::shared_ptr<ModelAPI_AttributeRefAttr> & theAttribute);
89 void fillAttribute(const std::list<ModelHighAPI_RefAttr> & theValue,
90 const std::shared_ptr<ModelAPI_AttributeRefAttrList> & theAttribute);
93 void fillAttribute(const ModelHighAPI_Reference & theValue,
94 const std::shared_ptr<ModelAPI_AttributeReference> & theAttribute);
97 void fillAttribute(const std::list<ModelHighAPI_Reference> & theValue,
98 const std::shared_ptr<ModelAPI_AttributeRefList> & theAttribute);
101 void fillAttribute(const std::shared_ptr<ModelAPI_Object> & theValue,
102 const std::shared_ptr<ModelAPI_AttributeReference> & theAttribute);
105 void fillAttribute(const std::list<std::shared_ptr<ModelAPI_Object> > & theValue,
106 const std::shared_ptr<ModelAPI_AttributeRefList> & theAttribute);
109 void fillAttribute(const std::list<ModelHighAPI_Selection> & theValue,
110 const std::shared_ptr<ModelAPI_AttributeRefList> & theAttribute);
113 void fillAttribute(const ModelHighAPI_Selection & theValue,
114 const std::shared_ptr<ModelAPI_AttributeSelection> & theAttribute);
117 void fillAttribute(const std::list<ModelHighAPI_Selection> & theValue,
118 const std::shared_ptr<ModelAPI_AttributeSelectionList> & theAttribute);
121 void fillAttribute(const std::string & theValue,
122 const std::shared_ptr<ModelAPI_AttributeString> & theAttribute);
124 void fillAttribute(const char * theValue,
125 const std::shared_ptr<ModelAPI_AttributeString> & theAttribute);
128 GeomAPI_Shape::ShapeType shapeTypeByStr(std::string theShapeTypeStr);
131 GeomAPI_Shape::ShapeType getShapeType(const ModelHighAPI_Selection& theSelection);
133 //--------------------------------------------------------------------------------------
134 //--------------------------------------------------------------------------------------
135 #endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_TOOLS_H_ */