1 #include "GEOM_IOperations_i.hh"
3 #include "GEOM_Engine.hxx"
7 #include "Utils_ExceptHandlers.hxx"
9 #include <Standard_Stream.hxx>
10 #include <TCollection_AsciiString.hxx>
11 #include <TDF_Tool.hxx>
13 //=============================================================================
15 * default constructor:
17 //=============================================================================
19 GEOM_IOperations_i::GEOM_IOperations_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, ::GEOM_IOperations* theImpl)
20 :SALOME::GenericObj_i( thePOA ), _impl(theImpl), _engine(theEngine)
22 thePOA->activate_object(this);
25 //=============================================================================
29 //=============================================================================
31 GEOM_IOperations_i::~GEOM_IOperations_i()
35 //=============================================================================
39 //=============================================================================
40 CORBA::Boolean GEOM_IOperations_i::IsDone()
42 return _impl->IsDone();
46 //=============================================================================
50 //=============================================================================
51 void GEOM_IOperations_i::SetErrorCode(const char* theErrorCode)
53 _impl->SetErrorCode((char*)theErrorCode);
56 //=============================================================================
60 //=============================================================================
61 char* GEOM_IOperations_i::GetErrorCode()
63 return CORBA::string_dup(_impl->GetErrorCode());
66 //=============================================================================
70 //=============================================================================
71 CORBA::Long GEOM_IOperations_i::GetStudyID()
73 return _impl->GetDocID();
76 //=============================================================================
80 //=============================================================================
81 void GEOM_IOperations_i::StartOperation()
83 _impl->StartOperation();
86 //=============================================================================
90 //=============================================================================
91 void GEOM_IOperations_i::FinishOperation()
93 _impl->FinishOperation();
97 //=============================================================================
101 //=============================================================================
102 void GEOM_IOperations_i::AbortOperation()
104 _impl->AbortOperation();
107 //=============================================================================
111 //=============================================================================
112 GEOM::GEOM_Object_ptr GEOM_IOperations_i::GetObject(Handle(GEOM_Object) theObject)
114 if(theObject.IsNull()) return NULL;
115 TCollection_AsciiString anEntry;
116 TDF_Tool::Entry(theObject->GetEntry(), anEntry);
117 GEOM::GEOM_Object_var GO = GEOM::GEOM_Object::_duplicate(_engine->GetObject(theObject->GetDocID(), anEntry.ToCString()));