1 // Copyright (C) 2007-2014 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, or (at your option) any later version.
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)
25 #include "GHS3DPRLPlugin_Hypothesis_i.hxx"
26 #include "SMESH_Gen.hxx"
27 #include "SMESH_PythonDump.hxx"
29 #include "Utils_CorbaException.hxx"
30 #include "utilities.h"
32 //=============================================================================
34 * GHS3DPRLPlugin_Hypothesis_i::GHS3DPRLPlugin_Hypothesis_i
38 //=============================================================================
39 GHS3DPRLPlugin_Hypothesis_i::
40 GHS3DPRLPlugin_Hypothesis_i (PortableServer::POA_ptr thePOA,
42 ::SMESH_Gen* theGenImpl)
43 : SALOME::GenericObj_i( thePOA ),
44 SMESH_Hypothesis_i( thePOA )
46 MESSAGE( "GHS3DPRLPlugin_Hypothesis_i::GHS3DPRLPlugin_Hypothesis_i" );
47 myBaseImpl = new ::GHS3DPRLPlugin_Hypothesis (theGenImpl->GetANewId(),
52 //=============================================================================
54 * GHS3DPRLPlugin_Hypothesis_i::~GHS3DPRLPlugin_Hypothesis_i
58 //=============================================================================
59 GHS3DPRLPlugin_Hypothesis_i::~GHS3DPRLPlugin_Hypothesis_i()
61 MESSAGE( "GHS3DPRLPlugin_Hypothesis_i::~GHS3DPRLPlugin_Hypothesis_i" );
64 //=============================================================================
66 * GHS3DPRLPlugin_Hypothesis_i::SetMEDName
67 * GHS3DPRLPlugin_Hypothesis_i::SetNbPart
68 * GHS3DPRLPlugin_Hypothesis_i::SetKeepFiles
69 * GHS3DPRLPlugin_Hypothesis_i::SetBackground
70 * GHS3DPRLPlugin_Hypothesis_i::SetToMeshHoles
72 //=============================================================================
74 void GHS3DPRLPlugin_Hypothesis_i::SetMEDName (const char *theValue)
76 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetMEDName");
78 this->GetImpl()->SetMEDName(theValue);
79 SMESH::TPythonDump() << _this() << ".SetMEDName( '" << theValue << "' )";
82 void GHS3DPRLPlugin_Hypothesis_i::SetNbPart (CORBA::Long theValue)
84 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetNbPart");
86 this->GetImpl()->SetNbPart(theValue);
87 SMESH::TPythonDump() << _this() << ".SetNbPart( " << theValue << " )";
90 void GHS3DPRLPlugin_Hypothesis_i::SetKeepFiles (CORBA::Boolean theValue)
92 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetKeepFiles");
94 this->GetImpl()->SetKeepFiles(theValue);
95 SMESH::TPythonDump() << _this() << ".SetKeepFiles( " << theValue << " )";
98 void GHS3DPRLPlugin_Hypothesis_i::SetBackground (CORBA::Boolean theValue)
100 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetBackground");
102 this->GetImpl()->SetBackground(theValue);
103 SMESH::TPythonDump() << _this() << ".SetBackground( " << theValue << " )";
106 void GHS3DPRLPlugin_Hypothesis_i::SetToMeshHoles (CORBA::Boolean theValue)
108 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetToMeshHoles");
110 this->GetImpl()->SetToMeshHoles(theValue);
111 SMESH::TPythonDump() << _this() << ".SetToMeshHoles( " << theValue << " )";
114 //=============================================================================
116 * GHS3DPRLPlugin_Hypothesis_i::GetMEDName
117 * GHS3DPRLPlugin_Hypothesis_i::GetNbPart
118 * GHS3DPRLPlugin_Hypothesis_i::GetKeepFiles
119 * GHS3DPRLPlugin_Hypothesis_i::GetBackground
120 * GHS3DPRLPlugin_Hypothesis_i::GetToMeshHoles
122 //=============================================================================
124 char * GHS3DPRLPlugin_Hypothesis_i::GetMEDName()
126 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetMEDName");
128 CORBA::String_var c_s =
129 CORBA::string_dup(this->GetImpl()->GetMEDName().c_str());
133 CORBA::Long GHS3DPRLPlugin_Hypothesis_i::GetNbPart()
135 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetNbPart");
137 return this->GetImpl()->GetNbPart();
140 CORBA::Boolean GHS3DPRLPlugin_Hypothesis_i::GetKeepFiles()
142 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetKeepFiles");
144 return this->GetImpl()->GetKeepFiles();
147 CORBA::Boolean GHS3DPRLPlugin_Hypothesis_i::GetBackground()
149 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetBackground");
151 return this->GetImpl()->GetBackground();
154 CORBA::Boolean GHS3DPRLPlugin_Hypothesis_i::GetToMeshHoles()
156 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetToMeshHoles");
158 return this->GetImpl()->GetToMeshHoles();
161 //=============================================================================
163 * GHS3DPRLPlugin_Hypothesis_i::GetImpl
167 //=============================================================================
168 ::GHS3DPRLPlugin_Hypothesis* GHS3DPRLPlugin_Hypothesis_i::GetImpl()
170 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetImpl");
171 return (::GHS3DPRLPlugin_Hypothesis*)myBaseImpl;
174 //================================================================================
176 * \brief Verify whether hypothesis supports given entity type
177 * \param type - dimension (see SMESH::Dimension enumeration)
178 * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
180 * Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
182 //================================================================================
183 CORBA::Boolean GHS3DPRLPlugin_Hypothesis_i::IsDimSupported( SMESH::Dimension type )
185 return type == SMESH::DIM_3D;