1 // Copyright (C) 2007-2015 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::SetToMergeSubdomains
71 * GHS3DPRLPlugin_Hypothesis_i::SetToTagSubdomains
72 * GHS3DPRLPlugin_Hypothesis_i::SetToOutputInterfaces
73 * GHS3DPRLPlugin_Hypothesis_i::SetToDiscardSubdomains
75 //=============================================================================
77 void GHS3DPRLPlugin_Hypothesis_i::SetMEDName (const char *theValue)
79 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetMEDName");
81 this->GetImpl()->SetMEDName(theValue);
82 SMESH::TPythonDump() << _this() << ".SetMEDName( '" << theValue << "' )";
85 void GHS3DPRLPlugin_Hypothesis_i::SetNbPart (CORBA::Long theValue)
87 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetNbPart");
89 this->GetImpl()->SetNbPart(theValue);
90 SMESH::TPythonDump() << _this() << ".SetNbPart( " << theValue << " )";
93 void GHS3DPRLPlugin_Hypothesis_i::SetKeepFiles (CORBA::Boolean theValue)
95 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetKeepFiles");
97 this->GetImpl()->SetKeepFiles(theValue);
98 SMESH::TPythonDump() << _this() << ".SetKeepFiles( " << theValue << " )";
101 void GHS3DPRLPlugin_Hypothesis_i::SetBackground (CORBA::Boolean theValue)
103 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetBackground");
105 this->GetImpl()->SetBackground(theValue);
106 SMESH::TPythonDump() << _this() << ".SetBackground( " << theValue << " )";
109 void GHS3DPRLPlugin_Hypothesis_i::SetToMergeSubdomains (CORBA::Boolean theValue)
111 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetToMergeSubdomains");
113 this->GetImpl()->SetToMergeSubdomains(theValue);
114 SMESH::TPythonDump() << _this() << ".SetToMergeSubdomains( " << theValue << " )";
117 void GHS3DPRLPlugin_Hypothesis_i::SetToTagSubdomains (CORBA::Boolean theValue)
119 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetToTagSubdomains");
121 this->GetImpl()->SetToTagSubdomains(theValue);
122 SMESH::TPythonDump() << _this() << ".SetToTagSubdomains( " << theValue << " )";
125 void GHS3DPRLPlugin_Hypothesis_i::SetToOutputInterfaces (CORBA::Boolean theValue)
127 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetToOutputInterfaces");
129 this->GetImpl()->SetToOutputInterfaces(theValue);
130 SMESH::TPythonDump() << _this() << ".SetToOutputInterfaces( " << theValue << " )";
133 void GHS3DPRLPlugin_Hypothesis_i::SetToDiscardSubdomains (CORBA::Boolean theValue)
135 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetToDiscardSubdomains");
137 this->GetImpl()->SetToDiscardSubdomains(theValue);
138 SMESH::TPythonDump() << _this() << ".SetToDiscardSubdomains( " << theValue << " )";
141 //=============================================================================
143 * GHS3DPRLPlugin_Hypothesis_i::GetMEDName
144 * GHS3DPRLPlugin_Hypothesis_i::GetNbPart
145 * GHS3DPRLPlugin_Hypothesis_i::GetKeepFiles
146 * GHS3DPRLPlugin_Hypothesis_i::GetBackground
147 * GHS3DPRLPlugin_Hypothesis_i::GetToMergeSubdomains
148 * GHS3DPRLPlugin_Hypothesis_i::GetToTagSubdomains
149 * GHS3DPRLPlugin_Hypothesis_i::GetToOutputInterfaces
150 * GHS3DPRLPlugin_Hypothesis_i::GetToDiscardSubdomains
152 //=============================================================================
154 char * GHS3DPRLPlugin_Hypothesis_i::GetMEDName()
156 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetMEDName");
158 CORBA::String_var c_s =
159 CORBA::string_dup(this->GetImpl()->GetMEDName().c_str());
163 CORBA::Long GHS3DPRLPlugin_Hypothesis_i::GetNbPart()
165 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetNbPart");
167 return this->GetImpl()->GetNbPart();
170 CORBA::Boolean GHS3DPRLPlugin_Hypothesis_i::GetKeepFiles()
172 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetKeepFiles");
174 return this->GetImpl()->GetKeepFiles();
177 CORBA::Boolean GHS3DPRLPlugin_Hypothesis_i::GetBackground()
179 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetBackground");
181 return this->GetImpl()->GetBackground();
184 CORBA::Boolean GHS3DPRLPlugin_Hypothesis_i::GetToMergeSubdomains()
186 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetToMergeSubdomains");
188 return this->GetImpl()->GetToMergeSubdomains();
191 CORBA::Boolean GHS3DPRLPlugin_Hypothesis_i::GetToTagSubdomains()
193 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetToTagSubdomains");
195 return this->GetImpl()->GetToTagSubdomains();
198 CORBA::Boolean GHS3DPRLPlugin_Hypothesis_i::GetToOutputInterfaces()
200 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetToOutputInterfaces");
202 return this->GetImpl()->GetToOutputInterfaces();
205 CORBA::Boolean GHS3DPRLPlugin_Hypothesis_i::GetToDiscardSubdomains()
207 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetToDiscardSubdomains");
209 return this->GetImpl()->GetToDiscardSubdomains();
212 //=============================================================================
214 * GHS3DPRLPlugin_Hypothesis_i::GetImpl
218 //=============================================================================
219 ::GHS3DPRLPlugin_Hypothesis* GHS3DPRLPlugin_Hypothesis_i::GetImpl()
221 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetImpl");
222 return (::GHS3DPRLPlugin_Hypothesis*)myBaseImpl;
225 //================================================================================
227 * \brief Verify whether hypothesis supports given entity type
228 * \param type - dimension (see SMESH::Dimension enumeration)
229 * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
231 * Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
233 //================================================================================
234 CORBA::Boolean GHS3DPRLPlugin_Hypothesis_i::IsDimSupported( SMESH::Dimension type )
236 return type == SMESH::DIM_3D;