1 // Copyright (C) 2007-2008 OPEN CASCADE, CEA/DEN, EDF R&D
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
21 // File : GHS3DPRLPlugin_Hypothesis_i.cxx
22 // Author : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
26 #include "GHS3DPRLPlugin_Hypothesis_i.hxx"
27 #include "SMESH_Gen.hxx"
28 #include "SMESH_PythonDump.hxx"
30 #include "Utils_CorbaException.hxx"
31 #include "utilities.h"
33 //=============================================================================
35 * GHS3DPRLPlugin_Hypothesis_i::GHS3DPRLPlugin_Hypothesis_i
39 //=============================================================================
40 GHS3DPRLPlugin_Hypothesis_i::
41 GHS3DPRLPlugin_Hypothesis_i (PortableServer::POA_ptr thePOA,
43 ::SMESH_Gen* theGenImpl)
44 : SALOME::GenericObj_i( thePOA ),
45 SMESH_Hypothesis_i( thePOA )
47 MESSAGE( "GHS3DPRLPlugin_Hypothesis_i::GHS3DPRLPlugin_Hypothesis_i" );
48 myBaseImpl = new ::GHS3DPRLPlugin_Hypothesis (theGenImpl->GetANewId(),
53 //=============================================================================
55 * GHS3DPRLPlugin_Hypothesis_i::~GHS3DPRLPlugin_Hypothesis_i
59 //=============================================================================
60 GHS3DPRLPlugin_Hypothesis_i::~GHS3DPRLPlugin_Hypothesis_i()
62 MESSAGE( "GHS3DPRLPlugin_Hypothesis_i::~GHS3DPRLPlugin_Hypothesis_i" );
65 //=============================================================================
67 * GHS3DPRLPlugin_Hypothesis_i::SetMEDName
68 * GHS3DPRLPlugin_Hypothesis_i::SetNbPart
69 * GHS3DPRLPlugin_Hypothesis_i::SetKeepFiles
70 * GHS3DPRLPlugin_Hypothesis_i::SetBackground
71 * GHS3DPRLPlugin_Hypothesis_i::SetToMeshHoles
73 //=============================================================================
75 void GHS3DPRLPlugin_Hypothesis_i::SetMEDName (const char *theValue)
77 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetMEDName");
79 this->GetImpl()->SetMEDName(theValue);
80 SMESH::TPythonDump() << _this() << ".SetMEDName( " << theValue << " )";
83 void GHS3DPRLPlugin_Hypothesis_i::SetNbPart (CORBA::Long theValue)
85 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetNbPart");
87 this->GetImpl()->SetNbPart(theValue);
88 SMESH::TPythonDump() << _this() << ".SetNbPart( " << theValue << " )";
91 void GHS3DPRLPlugin_Hypothesis_i::SetKeepFiles (CORBA::Boolean theValue)
93 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetKeepFiles");
95 this->GetImpl()->SetKeepFiles(theValue);
96 SMESH::TPythonDump() << _this() << ".SetKeepFiles( " << theValue << " )";
99 void GHS3DPRLPlugin_Hypothesis_i::SetBackground (CORBA::Boolean theValue)
101 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetBackground");
103 this->GetImpl()->SetBackground(theValue);
104 SMESH::TPythonDump() << _this() << ".SetBackground( " << theValue << " )";
107 void GHS3DPRLPlugin_Hypothesis_i::SetToMeshHoles (CORBA::Boolean theValue)
109 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetToMeshHoles");
111 this->GetImpl()->SetToMeshHoles(theValue);
112 SMESH::TPythonDump() << _this() << ".SetToMeshHoles( " << theValue << " )";
115 //=============================================================================
117 * GHS3DPRLPlugin_Hypothesis_i::GetMEDName
118 * GHS3DPRLPlugin_Hypothesis_i::GetNbPart
119 * GHS3DPRLPlugin_Hypothesis_i::GetKeepFiles
120 * GHS3DPRLPlugin_Hypothesis_i::GetBackground
121 * GHS3DPRLPlugin_Hypothesis_i::GetToMeshHoles
123 //=============================================================================
125 char * GHS3DPRLPlugin_Hypothesis_i::GetMEDName()
127 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetMEDName");
129 CORBA::String_var c_s =
130 CORBA::string_dup(this->GetImpl()->GetMEDName().c_str());
134 CORBA::Long GHS3DPRLPlugin_Hypothesis_i::GetNbPart()
136 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetNbPart");
138 return this->GetImpl()->GetNbPart();
141 CORBA::Boolean GHS3DPRLPlugin_Hypothesis_i::GetKeepFiles()
143 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetKeepFiles");
145 return this->GetImpl()->GetKeepFiles();
148 CORBA::Boolean GHS3DPRLPlugin_Hypothesis_i::GetBackground()
150 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetBackground");
152 return this->GetImpl()->GetBackground();
155 CORBA::Boolean GHS3DPRLPlugin_Hypothesis_i::GetToMeshHoles()
157 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetToMeshHoles");
159 return this->GetImpl()->GetToMeshHoles();
162 //=============================================================================
164 * GHS3DPRLPlugin_Hypothesis_i::GetImpl
168 //=============================================================================
169 ::GHS3DPRLPlugin_Hypothesis* GHS3DPRLPlugin_Hypothesis_i::GetImpl()
171 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetImpl");
172 return (::GHS3DPRLPlugin_Hypothesis*)myBaseImpl;
175 //================================================================================
177 * \brief Verify whether hypothesis supports given entity type
178 * \param type - dimension (see SMESH::Dimension enumeration)
179 * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
181 * Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
183 //================================================================================
184 CORBA::Boolean GHS3DPRLPlugin_Hypothesis_i::IsDimSupported( SMESH::Dimension type )
186 return type == SMESH::DIM_3D;