1 // SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 // File : SMESH_Hypothesis_i.cxx
25 // Author : Paul RASCLE, EDF
31 #include "SMESH_Hypothesis_i.hxx"
32 #include "utilities.h"
36 //=============================================================================
38 * SMESH_Hypothesis_i::SMESH_Hypothesis_i
42 //=============================================================================
44 SMESH_Hypothesis_i::SMESH_Hypothesis_i( PortableServer::POA_ptr thePOA )
45 : SALOME::GenericObj_i( thePOA )
47 MESSAGE( "SMESH_Hypothesis_i::SMESH_Hypothesis_i / Début" );
50 MESSAGE( "SMESH_Hypothesis_i::SMESH_Hypothesis_i / Fin" );
53 //=============================================================================
55 * SMESH_Hypothesis_i::~SMESH_Hypothesis_i
59 //=============================================================================
61 SMESH_Hypothesis_i::~SMESH_Hypothesis_i()
63 MESSAGE( "SMESH_Hypothesis_i::~SMESH_Hypothesis_i" );
68 //=============================================================================
70 * SMESH_Hypothesis_i::GetName
72 * Get type name of hypothesis
74 //=============================================================================
76 char* SMESH_Hypothesis_i::GetName()
78 //MESSAGE( "SMESH_Hypothesis_i::GetName" );
79 return CORBA::string_dup( myBaseImpl->GetName() );
82 //=============================================================================
84 * SMESH_Hypothesis_i::GetLibName
86 * Get plugin library name of hypothesis (required by persistency mechanism)
88 //=============================================================================
90 char* SMESH_Hypothesis_i::GetLibName()
92 MESSAGE( "SMESH_Hypothesis_i::GetLibName" );
93 return CORBA::string_dup( myBaseImpl->GetLibName() );
96 //=============================================================================
98 * SMESH_Hypothesis_i::SetLibName
100 * Set plugin library name of hypothesis (required by persistency mechanism)
102 //=============================================================================
104 void SMESH_Hypothesis_i::SetLibName(const char* theLibName)
106 MESSAGE( "SMESH_Hypothesis_i::SetLibName" );
107 myBaseImpl->SetLibName( theLibName );
110 //=============================================================================
112 * SMESH_Hypothesis_i::GetId
114 * Get unique id of hypothesis
116 //=============================================================================
118 CORBA::Long SMESH_Hypothesis_i::GetId()
120 MESSAGE( "SMESH_Hypothesis_i::GetId" );
121 return myBaseImpl->GetID();
124 //=============================================================================
126 * SMESH_Hypothesis_i::GetImpl
130 //=============================================================================
132 ::SMESH_Hypothesis* SMESH_Hypothesis_i::GetImpl()
134 //MESSAGE( "SMESH_Hypothesis_i::GetImpl" );
138 //=============================================================================
140 * SMESH_Hypothesis_i::SaveTo
142 * Persistence: Dumps parameters to the string stream
144 //=============================================================================
146 char* SMESH_Hypothesis_i::SaveTo()
148 MESSAGE( "SMESH_Hypothesis_i::SaveTo" );
149 std::ostringstream os;
150 myBaseImpl->SaveTo( os );
151 return CORBA::string_dup( os.str().c_str() );
154 //=============================================================================
156 * SMESH_Hypothesis_i::LoadFrom
158 * Persistence: Restores parameters from string
160 //=============================================================================
162 void SMESH_Hypothesis_i::LoadFrom( const char* theStream )
164 MESSAGE( "SMESH_Hypothesis_i::LoadFrom" );
165 std::istringstream is( theStream );
166 myBaseImpl->LoadFrom( is );