1 // GHS3DPRLPlugin : 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
22 // File : GHS3DPRLPlugin_Hypothesis_i.cxx
23 // Author : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
26 //=============================================================================
29 #include "GHS3DPRLPlugin_Hypothesis_i.hxx"
30 #include "SMESH_Gen.hxx"
31 #include "SMESH_PythonDump.hxx"
33 #include "Utils_CorbaException.hxx"
34 #include "utilities.h"
36 //=============================================================================
38 * GHS3DPRLPlugin_Hypothesis_i::GHS3DPRLPlugin_Hypothesis_i
42 //=============================================================================
43 GHS3DPRLPlugin_Hypothesis_i::
44 GHS3DPRLPlugin_Hypothesis_i (PortableServer::POA_ptr thePOA,
46 ::SMESH_Gen* theGenImpl)
47 : SALOME::GenericObj_i( thePOA ),
48 SMESH_Hypothesis_i( thePOA )
50 MESSAGE( "GHS3DPRLPlugin_Hypothesis_i::GHS3DPRLPlugin_Hypothesis_i" );
51 myBaseImpl = new ::GHS3DPRLPlugin_Hypothesis (theGenImpl->GetANewId(),
56 //=============================================================================
58 * GHS3DPRLPlugin_Hypothesis_i::~GHS3DPRLPlugin_Hypothesis_i
62 //=============================================================================
63 GHS3DPRLPlugin_Hypothesis_i::~GHS3DPRLPlugin_Hypothesis_i()
65 MESSAGE( "GHS3DPRLPlugin_Hypothesis_i::~GHS3DPRLPlugin_Hypothesis_i" );
68 //=============================================================================
70 * GHS3DPRLPlugin_Hypothesis_i::SetMEDName
71 * GHS3DPRLPlugin_Hypothesis_i::SetNbPart
72 * GHS3DPRLPlugin_Hypothesis_i::SetKeepFiles
74 //=============================================================================
76 void GHS3DPRLPlugin_Hypothesis_i::SetMEDName (const char *theValue)
78 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetMEDName");
80 this->GetImpl()->SetMEDName(theValue);
81 SMESH::TPythonDump() << _this() << ".SetMEDName( " << theValue << " )";
84 void GHS3DPRLPlugin_Hypothesis_i::SetNbPart (CORBA::Long theValue)
86 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetNbPart");
88 this->GetImpl()->SetNbPart(theValue);
89 SMESH::TPythonDump() << _this() << ".SetNbPart( " << theValue << " )";
92 void GHS3DPRLPlugin_Hypothesis_i::SetKeepFiles (CORBA::Boolean theValue)
94 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetKeepFiles");
96 this->GetImpl()->SetKeepFiles(theValue);
97 SMESH::TPythonDump() << _this() << ".SetKeepFiles( " << theValue << " )";
100 //=============================================================================
102 * GHS3DPRLPlugin_Hypothesis_i::GetMEDName
103 * GHS3DPRLPlugin_Hypothesis_i::GetNbPart
104 * GHS3DPRLPlugin_Hypothesis_i::GetKeepFiles
106 //=============================================================================
108 char * GHS3DPRLPlugin_Hypothesis_i::GetMEDName()
110 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetMEDName");
112 CORBA::String_var c_s =
113 CORBA::string_dup(this->GetImpl()->GetMEDName().c_str());
117 CORBA::Long GHS3DPRLPlugin_Hypothesis_i::GetNbPart()
119 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetNbPart");
121 return this->GetImpl()->GetNbPart();
124 CORBA::Boolean GHS3DPRLPlugin_Hypothesis_i::GetKeepFiles()
126 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetKeepFiles");
128 return this->GetImpl()->GetKeepFiles();
131 //=============================================================================
133 * GHS3DPRLPlugin_Hypothesis_i::GetImpl
137 //=============================================================================
138 ::GHS3DPRLPlugin_Hypothesis* GHS3DPRLPlugin_Hypothesis_i::GetImpl()
140 MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetImpl");
141 return (::GHS3DPRLPlugin_Hypothesis*)myBaseImpl;
144 //================================================================================
146 * \brief Verify whether hypothesis supports given entity type
147 * \param type - dimension (see SMESH::Dimension enumeration)
148 * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
150 * Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
152 //================================================================================
153 CORBA::Boolean GHS3DPRLPlugin_Hypothesis_i::IsDimSupported( SMESH::Dimension type )
155 return type == SMESH::DIM_3D;