]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOM_I/GEOM_IOperations_i.cc
Salome HOME
ENV: Windows porting.
[modules/geom.git] / src / GEOM_I / GEOM_IOperations_i.cc
1 #include <Standard_Stream.hxx>
2
3 #include "GEOM_IOperations_i.hh"
4
5 #include "utilities.h"
6 #include "OpUtil.hxx"
7 #include "Utils_ExceptHandlers.hxx"
8
9 #include "GEOM_Engine.hxx"
10
11 //#include "GEOM_Gen_i.hh"
12
13 #include <TCollection_AsciiString.hxx>
14 #include <TDF_Tool.hxx>
15
16 //=============================================================================
17 /*!
18  *  default constructor:
19  */
20 //=============================================================================
21
22 GEOM_IOperations_i::GEOM_IOperations_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, ::GEOM_IOperations* theImpl)
23 #ifndef WNT
24 :SALOME::GenericObj_i( thePOA ), _impl(theImpl), _engine(theEngine)
25 #endif
26 {
27   thePOA->activate_object(this);
28 }
29
30 //=============================================================================
31 /*!
32  *  destructor
33  */
34 //=============================================================================
35
36 GEOM_IOperations_i::~GEOM_IOperations_i()
37 {}
38
39
40 //=============================================================================
41 /*!  
42  *  IsDone
43  */
44 //============================================================================= 
45 CORBA::Boolean GEOM_IOperations_i::IsDone()
46 {
47   return _impl->IsDone();
48 }  
49
50
51 //=============================================================================
52 /*!    
53  *  SetErrorCode
54  */
55 //============================================================================= 
56 void GEOM_IOperations_i::SetErrorCode(const char* theErrorCode)
57 {
58   _impl->SetErrorCode((char*)theErrorCode);
59 }
60  
61 //=============================================================================
62 /*!
63  *  GetErrorCode
64  */
65 //============================================================================= 
66 char* GEOM_IOperations_i::GetErrorCode() 
67 {
68   return _impl->GetErrorCode();    
69 }
70    
71 //=============================================================================
72 /*!
73  *  GetStudyID
74  */
75 //============================================================================= 
76 CORBA::Long GEOM_IOperations_i::GetStudyID() 
77 {
78   return _impl->GetDocID();    
79 }
80    
81 //=============================================================================
82 /*!
83  *  StartOperation
84  */
85 //=============================================================================
86 void GEOM_IOperations_i::StartOperation()
87 {
88   _impl->StartOperation();
89 }
90
91 //=============================================================================
92 /*!
93  *  FinishOperation
94  */
95 //=============================================================================
96 void GEOM_IOperations_i::FinishOperation()
97 {
98   _impl->FinishOperation();
99 }
100
101
102 //=============================================================================
103 /*!
104  *  AboutOperation
105  */
106 //=============================================================================
107 void GEOM_IOperations_i::AbortOperation()
108 {
109   _impl->AbortOperation();
110 }
111
112 //=============================================================================
113 /*!
114  *  GetObject
115  */
116 //=============================================================================
117 GEOM::GEOM_Object_ptr GEOM_IOperations_i::GetObject(Handle(GEOM_Object) theObject)         
118 {
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()));
123   return GO._retn();
124 }  
125