1 // NETGENPlugin : C++ implementation
3 // Copyright (C) 2006 OPEN CASCADE, CEA/DEN, EDF R&D
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License.
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : NETGENPlugin_Hypothesis_2D_i.cxx
23 // Author : Michael Sazonov (OCN)
27 //=============================================================================
30 #include "NETGENPlugin_Hypothesis_2D_i.hxx"
31 #include "SMESH_Gen.hxx"
32 #include "SMESH_PythonDump.hxx"
34 #include "Utils_CorbaException.hxx"
35 #include "utilities.h"
37 //=============================================================================
39 * NETGENPlugin_Hypothesis_2D_i::NETGENPlugin_Hypothesis_2D_i
43 //=============================================================================
44 NETGENPlugin_Hypothesis_2D_i::
45 NETGENPlugin_Hypothesis_2D_i (PortableServer::POA_ptr thePOA,
47 ::SMESH_Gen* theGenImpl)
48 : SALOME::GenericObj_i( thePOA ),
49 SMESH_Hypothesis_i( thePOA ),
50 NETGENPlugin_Hypothesis_i( thePOA, theStudyId, theGenImpl )
52 MESSAGE( "NETGENPlugin_Hypothesis_2D_i::NETGENPlugin_Hypothesis_2D_i" );
54 delete (::NETGENPlugin_Hypothesis*)myBaseImpl;
55 myBaseImpl = new ::NETGENPlugin_Hypothesis_2D (theGenImpl->GetANewId(),
60 //=============================================================================
62 * NETGENPlugin_Hypothesis_2D_i::~NETGENPlugin_Hypothesis_2D_i
66 //=============================================================================
67 NETGENPlugin_Hypothesis_2D_i::~NETGENPlugin_Hypothesis_2D_i()
69 MESSAGE( "NETGENPlugin_Hypothesis_2D_i::~NETGENPlugin_Hypothesis_2D_i" );
72 //=============================================================================
74 * NETGENPlugin_Hypothesis_2D_i::SetQuadAllowed
76 * Set QuadAllowed flag
78 //=============================================================================
79 void NETGENPlugin_Hypothesis_2D_i::SetQuadAllowed (CORBA::Boolean theValue)
81 MESSAGE("NETGENPlugin_Hypothesis_2D_i::SetQuadAllowed");
83 this->GetImpl()->SetQuadAllowed(theValue);
84 SMESH::TPythonDump() << _this() << ".SetQuadAllowed( " << theValue << " )";
87 //=============================================================================
89 * NETGENPlugin_Hypothesis_2D_i::GetQuadAllowed
91 * Get QuadAllowed flag
93 //=============================================================================
94 CORBA::Boolean NETGENPlugin_Hypothesis_2D_i::GetQuadAllowed()
96 MESSAGE("NETGENPlugin_Hypothesis_2D_i::GetQuadAllowed");
98 return this->GetImpl()->GetQuadAllowed();
101 //=============================================================================
103 * NETGENPlugin_Hypothesis_2D_i::GetImpl
107 //=============================================================================
108 ::NETGENPlugin_Hypothesis_2D* NETGENPlugin_Hypothesis_2D_i::GetImpl()
110 MESSAGE("NETGENPlugin_Hypothesis_2D_i::GetImpl");
111 return (::NETGENPlugin_Hypothesis_2D*)myBaseImpl;
114 //================================================================================
116 * \brief Verify whether hypothesis supports given entity type
117 * \param type - dimension (see SMESH::Dimension enumeration)
118 * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
120 * Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
122 //================================================================================
123 CORBA::Boolean NETGENPlugin_Hypothesis_2D_i::IsDimSupported( SMESH::Dimension type )
125 return type == SMESH::DIM_2D;