Salome HOME
Sorting alphabetically.
[modules/hydro.git] / src / HYDROData / HYDROData_Region.cxx
1
2 #include "HYDROData_Region.h"
3
4 #include <TNaming_Builder.hxx>
5 #include <TNaming_NamedShape.hxx>
6 #include <TopoDS.hxx>
7
8 #include <QString>
9
10 #define PYTHON_REGION_ID "KIND_REGION"
11
12
13 IMPLEMENT_STANDARD_HANDLE(HYDROData_Region, HYDROData_Domain)
14 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Region, HYDROData_Domain)
15
16
17 HYDROData_Region::HYDROData_Region()
18 {
19 }
20
21 HYDROData_Region::~HYDROData_Region()
22 {
23 }
24
25 void HYDROData_Region::SetFace( const TopoDS_Face& theFace )
26 {
27   TNaming_Builder aBuilder( myLab );
28   aBuilder.Generated( theFace );
29 }
30
31 TopoDS_Face HYDROData_Region::Face() const
32 {
33   Handle(TNaming_NamedShape) aNamedShape;
34   if( myLab.FindAttribute( TNaming_NamedShape::GetID(), aNamedShape ) )
35     return TopoDS::Face( aNamedShape->Get() );
36   return TopoDS_Face();
37 }
38
39 QString HYDROData_Region::getPythonKindId() const
40 {
41   return QString( PYTHON_REGION_ID );
42 }
43
44
45