1 // Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // File : StdMeshers_TrianglePreference_i.cxx
24 #include "StdMeshers_TrianglePreference_i.hxx"
25 #include "SMESH_Gen_i.hxx"
26 #include "SMESH_Gen.hxx"
28 #include "Utils_CorbaException.hxx"
29 #include "utilities.h"
31 #include <TCollection_AsciiString.hxx>
35 //=============================================================================
37 * StdMeshers_TrianglePreference_i::StdMeshers_TrianglePreference_i
41 //=============================================================================
43 StdMeshers_TrianglePreference_i::StdMeshers_TrianglePreference_i
44 ( PortableServer::POA_ptr thePOA,
46 ::SMESH_Gen* theGenImpl ): SALOME::GenericObj_i( thePOA ),
47 SMESH_Hypothesis_i( thePOA )
49 myBaseImpl = new ::StdMeshers_TrianglePreference( theGenImpl->GetANewId(),
54 //=============================================================================
56 * StdMeshers_TrianglePreference_i::~StdMeshers_TrianglePreference_i
60 //=============================================================================
62 StdMeshers_TrianglePreference_i::~StdMeshers_TrianglePreference_i()
66 //=============================================================================
68 * StdMeshers_TrianglePreference_i::GetImpl
72 //=============================================================================
74 ::StdMeshers_TrianglePreference* StdMeshers_TrianglePreference_i::GetImpl()
76 return ( ::StdMeshers_TrianglePreference* )myBaseImpl;
79 //================================================================================
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
85 * Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
87 //================================================================================
89 CORBA::Boolean StdMeshers_TrianglePreference_i::IsDimSupported( SMESH::Dimension type )
91 return type == SMESH::DIM_2D;