Salome HOME
Merge from V5_1_main 14/05/2010
[modules/smesh.git] / src / StdMeshers_I / StdMeshers_TrianglePreference_i.cxx
1 //  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  This library is free software; you can redistribute it and/or
4 //  modify it under the terms of the GNU Lesser General Public
5 //  License as published by the Free Software Foundation; either
6 //  version 2.1 of the License.
7 //
8 //  This library is distributed in the hope that it will be useful,
9 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 //  Lesser General Public License for more details.
12 //
13 //  You should have received a copy of the GNU Lesser General Public
14 //  License along with this library; if not, write to the Free Software
15 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 //  File   : StdMeshers_TrianglePreference_i.cxx
21 //  Author : 
22 //  Module : SMESH
23 //
24 #include "StdMeshers_TrianglePreference_i.hxx"
25 #include "SMESH_Gen_i.hxx"
26 #include "SMESH_Gen.hxx"
27
28 #include "Utils_CorbaException.hxx"
29 #include "utilities.h"
30
31 #include <TCollection_AsciiString.hxx>
32
33 using namespace std;
34
35 //=============================================================================
36 /*!
37  *  StdMeshers_TrianglePreference_i::StdMeshers_TrianglePreference_i
38  *
39  *  Constructor
40  */
41 //=============================================================================
42
43 StdMeshers_TrianglePreference_i::StdMeshers_TrianglePreference_i
44 ( PortableServer::POA_ptr thePOA,
45   int                     theStudyId,
46   ::SMESH_Gen*            theGenImpl ): SALOME::GenericObj_i( thePOA ), 
47                                         SMESH_Hypothesis_i( thePOA )
48 {
49   myBaseImpl = new ::StdMeshers_TrianglePreference( theGenImpl->GetANewId(),
50                                                     theStudyId,
51                                                     theGenImpl );
52 }
53
54 //=============================================================================
55 /*!
56  *  StdMeshers_TrianglePreference_i::~StdMeshers_TrianglePreference_i
57  *
58  *  Destructor
59  */
60 //=============================================================================
61
62 StdMeshers_TrianglePreference_i::~StdMeshers_TrianglePreference_i()
63 {
64 }
65
66 //=============================================================================
67 /*!
68  *  StdMeshers_TrianglePreference_i::GetImpl
69  *
70  *  Get implementation
71  */
72 //=============================================================================
73
74 ::StdMeshers_TrianglePreference* StdMeshers_TrianglePreference_i::GetImpl()
75 {
76   return ( ::StdMeshers_TrianglePreference* )myBaseImpl;
77 }
78
79 //================================================================================
80 /*!
81  * \brief Verify whether hypothesis supports given entity type 
82   * \param type - dimension (see SMESH::Dimension enumeration)
83   * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
84  * 
85  * Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
86  */
87 //================================================================================  
88
89 CORBA::Boolean StdMeshers_TrianglePreference_i::IsDimSupported( SMESH::Dimension type )
90 {
91   return type == SMESH::DIM_2D;
92 }
93