Salome HOME
NRI : First integration.
[modules/smesh.git] / src / SMESH_I / SMESH_MaxElementArea_i.cxx
1 using namespace std;
2 //=============================================================================
3 // File      : SMESH_MaxElementArea_i.cxx
4 // Created   : sam mai 18 23:14:24 CEST 2002
5 // Author    : Paul RASCLE, EDF
6 // Project   : SALOME
7 // Copyright : EDF 2002
8 // $Header$
9 //=============================================================================
10 using namespace std;
11
12 #include "SMESH_MaxElementArea_i.hxx"
13 #include "SMESH_Gen.hxx"
14 #include "SMESH_HypothesisFactory.hxx"
15
16 #include "Utils_CorbaException.hxx"
17 #include "utilities.h"
18
19 //=============================================================================
20 /*!
21  *  Constructor: 
22  *  _name is related to the class name: prefix = SMESH_ ; suffix = _i .
23  */
24 //=============================================================================
25
26 SMESH_MaxElementArea_i::SMESH_MaxElementArea_i(const char* anHyp,
27                                                int studyId,
28                                                ::SMESH_Gen* genImpl)
29 {
30   MESSAGE("SMESH_MaxElementArea_i::SMESH_MaxElementArea_i");
31   _impl = new ::SMESH_MaxElementArea(genImpl->_hypothesisFactory.GetANewId(),
32                                      studyId,
33                                      genImpl);
34   _baseImpl = _impl;
35 }
36
37 //=============================================================================
38 /*!
39  *  
40  */
41 //=============================================================================
42
43 SMESH_MaxElementArea_i::~SMESH_MaxElementArea_i()
44 {
45 }
46
47 //=============================================================================
48 /*!
49  *  
50  */
51 //=============================================================================
52
53 void SMESH_MaxElementArea_i::SetMaxElementArea(CORBA::Double area)
54   throw (SALOME::SALOME_Exception)
55 {
56   ASSERT(_impl);
57   try
58     {
59       _impl->SetMaxArea(area);
60     }
61   catch (SALOME_Exception& S_ex)
62     {
63       THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), \
64                                    SALOME::BAD_PARAM);
65     }
66 }
67
68 //=============================================================================
69 /*!
70  *  
71  */
72 //=============================================================================
73
74 CORBA::Double SMESH_MaxElementArea_i::GetMaxElementArea()
75 {
76   ASSERT(_impl);
77   return _impl->GetMaxArea();
78 }
79