Salome HOME
Final version V2_0_1 which works with Med File V2.1 and the KERNEL
[modules/med.git] / src / MEDMEM_I / MEDMEM_Field_i.cxx
1 //=============================================================================
2 // File      : MEDMEM_Field_i.cxx
3 // Created   : mer fév 20 15:47:57 CET 2002
4 // Author    : EDF
5 // Project   : SALOME
6 // Copyright : EDF 2002
7 // $Header: /export/home/PAL/MED_SRC/src/MEDMEM_I/MEDMEM_Field_i.cxx
8 //=============================================================================
9 #include "MEDMEM_Field_i.hxx"
10
11 map < int, ::FIELD_ * > FIELD_i::fieldMap ;
12 int  FIELD_i::fieldIndex = 0;
13 //=============================================================================
14 /*!
15  * Default constructor
16  */
17 //=============================================================================
18
19 //FIELD_i::FIELD_i():_fieldTptr(FIELD_i::constructConstField())
20 FIELD_i::FIELD_i():_fieldTptr(constructConstField())
21 {
22         BEGIN_OF("Default Constructor Field_i");
23         END_OF(" Default Constructor Field_i");
24 }
25 //=============================================================================
26 /*!
27  * Destructor
28  */
29 //=============================================================================
30 FIELD_i::~FIELD_i()
31 {
32   if (_ownCppPtr) delete _fieldTptr;
33 }
34 //=============================================================================
35 /*!
36  * Constructor
37  */
38 //=============================================================================
39 FIELD_i::FIELD_i(::FIELD_ * const field, bool ownCppPtr):
40   _fieldTptr(field),
41   _corbaIndex(FIELD_i::fieldIndex++),
42   _FieldId(""),
43   _ownCppPtr(ownCppPtr)
44 {
45   BEGIN_OF("Constructor FIELD_i(SALOME_MED::SUPPORT_ptr support,::FIELD<T> * const field)");
46   FIELD_i::fieldMap[_corbaIndex]=_fieldTptr;
47
48   MESSAGE("FIELD_i::FIELD_i  Checking of pointeurs !!!");
49
50   SCRUTE(_fieldTptr);
51
52   END_OF("Constructor FIELD_i(SALOME_MED::SUPPORT_ptr support,::FIELD<T> * const field)");
53 }
54
55 //=============================================================================
56 /*!
57  * Constructor par recopie
58  */
59 //=============================================================================
60 FIELD_i::FIELD_i( FIELD_i & f):_fieldTptr(f._fieldTptr),
61                                _corbaIndex(FIELD_i::fieldIndex++),
62                                _FieldId(""), _ownCppPtr(false)
63 {
64         BEGIN_OF("Constructor Field_i");
65         FIELD_i::fieldMap[_corbaIndex]=_fieldTptr;
66         END_OF("Constructor Field_i");
67 }
68 //=============================================================================
69 /*!
70  * Constructor d un pointeur constant 
71  */
72 //=============================================================================
73  ::FIELD_ * FIELD_i::constructConstField() const
74 {
75         ::FIELD_ * const ptrField =new ::FIELD_();
76         return ptrField;
77 }
78 //=============================================================================
79 /*!
80  * CORBA: Accessor for Fields's Name
81  */
82 //=============================================================================
83 char * FIELD_i::getName()
84 throw (SALOME::SALOME_Exception)
85 {
86         if (_fieldTptr==NULL)
87                 THROW_SALOME_CORBA_EXCEPTION("No associated Field", \
88                                              SALOME::INTERNAL_ERROR);
89         try
90         {
91                 return CORBA::string_dup(_fieldTptr->getName().c_str());
92         }
93         catch (MEDEXCEPTION &ex)
94         {
95                 MESSAGE("Exception en accedant au nom");
96                 THROW_SALOME_CORBA_EXCEPTION(ex.what(), SALOME::INTERNAL_ERROR);
97         }
98 }
99 //=============================================================================
100 /*!
101  * CORBA: Accessor for Fields's Description
102  */
103 //=============================================================================
104 char * FIELD_i::getDescription()
105 throw (SALOME::SALOME_Exception)
106 {
107         if (_fieldTptr==NULL)
108                 THROW_SALOME_CORBA_EXCEPTION("No associated Field", \
109                                              SALOME::INTERNAL_ERROR);
110         try
111         {
112                 return CORBA::string_dup(_fieldTptr->getDescription().c_str());
113         }
114         catch (MEDEXCEPTION &ex)
115         {
116                 MESSAGE("Exception en accedant a la description");
117                 THROW_SALOME_CORBA_EXCEPTION(ex.what(), SALOME::INTERNAL_ERROR);
118         }
119 }
120 //=============================================================================
121 /*!
122  * CORBA: Accessor for Fields's Support
123  */
124 //=============================================================================
125
126 SALOME_MED::SUPPORT_ptr FIELD_i::getSupport()
127   throw (SALOME::SALOME_Exception)
128 {
129   BEGIN_OF("SALOME_MED::SUPPORT_ptr FIELD_i::getSupport()");
130
131   if (_fieldTptr==NULL)
132     THROW_SALOME_CORBA_EXCEPTION("No associated Field",
133                                  SALOME::INTERNAL_ERROR);
134   
135   SUPPORT_i* servant = new SUPPORT_i(_fieldTptr->getSupport());
136
137   SALOME_MED::SUPPORT_ptr support=servant->_this();
138
139   SCRUTE(_fieldTptr);
140
141   END_OF("SALOME_MED::SUPPORT_ptr FIELD_i::getSupport()");
142
143   return support ;
144 }
145 //=============================================================================
146 /*!
147  * CORBA: Accessor for Fields's Number of components
148  */
149 //=============================================================================
150 CORBA::Long FIELD_i::getNumberOfComponents()
151 throw (SALOME::SALOME_Exception)
152 {
153         if (_fieldTptr==NULL)
154                 THROW_SALOME_CORBA_EXCEPTION("No associated Field", \
155                                              SALOME::INTERNAL_ERROR);
156         try
157         {
158                 return _fieldTptr->getNumberOfComponents();
159         }
160         catch (MEDEXCEPTION &ex)
161         {
162                 MESSAGE("Exception en accedant au support");
163                 THROW_SALOME_CORBA_EXCEPTION(ex.what(), SALOME::INTERNAL_ERROR);
164         }
165 }
166 //=============================================================================
167 /*!
168  * CORBA: Accessor for names of component I
169  */
170 //=============================================================================
171 char * FIELD_i::getComponentName(CORBA::Long i)
172 throw (SALOME::SALOME_Exception)
173 {
174         if (_fieldTptr==NULL)
175                 THROW_SALOME_CORBA_EXCEPTION("No associated Field", \
176                                              SALOME::INTERNAL_ERROR);
177         try
178         {
179                 return CORBA::string_dup(_fieldTptr->getComponentName(i).c_str());
180         }
181         catch (MEDEXCEPTION &ex)
182         {
183                 MESSAGE("Exception en accedant au nom d un component");
184                 THROW_SALOME_CORBA_EXCEPTION(ex.what(), SALOME::INTERNAL_ERROR);
185         }
186 }
187 //=============================================================================
188 /*!
189  * CORBA: Accessor for unit of component I
190  */
191 //=============================================================================
192 char * FIELD_i::getComponentUnit(CORBA::Long i)
193 throw (SALOME::SALOME_Exception)
194 {
195         if (_fieldTptr==NULL)
196                 THROW_SALOME_CORBA_EXCEPTION("No associated Field", \
197                                              SALOME::INTERNAL_ERROR);
198         try
199         {
200                 return CORBA::string_dup(_fieldTptr->getMEDComponentUnit(i).c_str());
201         }
202         catch (MEDEXCEPTION &ex)
203         {
204                 MESSAGE("Exception en accedant au nom d un component");
205                 THROW_SALOME_CORBA_EXCEPTION(ex.what(), SALOME::INTERNAL_ERROR);
206         }
207 }
208 //=============================================================================
209 /*!
210  * CORBA: Accessor for description of component I
211  */
212 //=============================================================================
213 char * FIELD_i::getComponentDescription(CORBA::Long i)
214 throw (SALOME::SALOME_Exception)
215 {
216         if (_fieldTptr==NULL)
217                 THROW_SALOME_CORBA_EXCEPTION("No associated Field", \
218                                              SALOME::INTERNAL_ERROR);
219         try
220         {
221                 return CORBA::string_dup(_fieldTptr->getComponentDescription(i).c_str());
222         }
223         catch (MEDEXCEPTION &ex)
224         {
225                 MESSAGE("Exception en accedant a la description d un component");
226                 THROW_SALOME_CORBA_EXCEPTION(ex.what(), SALOME::INTERNAL_ERROR);
227         }
228 }
229 //=============================================================================
230 /*!
231  * CORBA: Accessor for iteration number 
232  */
233 //=============================================================================
234 CORBA::Long FIELD_i::getIterationNumber()
235 throw (SALOME::SALOME_Exception)
236 {
237         if (_fieldTptr==NULL)
238                 THROW_SALOME_CORBA_EXCEPTION("No associated Field", \
239                                              SALOME::INTERNAL_ERROR);
240         try
241         {
242                 return _fieldTptr->getIterationNumber();
243         }
244         catch (MEDEXCEPTION &ex)
245         {
246                 MESSAGE("Exception en accedant au champ");
247                 THROW_SALOME_CORBA_EXCEPTION(ex.what(), SALOME::INTERNAL_ERROR);
248         }
249 }
250 //=============================================================================
251 /*!
252  * CORBA: Accessor for Corba Number 
253  */
254 //=============================================================================
255 CORBA::Long FIELD_i::getCorbaIndex()
256 throw (SALOME::SALOME_Exception)
257 {
258         if (_fieldTptr==NULL)
259                 THROW_SALOME_CORBA_EXCEPTION("No associated Field", \
260                                              SALOME::INTERNAL_ERROR);
261         return _corbaIndex;
262         
263 }
264 //=============================================================================
265 /*!
266  * CORBA: Accessor for iteration number 
267  */
268 //=============================================================================
269 CORBA::Long FIELD_i::getOrderNumber()
270 throw (SALOME::SALOME_Exception)
271 {
272         if (_fieldTptr==NULL)
273                 THROW_SALOME_CORBA_EXCEPTION("No associated Field", \
274                                              SALOME::INTERNAL_ERROR);
275         try
276         {
277                 return _fieldTptr->getOrderNumber();
278         }
279         catch (MEDEXCEPTION &ex)
280         {
281                 MESSAGE("Exception en accedant au champ");
282                 THROW_SALOME_CORBA_EXCEPTION(ex.what(), SALOME::INTERNAL_ERROR);
283         }
284 }
285 //=============================================================================
286 /*!
287  * CORBA: Accessor  
288  */
289 //=============================================================================
290 CORBA::Double FIELD_i::getTime()
291 throw (SALOME::SALOME_Exception)
292 {
293         if (_fieldTptr==NULL)
294                 THROW_SALOME_CORBA_EXCEPTION("No associated Field", \
295                                              SALOME::INTERNAL_ERROR);
296         try
297         {
298                 return _fieldTptr->getTime();
299         }
300         catch (MEDEXCEPTION &ex)
301         {
302                 MESSAGE("Exception en accedant au champ");
303                 THROW_SALOME_CORBA_EXCEPTION(ex.what(), SALOME::INTERNAL_ERROR);
304         }
305 }
306 //=============================================================================
307 /*!
308  * CORBA: Accessor for Fields's Components names
309  */
310 //=============================================================================
311 SALOME_MED::string_array * FIELD_i::getComponentsNames()
312 throw (SALOME::SALOME_Exception)    
313 {
314         if (_fieldTptr==NULL)
315                 THROW_SALOME_CORBA_EXCEPTION("No associated Field", \
316                                              SALOME::INTERNAL_ERROR);
317         SALOME_MED::string_array_var myseq = new SALOME_MED::string_array;
318         try
319         {
320                 int nbcom = _fieldTptr->getNumberOfComponents();
321                 myseq->length(nbcom);
322                 const string * namecom=_fieldTptr->getComponentsNames();
323                 for (int i=0;i<nbcom;i++)
324                 {
325                         myseq[i]=CORBA::string_dup(namecom[i].c_str());
326                 }
327         }
328         catch (MEDEXCEPTION &ex)
329         {
330                 MESSAGE("Exception en accedant au champ");
331                 THROW_SALOME_CORBA_EXCEPTION(ex.what(), SALOME::INTERNAL_ERROR);
332         }
333         return myseq._retn();
334 }
335 //=============================================================================
336 /*!
337  * CORBA: Accessor for Fields's Components units
338  */
339 //=============================================================================
340 SALOME_MED::string_array * FIELD_i::getComponentsUnits()
341 throw (SALOME::SALOME_Exception)
342 {
343         if (_fieldTptr==NULL)
344                 THROW_SALOME_CORBA_EXCEPTION("No associated Field", \
345                                              SALOME::INTERNAL_ERROR);
346         SALOME_MED::string_array_var myseq = new SALOME_MED::string_array;
347         try
348         {
349                 int nbcom = _fieldTptr->getNumberOfComponents();
350                 myseq->length(nbcom);
351                 const string * unitcom=_fieldTptr->getMEDComponentsUnits();
352                 for (int i=0;i<nbcom;i++)
353                 {
354                         myseq[i]=CORBA::string_dup(unitcom[i].c_str());
355                 }
356         }
357         catch (MEDEXCEPTION &ex)
358         {
359                 MESSAGE("Exception en accedant au champ");
360                 THROW_SALOME_CORBA_EXCEPTION(ex.what(), SALOME::INTERNAL_ERROR);
361         }
362         return myseq._retn();
363 }
364 //=============================================================================
365 /*!
366  * CORBA: Accessor for Fields's Components descriptions
367  */
368 //=============================================================================
369 SALOME_MED::string_array * FIELD_i::getComponentsDescriptions()
370 throw (SALOME::SALOME_Exception)    
371 {
372         if (_fieldTptr==NULL)
373                 THROW_SALOME_CORBA_EXCEPTION("No associated Field", \
374                                              SALOME::INTERNAL_ERROR);
375         SALOME_MED::string_array_var myseq = new SALOME_MED::string_array;
376         try
377         {
378                 int nbcom = _fieldTptr->getNumberOfComponents();
379                 myseq->length(nbcom);
380                 const string * namecom=_fieldTptr->getComponentsDescriptions();
381                 for (int i=0;i<nbcom;i++)
382                 {
383                         myseq[i]=CORBA::string_dup(namecom[i].c_str());
384                 }
385         }
386         catch (MEDEXCEPTION &ex)
387         {
388                 MESSAGE("Exception en accedant au champ");
389                 THROW_SALOME_CORBA_EXCEPTION(ex.what(), SALOME::INTERNAL_ERROR);
390         }
391         return myseq._retn();
392 }
393 //=============================================================================
394 /*!
395  * CORBA: Add in Study
396  */
397 //=============================================================================
398 void FIELD_i::addInStudy(SALOMEDS::Study_ptr myStudy, 
399                                                  SALOME_MED::FIELD_ptr myIor )
400                     throw (SALOME::SALOME_Exception, SALOMEDS::StudyBuilder::LockProtection)
401 {
402         BEGIN_OF(" FIELD_i::addInStudy");
403         if (_fieldTptr==NULL)
404                 THROW_SALOME_CORBA_EXCEPTION("No associated Field", \
405                                              SALOME::INTERNAL_ERROR);
406         if ( _FieldId != "" )
407         {
408                 MESSAGE("Field already in Study");
409                     THROW_SALOME_CORBA_EXCEPTION("Field already in Study", \
410                                  SALOME::BAD_PARAM);
411         };
412
413
414         SALOMEDS::StudyBuilder_var myBuilder = myStudy->NewBuilder();
415         SALOMEDS::GenericAttribute_var anAttr;
416         SALOMEDS::AttributeName_var    aName;
417         SALOMEDS::AttributeIOR_var     aIOR;
418
419         // Create SComponent labelled 'Med'
420         SALOMEDS::SComponent_var medfather = myStudy->FindComponent("MED");
421         if ( CORBA::is_nil(medfather) )
422           THROW_SALOME_CORBA_EXCEPTION("SComponent labelled 'MED' not Found",SALOME::INTERNAL_ERROR);
423
424         // Create SObject labelled 'MEDFIELD' if it doesn't already exit
425         SALOMEDS::SObject_var medfieldfather = myStudy->FindObject("MEDFIELD");
426         if ( CORBA::is_nil(medfieldfather) ) 
427         {
428           MESSAGE("Add Object 'MEDFIELD'");
429           medfieldfather = myBuilder->NewObject(medfather);
430           anAttr = myBuilder->FindOrCreateAttribute(medfieldfather, "AttributeName");
431           aName = SALOMEDS::AttributeName::_narrow(anAttr);
432           aName->SetValue("MEDFIELD");
433           
434         } ;
435
436         string fieldName = _fieldTptr->getName();
437
438         // Create SObject labelled 'FIELDNAME' if it doesn't already exit
439         SALOMEDS::SObject_var medfieldnamefather = myStudy->FindObject(fieldName.c_str());
440         if ( CORBA::is_nil(medfieldnamefather) ) 
441         {
442           MESSAGE("Add Object "<<fieldName);
443           medfieldnamefather = myBuilder->NewObject(medfieldfather);
444           anAttr = myBuilder->FindOrCreateAttribute(medfieldnamefather, "AttributeName");
445           aName = SALOMEDS::AttributeName::_narrow(anAttr);
446           aName->SetValue(fieldName.c_str());
447
448         } ;
449
450         // Create object labelled according to Field's Name
451
452         MESSAGE("Add a Field Object under "<<fieldName);
453         myBuilder->NewCommand();
454         SALOMEDS::SObject_var newObj = myBuilder->NewObject(medfieldnamefather);
455
456         ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
457         ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting()) ;
458         CORBA::ORB_var &orb = init(0,0);
459
460         int iterationNumber = _fieldTptr->getIterationNumber();
461         SCRUTE(iterationNumber);
462
463         int orderNumber = _fieldTptr->getOrderNumber();
464         SCRUTE(orderNumber);
465
466         ostringstream iterationName ;
467         iterationName<<"(" << iterationNumber << "," << orderNumber << ")";
468         //      string supportName = _support->getName();
469         string supportName = (_fieldTptr->getSupport())->getName();
470         //      string meshName = (_support->getMesh())->getName();
471         string meshName = ((_fieldTptr->getSupport())->getMesh())->getName();
472         string meshNameStudy = meshName;
473
474         char * fieldEntryName;
475         int lenName = strlen(iterationName.str().c_str()) + 4 +
476           strlen(supportName.c_str()) + 4 + strlen(meshName.c_str()) + 1;
477
478         fieldEntryName = new char[lenName];
479         fieldEntryName = strcpy(fieldEntryName,iterationName.str().c_str());
480         fieldEntryName = strcat(fieldEntryName,"_ON_");
481         fieldEntryName = strcat(fieldEntryName,supportName.c_str());
482         fieldEntryName = strcat(fieldEntryName,"_OF_");
483
484         for (string::size_type pos=0; pos<meshNameStudy.size();++pos)
485           {
486             if (isspace(meshNameStudy[pos])) meshNameStudy[pos] = '_';
487           }
488
489         SCRUTE(meshNameStudy);
490
491         fieldEntryName = strcat(fieldEntryName,meshNameStudy.c_str());
492
493         SCRUTE(fieldEntryName);
494
495         anAttr = myBuilder->FindOrCreateAttribute(newObj, "AttributeName");
496         aName = SALOMEDS::AttributeName::_narrow(anAttr);
497 //         aName->SetValue(iterationName.str().c_str());
498         aName->SetValue(fieldEntryName);
499
500         string iorStr = orb->object_to_string(myIor);
501         anAttr = myBuilder->FindOrCreateAttribute(newObj, "AttributeIOR");
502         aIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
503         aIOR->SetValue(iorStr.c_str());
504         myBuilder->CommitCommand();
505         _FieldId = newObj->GetID();
506
507         MESSAGE("Computing path to Support");
508
509         char * supportEntryPath;
510         lenName = 28 + 15 + strlen(meshName.c_str()) + 1 +
511           strlen(supportName.c_str()) + 1;
512         supportEntryPath = new char[lenName];
513         supportEntryPath = strcpy(supportEntryPath,"/Med/MEDMESH/MEDSUPPORTS_OF_");
514         supportEntryPath = strcat(supportEntryPath,meshNameStudy.c_str());
515         supportEntryPath = strcat(supportEntryPath,"/");
516         supportEntryPath = strcat(supportEntryPath,supportName.c_str());
517
518         SCRUTE(supportEntryPath);
519
520         MESSAGE("supportEntryPath in field " << supportEntryPath << " length " << lenName);
521
522 //      SALOMEDS::SObject_var supportObject = myStudy->FindObject(supportName.c_str());
523         SALOMEDS::SObject_var supportObject = myStudy->FindObjectByPath(supportEntryPath);
524
525         SCRUTE(supportObject);
526
527         if ( CORBA::is_nil(supportObject) ) 
528         {
529           MESSAGE("supportObject is a nil corba object");
530           MESSAGE("FIELD_i::addInStudy : SUPPORT not found") ;
531         } 
532         else 
533         {
534           MESSAGE("supportObject is OK and is now going to be referenced !");
535           SALOMEDS::SObject_var newObjSupport = myBuilder->NewObject(newObj);
536           myBuilder->Addreference(newObjSupport,supportObject);
537           MESSAGE(" OUF !!!");
538         }
539
540         myBuilder->CommitCommand();
541
542         delete [] supportEntryPath;
543         delete [] fieldEntryName;
544
545         MESSAGE("FIELD_i::addInStudy");
546
547         //END_OF("FIELD_i::addInStudy");
548 }
549 //=============================================================================
550 /*!
551  * CORBA: write
552  */
553 //=============================================================================
554 void FIELD_i::write (CORBA::Long i, const char* driverFieldName)
555 throw (SALOME::SALOME_Exception)
556 {
557         if (_fieldTptr==NULL)
558                 THROW_SALOME_CORBA_EXCEPTION("No associated Field", \
559                                              SALOME::INTERNAL_ERROR);
560         try
561         {
562                 _fieldTptr->write(i,driverFieldName);
563         }
564         catch (MEDEXCEPTION &ex)
565         {
566                 MESSAGE("Exception en accedant au champ");
567                 THROW_SALOME_CORBA_EXCEPTION("Unable to acces Field C++ Object"\
568                                                 ,SALOME::INTERNAL_ERROR);
569         }
570 }
571 //=============================================================================
572 /*!
573  * CORBA: read
574  */
575 //=============================================================================
576 void FIELD_i::read (CORBA::Long i)
577 throw (SALOME::SALOME_Exception)
578 {
579         if (_fieldTptr==NULL)
580                 THROW_SALOME_CORBA_EXCEPTION("No associated Field", \
581                                              SALOME::INTERNAL_ERROR);
582         try
583         {
584                 _fieldTptr->read(i);
585         }
586         catch (MEDEXCEPTION &ex)
587         {
588                 MESSAGE("Exception en accedant au champ");
589                 THROW_SALOME_CORBA_EXCEPTION(ex.what(), SALOME::INTERNAL_ERROR);
590         }
591 }
592 //=============================================================================
593 /*!
594  * CORBA: rmDriver
595  */
596 //=============================================================================
597 void FIELD_i::rmDriver (CORBA::Long i)
598 throw (SALOME::SALOME_Exception)
599 {
600         if (_fieldTptr==NULL)
601                 THROW_SALOME_CORBA_EXCEPTION("No associated Field", \
602                                              SALOME::INTERNAL_ERROR);
603         try
604         {
605                 _fieldTptr->rmDriver(i);
606         }
607         catch (MEDEXCEPTION &ex)
608         {
609                 MESSAGE("Exception en accedant au champ");
610                 THROW_SALOME_CORBA_EXCEPTION(ex.what(), SALOME::INTERNAL_ERROR);
611         }
612 }
613 //=============================================================================
614 /*!
615  * CORBA: addDriver
616  */
617 //=============================================================================
618 CORBA::Long FIELD_i::addDriver (SALOME_MED::medDriverTypes driverType, 
619                         const char* fileName, const char* fieldName) throw (SALOME::SALOME_Exception)
620 {
621         if (_fieldTptr==NULL)
622                 THROW_SALOME_CORBA_EXCEPTION("No associated Field", \
623                                              SALOME::INTERNAL_ERROR);
624         try
625         {
626                 int drivernum=_fieldTptr->addDriver(
627                                         convertIdlDriverToMedDriver(driverType),
628                                         fileName,
629                                         fieldName);
630                 return drivernum;
631         }
632         catch (MEDEXCEPTION &ex)
633         {
634                 MESSAGE("Exception en accedant au champ");
635                 THROW_SALOME_CORBA_EXCEPTION(ex.what(), SALOME::INTERNAL_ERROR);
636         }
637 }
638
639 //=============================================================================
640 /*!
641  * CORBA: Destructor
642 */
643 //=============================================================================
644 void FIELD_i::release()
645 {
646   PortableServer::ObjectId_var oid=_default_POA()->servant_to_id(this);
647   _default_POA()->deactivate_object(oid);
648   _remove_ref();
649 }
650