Salome HOME
Merge branch 'vsr/26457'
[modules/kernel.git] / src / KernelHelpers / SALOMEDS_DriverDefaultImpl.cxx
1 // Copyright (C) 2007-2021  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 // Author: Guillaume Boulant (EDF/R&D)
21
22 #include <utilities.h>
23 #include "SALOMEDS_DriverDefaultImpl.hxx"
24
25
26 //===========================================================================
27     SALOMEDS_DriverDefaultImpl::SALOMEDS_DriverDefaultImpl(CORBA::ORB_ptr /*orb*/,
28                                          PortableServer::POA_ptr /*poa*/,
29                                          PortableServer::ObjectId * /*contId*/,
30                                          const char * /*instanceName*/,
31                                          const char * /*interfaceName*/) 
32 //     :Engines_Component_i(orb, poa, contId, instanceName, interfaceName)
33   {
34     MESSAGE("SALOMEDS_DriverDefaultImpl::SALOMEDS_DriverDefaultImpl : ");
35   }
36
37 //===========================================================================
38   SALOMEDS_DriverDefaultImpl::~SALOMEDS_DriverDefaultImpl()
39   {
40     MESSAGE("SALOMEDS_DriverDefaultImpl::~SALOMEDS_DriverDefaultImpl");
41   }
42
43 //===========================================================================
44   CORBA::Boolean SALOMEDS_DriverDefaultImpl::Load(SALOMEDS::SComponent_ptr /*theComponent*/,
45                                   const SALOMEDS::TMPFile & /*theStream*/,
46                                   const char* /*theURL*/,
47                                   bool /*isMultiFile*/)
48   {
49     MESSAGE("--------------------------------------");
50     MESSAGE("--------------------------------------");
51     MESSAGE("--------------------------------------");
52     MESSAGE("SALOMEDS_DriverDefaultImpl::Load");
53     MESSAGE("Should be implemented");
54     MESSAGE("--------------------------------------");
55     MESSAGE("--------------------------------------");
56     MESSAGE("--------------------------------------");
57     return false;
58   }
59
60 //===========================================================================
61   CORBA::Boolean SALOMEDS_DriverDefaultImpl::LoadASCII(SALOMEDS::SComponent_ptr /*theComponent*/,
62                                        const SALOMEDS::TMPFile & /*theStream*/,
63                                        const char* /*theURL*/,
64                                        bool /*isMultiFile*/)
65   {
66     MESSAGE("--------------------------------------");
67     MESSAGE("--------------------------------------");
68     MESSAGE("--------------------------------------");
69     MESSAGE("SALOMEDS_DriverDefaultImpl::LoadASCII");
70     MESSAGE("Should be implemented");
71     MESSAGE("--------------------------------------");
72     MESSAGE("--------------------------------------");
73     MESSAGE("--------------------------------------");
74     return false;
75   }
76
77 //===========================================================================
78   char* SALOMEDS_DriverDefaultImpl::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr /*theSObject*/,
79                                            const char* /*aLocalPersistentID*/,
80                                            CORBA::Boolean /*isMultiFile*/,
81                                            CORBA::Boolean /*isASCII*/)
82   {
83     MESSAGE("--------------------------------------");
84     MESSAGE("--------------------------------------");
85     MESSAGE("--------------------------------------");
86     MESSAGE("SALOMEDS_DriverDefaultImpl::LocalPersistentIDToIOR");
87     MESSAGE("Should be implemented");
88     MESSAGE("--------------------------------------");
89     MESSAGE("--------------------------------------");
90     MESSAGE("--------------------------------------");
91     CORBA::String_var aString("");
92     return aString._retn();
93   }
94
95 //===========================================================================
96   SALOMEDS::TMPFile* SALOMEDS_DriverDefaultImpl::Save(SALOMEDS::SComponent_ptr /*theComponent*/,
97                                       const char* /*theURL*/,
98                                       bool /*isMultiFile*/)
99   {
100     MESSAGE("--------------------------------------");
101     MESSAGE("--------------------------------------");
102     MESSAGE("--------------------------------------");
103     MESSAGE("SALOMEDS_DriverDefaultImpl::Save");
104     MESSAGE("Should be implemented");
105     MESSAGE("--------------------------------------");
106     MESSAGE("--------------------------------------");
107     MESSAGE("--------------------------------------");
108     SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile(0);
109     return aStreamFile._retn();
110   }
111
112 //===========================================================================
113   SALOMEDS::TMPFile* SALOMEDS_DriverDefaultImpl::SaveASCII(SALOMEDS::SComponent_ptr /*theComponent*/,
114                                            const char* /*theURL*/,
115                                            bool /*isMultiFile*/)
116   {
117     MESSAGE("--------------------------------------");
118     MESSAGE("--------------------------------------");
119     MESSAGE("--------------------------------------");
120     MESSAGE("SALOMEDS_DriverDefaultImpl::SaveASCII");
121     MESSAGE("Should be implemented");
122     MESSAGE("--------------------------------------");
123     MESSAGE("--------------------------------------");
124     MESSAGE("--------------------------------------");
125     SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile(0);
126     return aStreamFile._retn();
127   }
128
129 //===========================================================================
130   char* SALOMEDS_DriverDefaultImpl::IORToLocalPersistentID(SALOMEDS::SObject_ptr /*theSObject*/,
131                                            const char* /*IORString*/,
132                                            CORBA::Boolean /*isMultiFile*/,
133                                            CORBA::Boolean /*isASCII*/)
134   {
135     MESSAGE("-----------------------------------------");
136     MESSAGE("-----------------------------------------");
137     MESSAGE("-----------------------------------------");
138     MESSAGE("SALOMEDS_DriverDefaultImpl::IORToLocalPersistentID");
139     MESSAGE("Should be implemented");
140     MESSAGE("-----------------------------------------");
141     MESSAGE("-----------------------------------------");
142     MESSAGE("-----------------------------------------");
143     CORBA::String_var aString("");
144     return aString._retn();
145   }
146
147
148 //===========================================================================
149   void SALOMEDS_DriverDefaultImpl::Close(SALOMEDS::SComponent_ptr /*theComponent*/)
150   {
151     MESSAGE("------------------------");
152     MESSAGE("SALOMEDS_DriverDefaultImpl::Close");
153     MESSAGE("------------------------");
154   }
155
156 //===========================================================================
157   char* SALOMEDS_DriverDefaultImpl::ComponentDataType()
158   {
159     MESSAGE("-----------------------------------------");
160     MESSAGE("-----------------------------------------");
161     MESSAGE("-----------------------------------------");
162     MESSAGE("SALOMEDS_DriverDefaultImpl::ComponentDataType");
163     MESSAGE("Should be implemented");
164     MESSAGE("-----------------------------------------");
165     MESSAGE("-----------------------------------------");
166     MESSAGE("-----------------------------------------");
167     return CORBA::string_dup("J aurais du nommer mon type prefere");
168   }
169
170 //===========================================================================
171   bool SALOMEDS_DriverDefaultImpl::CanPublishInStudy(CORBA::Object_ptr /*theIOR*/) 
172   {
173     MESSAGE("-----------------------------------------");
174     MESSAGE("-----------------------------------------");
175     MESSAGE("-----------------------------------------");
176     MESSAGE("SALOMEDS_DriverDefaultImpl::CanPublishInStudy");
177     MESSAGE("Should be implemented");
178     MESSAGE("-----------------------------------------");
179     MESSAGE("-----------------------------------------");
180     MESSAGE("-----------------------------------------");
181     return false;
182   }
183
184 //===========================================================================
185   SALOMEDS::SObject_ptr SALOMEDS_DriverDefaultImpl::PublishInStudy(SALOMEDS::SObject_ptr /*theSObject*/,
186                                                                                            CORBA::Object_ptr    /*theObject*/,
187                                                                                            const char*          /* theName*/)
188   {
189     MESSAGE("-----------------------------------------");
190     MESSAGE("-----------------------------------------");
191     MESSAGE("-----------------------------------------");
192     MESSAGE("SALOMEDS_DriverDefaultImpl::PublishInStudy");
193     MESSAGE("Should be implemented");
194     MESSAGE("-----------------------------------------");
195     MESSAGE("-----------------------------------------");
196     MESSAGE("-----------------------------------------");
197     SALOMEDS::SObject_var aResultSO;
198     return aResultSO._retn();
199   }
200
201 //===========================================================================
202   CORBA::Boolean SALOMEDS_DriverDefaultImpl::CanCopy(SALOMEDS::SObject_ptr /*theObject*/) 
203   {
204     MESSAGE("-----------------------------------------");
205     MESSAGE("-----------------------------------------");
206     MESSAGE("-----------------------------------------");
207     MESSAGE("SALOMEDS_DriverDefaultImpl::CanCopy");
208     MESSAGE("Should be implemented");
209     MESSAGE("-----------------------------------------");
210     MESSAGE("-----------------------------------------");
211     MESSAGE("-----------------------------------------");
212     //return false;
213     return true;
214   }
215
216 //===========================================================================
217   SALOMEDS::TMPFile* SALOMEDS_DriverDefaultImpl::CopyFrom(SALOMEDS::SObject_ptr /*theObject*/,
218                                              CORBA::Long& /*theObjectID*/)
219 {
220     MESSAGE("--------------------------------------");
221     MESSAGE("--------------------------------------");
222     MESSAGE("--------------------------------------");
223     MESSAGE("SALOMEDS_DriverDefaultImpl::CopyFrom");
224     MESSAGE("Should be implemented");
225     MESSAGE("--------------------------------------");
226     MESSAGE("--------------------------------------");
227     MESSAGE("--------------------------------------");
228     SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile(0);
229     return aStreamFile._retn();
230 }
231
232 //===========================================================================
233   SALOMEDS::SObject_ptr SALOMEDS_DriverDefaultImpl::PasteInto( const SALOMEDS::TMPFile & /*theStream*/,
234                                                       CORBA::Long /*theObjectID*/,
235                                                       SALOMEDS::SObject_ptr /*theSObject*/)
236   {
237     MESSAGE("-----------------------------------------");
238     MESSAGE("-----------------------------------------");
239     MESSAGE("-----------------------------------------");
240     MESSAGE("SALOMEDS_DriverDefaultImpl::PasteInto");
241     MESSAGE("Should be implemented");
242     MESSAGE("-----------------------------------------");
243     MESSAGE("-----------------------------------------");
244     MESSAGE("-----------------------------------------");
245     SALOMEDS::SObject_var aResultSO;
246     return aResultSO._retn();
247   }
248
249 //===========================================================================
250    CORBA::Boolean  SALOMEDS_DriverDefaultImpl::CanPaste ( const char * /*theComponentName*/,
251                                                  CORBA::Long /*theObjectID*/)
252   {
253     MESSAGE("-----------------------------------------");
254     MESSAGE("-----------------------------------------");
255     MESSAGE("-----------------------------------------");
256     MESSAGE("SALOMEDS_DriverDefaultImpl::CanPaste");
257     MESSAGE("Should be implemented");
258     MESSAGE("-----------------------------------------");
259     MESSAGE("-----------------------------------------");
260     MESSAGE("-----------------------------------------");
261     return false;
262   }
263
264