1 #include <Standard_Stream.hxx>
3 #include "GEOM_IOperations_i.hh"
7 #include "Utils_ExceptHandlers.hxx"
9 #include "GEOM_Engine.hxx"
11 //#include "GEOM_Gen_i.hh"
13 #include <TCollection_AsciiString.hxx>
14 #include <TDF_Tool.hxx>
16 //=============================================================================
18 * default constructor:
20 //=============================================================================
22 GEOM_IOperations_i::GEOM_IOperations_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, ::GEOM_IOperations* theImpl)
24 :SALOME::GenericObj_i( thePOA ), _impl(theImpl), _engine(theEngine)
27 thePOA->activate_object(this);
30 //=============================================================================
34 //=============================================================================
36 GEOM_IOperations_i::~GEOM_IOperations_i()
40 //=============================================================================
44 //=============================================================================
45 CORBA::Boolean GEOM_IOperations_i::IsDone()
47 return _impl->IsDone();
51 //=============================================================================
55 //=============================================================================
56 void GEOM_IOperations_i::SetErrorCode(const char* theErrorCode)
58 _impl->SetErrorCode((char*)theErrorCode);
61 //=============================================================================
65 //=============================================================================
66 char* GEOM_IOperations_i::GetErrorCode()
68 return _impl->GetErrorCode();
71 //=============================================================================
75 //=============================================================================
76 CORBA::Long GEOM_IOperations_i::GetStudyID()
78 return _impl->GetDocID();
81 //=============================================================================
85 //=============================================================================
86 void GEOM_IOperations_i::StartOperation()
88 _impl->StartOperation();
91 //=============================================================================
95 //=============================================================================
96 void GEOM_IOperations_i::FinishOperation()
98 _impl->FinishOperation();
102 //=============================================================================
106 //=============================================================================
107 void GEOM_IOperations_i::AbortOperation()
109 _impl->AbortOperation();
112 //=============================================================================
116 //=============================================================================
117 GEOM::GEOM_Object_ptr GEOM_IOperations_i::GetObject(Handle(GEOM_Object) theObject)
119 if(theObject.IsNull()) return NULL;
120 TCollection_AsciiString anEntry;
121 TDF_Tool::Entry(theObject->GetEntry(), anEntry);
122 GEOM::GEOM_Object_var GO = GEOM::GEOM_Object::_duplicate(_engine->GetObject(theObject->GetDocID(), anEntry.ToCString()));