1 // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #include "GEOM_IOperations_i.hh"
22 #include "GEOM_Engine.hxx"
24 #include "utilities.h"
26 #include "Utils_ExceptHandlers.hxx"
28 #include <Standard_Stream.hxx>
29 #include <TCollection_AsciiString.hxx>
30 #include <TDF_Tool.hxx>
32 //=============================================================================
34 * default constructor:
36 //=============================================================================
38 GEOM_IOperations_i::GEOM_IOperations_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, ::GEOM_IOperations* theImpl)
39 :SALOME::GenericObj_i( thePOA ), _impl(theImpl), _engine(theEngine)
43 //=============================================================================
47 //=============================================================================
49 GEOM_IOperations_i::~GEOM_IOperations_i()
53 //=============================================================================
57 //=============================================================================
58 CORBA::Boolean GEOM_IOperations_i::IsDone()
60 return _impl->IsDone();
64 //=============================================================================
68 //=============================================================================
69 void GEOM_IOperations_i::SetErrorCode(const char* theErrorCode)
71 _impl->SetErrorCode((char*)theErrorCode);
74 //=============================================================================
78 //=============================================================================
79 char* GEOM_IOperations_i::GetErrorCode()
81 return CORBA::string_dup(_impl->GetErrorCode());
84 //=============================================================================
88 //=============================================================================
89 CORBA::Long GEOM_IOperations_i::GetStudyID()
91 return _impl->GetDocID();
94 //=============================================================================
98 //=============================================================================
99 void GEOM_IOperations_i::StartOperation()
101 _impl->StartOperation();
104 //=============================================================================
108 //=============================================================================
109 void GEOM_IOperations_i::FinishOperation()
111 _impl->FinishOperation();
115 //=============================================================================
119 //=============================================================================
120 void GEOM_IOperations_i::AbortOperation()
122 _impl->AbortOperation();
125 //=============================================================================
129 //=============================================================================
130 GEOM::GEOM_Object_ptr GEOM_IOperations_i::GetObject(Handle(GEOM_Object) theObject)
132 if(theObject.IsNull()) return NULL;
133 TCollection_AsciiString anEntry;
134 TDF_Tool::Entry(theObject->GetEntry(), anEntry);
135 GEOM::GEOM_Object_var GO = _engine->GetObject(theObject->GetDocID(), anEntry.ToCString());