Salome HOME
#18963 Minimize compiler warnings
[modules/smesh.git] / src / SMESH_I / SMESH_Mesh_i.hxx
1 // Copyright (C) 2007-2020  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //  File   : SMESH_Mesh_i.hxx
23 //  Author : Paul RASCLE, EDF
24 //  Module : SMESH
25
26 #ifndef _SMESH_MESH_I_HXX_
27 #define _SMESH_MESH_I_HXX_
28
29 #include "SMESH.hxx"
30
31 #include "SMESH_Hypothesis.hxx"
32 #include "SMESH_Mesh.hxx"
33 #include "SMESH_subMesh.hxx"
34 #include "SMDS_ElemIterator.hxx"
35
36 #include <SALOME_GenericObj_i.hh>
37 #include <SALOMEconfig.h>
38 #include CORBA_SERVER_HEADER(SMESH_Gen)
39 #include CORBA_SERVER_HEADER(SMESH_Mesh)
40 #include CORBA_SERVER_HEADER(SMESH_Group)
41 #include CORBA_SERVER_HEADER(SMESH_Hypothesis)
42 #include CORBA_CLIENT_HEADER(GEOM_Gen)
43
44 #include <map>
45
46 class SMESH_Gen_i;
47 class SMESH_GroupBase_i;
48 class SMESH_subMesh_i;
49 class SMESH_PreMeshInfo;
50 class SMESH_MeshEditor_i;
51 class DriverMED_W_Field;
52 class SMESHDS_Mesh;
53
54 class SMESH_I_EXPORT SMESH_Mesh_i:
55   public virtual POA_SMESH::SMESH_Mesh,
56   public virtual SALOME::GenericObj_i
57 {
58   SMESH_Mesh_i();
59   SMESH_Mesh_i(const SMESH_Mesh_i&);
60 public:
61   SMESH_Mesh_i( PortableServer::POA_ptr thePOA,
62                 SMESH_Gen_i*            myGen_i );
63
64   virtual ~SMESH_Mesh_i();
65
66   // --- CORBA
67
68   void SetShape( GEOM::GEOM_Object_ptr theShapeObject );
69
70   CORBA::Boolean HasShapeToMesh();
71
72   GEOM::GEOM_Object_ptr GetShapeToMesh();
73
74   virtual void ReplaceShape(GEOM::GEOM_Object_ptr theNewGeom);
75
76   CORBA::Boolean IsLoaded();
77
78   void Load();
79
80   void Clear();
81
82   void ClearSubMesh(CORBA::Long ShapeID);
83
84   SMESH::Hypothesis_Status AddHypothesis(GEOM::GEOM_Object_ptr       aSubShape,
85                                          SMESH::SMESH_Hypothesis_ptr anHyp,
86                                          CORBA::String_out           anErrorText);
87
88   SMESH::Hypothesis_Status RemoveHypothesis(GEOM::GEOM_Object_ptr       aSubShape,
89                                             SMESH::SMESH_Hypothesis_ptr anHyp);
90
91   SMESH::ListOfHypothesis* GetHypothesisList(GEOM::GEOM_Object_ptr aSubShape);
92
93   SMESH::submesh_array* GetSubMeshes();
94
95   SMESH::SMESH_subMesh_ptr GetSubMesh(GEOM::GEOM_Object_ptr aSubShape, const char* theName);
96
97   void RemoveSubMesh( SMESH::SMESH_subMesh_ptr theSubMesh );
98
99   SMESH::SMESH_Group_ptr CreateGroup( SMESH::ElementType theElemType, const char* theName );
100
101   SMESH::SMESH_GroupOnGeom_ptr CreateGroupFromGEOM(SMESH::ElementType    theElemType,
102                                                    const char*           theName,
103                                                    GEOM::GEOM_Object_ptr theGeomObj );
104
105   SMESH::SMESH_GroupOnFilter_ptr CreateGroupFromFilter(SMESH::ElementType theElemType,
106                                                        const char*        theName,
107                                                        SMESH::Filter_ptr  theFilter );
108
109   void RemoveGroup( SMESH::SMESH_GroupBase_ptr theGroup );
110
111   void RemoveGroupWithContents( SMESH::SMESH_GroupBase_ptr theGroup );
112
113   SMESH::ListOfGroups* GetGroups();
114
115   CORBA::Long NbGroups();
116
117   SMESH::SMESH_Group_ptr UnionGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
118                                       SMESH::SMESH_GroupBase_ptr theGroup2,
119                                       const char* theName );
120
121   SMESH::SMESH_Group_ptr UnionListOfGroups( const SMESH::ListOfGroups& theGroups,
122                                             const char* theName);
123
124   SMESH::SMESH_Group_ptr IntersectGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
125                                           SMESH::SMESH_GroupBase_ptr theGroup2,
126                                           const char* theName );
127
128   SMESH::SMESH_Group_ptr IntersectListOfGroups( const SMESH::ListOfGroups&  theGroups,
129                                                 const char* theName );
130
131   SMESH::SMESH_Group_ptr CutGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
132                                     SMESH::SMESH_GroupBase_ptr theGroup2,
133                                     const char* theName );
134
135   SMESH::SMESH_Group_ptr CutListOfGroups( const SMESH::ListOfGroups& theMainGroups,
136                                           const SMESH::ListOfGroups& theToolGroups,
137                                           const char* theName );
138
139   SMESH::SMESH_Group_ptr CreateDimGroup( const SMESH::ListOfIDSources& theGroups,
140                                          SMESH::ElementType            theElemType,
141                                          const char*                   theName,
142                                          SMESH::NB_COMMON_NODES_ENUM   theNbCommonNodes,
143                                          CORBA::Boolean                theUnderlyingOnly );
144
145   SMESH::ListOfGroups* FaceGroupsSeparatedByEdges( CORBA::Double  theSharpAngle,
146                                                    CORBA::Boolean theCreateEdges,
147                                                    CORBA::Boolean theUseExistingEdges );
148
149   SMESH::SMESH_Group_ptr ConvertToStandalone( SMESH::SMESH_GroupBase_ptr theGroupOn );
150
151   SMESH::log_array* GetLog(CORBA::Boolean clearAfterGet);
152
153   SMESH::SMESH_MeshEditor_ptr GetMeshEditor();
154
155   SMESH::SMESH_MeshEditor_ptr GetMeshEditPreviewer();
156
157   CORBA::Boolean HasModificationsToDiscard();
158
159   void ClearLog();
160
161   CORBA::Long GetId();
162
163   // --- C++ interface
164
165   void SetImpl(::SMESH_Mesh* impl);
166   ::SMESH_Mesh& GetImpl();         // :: force no namespace here
167
168   SMESH_Gen_i* GetGen() { return _gen_i; }
169
170   int ImportUNVFile( const char* theFileName );
171
172   int ImportSTLFile( const char* theFileName );
173
174   SMESH::ComputeError* ImportGMFFile( const char* theFileName,
175                                       bool        theMakeRequiredGroups);
176
177   /*!
178    * consult DriverMED_R_SMESHDS_Mesh::ReadStatus for returned value
179    */
180   SMESH::DriverMED_ReadStatus ImportMEDFile( const char* theFileName, const char* theMeshName );
181
182   SMESH::DriverMED_ReadStatus ImportCGNSFile( const char*  theFileName,
183                                               const int    theMeshIndex,
184                                               std::string& theMeshName);
185
186   /*!
187    *  Auto color
188    */
189   void SetAutoColor(CORBA::Boolean theAutoColor);
190
191   CORBA::Boolean GetAutoColor();
192
193   /*! Check group names for duplications.
194    *  Consider maximum group name length stored in MED file.
195    */
196   CORBA::Boolean HasDuplicatedGroupNamesMED();
197
198   /*!
199    * Return string representation of a MED file version comprising nbDigits
200    */
201   char* GetVersionString(CORBA::Long minor, CORBA::Short nbDigits);
202
203   /*!
204    *  Return the list of med versions compatibles for write/append,
205    *  encoded in 10*major+minor (for instance, code for med 3.2.1 is 32)
206    */
207   SMESH::long_array* GetMEDVersionsCompatibleForAppend();
208
209   void ExportMED( const char*        file,
210                   CORBA::Boolean     auto_groups,
211                   CORBA::Long        version,
212                   CORBA::Boolean     overwrite,
213                   CORBA::Boolean     autoDimension = true);
214
215   void ExportSAUV( const char* file, CORBA::Boolean auto_groups );
216
217   void ExportDAT( const char* file );
218   void ExportUNV( const char* file );
219   void ExportSTL( const char* file, bool isascii );
220   void ExportCGNS(SMESH::SMESH_IDSource_ptr meshPart,
221                   const char*               file,
222                   CORBA::Boolean            overwrite,
223                   CORBA::Boolean            groupElemsByType);
224   void ExportGMF(SMESH::SMESH_IDSource_ptr meshPart,
225                  const char*               file,
226                  CORBA::Boolean            withRequiredGroups);
227
228   void ExportPartToMED(SMESH::SMESH_IDSource_ptr meshPart,
229                        const char*               file,
230                        CORBA::Boolean            auto_groups,
231                        CORBA::Long               version,
232                        CORBA::Boolean            overwrite,
233                        CORBA::Boolean            autoDim,
234                        const GEOM::ListOfFields& fields,
235                        const char*               geomAssocFields,
236                        CORBA::Double             ZTolerance);
237   void ExportPartToDAT(SMESH::SMESH_IDSource_ptr meshPart,
238                        const char*               file);
239   void ExportPartToUNV(SMESH::SMESH_IDSource_ptr meshPart,
240                        const char*               file);
241   void ExportPartToSTL(SMESH::SMESH_IDSource_ptr meshPart,
242                        const char*               file,
243                        CORBA::Boolean            isascii);
244
245   CORBA::Double GetComputeProgress();
246
247   CORBA::Long NbNodes();
248
249   CORBA::Long NbElements();
250
251   CORBA::Long Nb0DElements();
252
253   CORBA::Long NbBalls();
254
255   CORBA::Long NbEdges();
256
257   CORBA::Long NbEdgesOfOrder(SMESH::ElementOrder order);
258
259   CORBA::Long NbFaces();
260
261   CORBA::Long NbFacesOfOrder(SMESH::ElementOrder order);
262
263   CORBA::Long NbTriangles();
264
265   CORBA::Long NbTrianglesOfOrder(SMESH::ElementOrder order);
266
267   CORBA::Long NbBiQuadTriangles();
268
269   CORBA::Long NbQuadrangles();
270
271   CORBA::Long NbQuadranglesOfOrder(SMESH::ElementOrder order);
272
273   CORBA::Long NbBiQuadQuadrangles();
274
275   CORBA::Long NbPolygons();
276
277   CORBA::Long NbPolygonsOfOrder(SMESH::ElementOrder order = SMESH::ORDER_ANY);
278
279   CORBA::Long NbVolumes();
280
281   CORBA::Long NbVolumesOfOrder(SMESH::ElementOrder order);
282
283   CORBA::Long NbTetras();
284
285   CORBA::Long NbTetrasOfOrder(SMESH::ElementOrder order);
286
287   CORBA::Long NbHexas();
288
289   CORBA::Long NbHexasOfOrder(SMESH::ElementOrder order);
290
291   CORBA::Long NbTriQuadraticHexas();
292
293   CORBA::Long NbPyramids();
294
295   CORBA::Long NbPyramidsOfOrder(SMESH::ElementOrder order);
296
297   CORBA::Long NbPrisms();
298
299   CORBA::Long NbPrismsOfOrder(SMESH::ElementOrder order);
300
301   CORBA::Long NbHexagonalPrisms();
302
303   CORBA::Long NbPolyhedrons();
304
305   CORBA::Long NbSubMesh();
306
307   SMESH::long_array* GetElementsId();
308
309   SMESH::long_array* GetElementsByType( SMESH::ElementType theElemType );
310
311   SMESH::long_array* GetNodesId();
312
313   SMESH::ElementType GetElementType( CORBA::Long id, bool iselem );
314
315   SMESH::EntityType GetElementGeomType( CORBA::Long id );
316
317   SMESH::GeometryType GetElementShape( CORBA::Long id );
318
319   /*!
320    * Returns ID of elements for given submesh
321    */
322   SMESH::long_array* GetSubMeshElementsId(CORBA::Long ShapeID);
323
324   /*!
325    * Returns ID of nodes for given submesh
326    * If param all==true - returns all nodes, else -
327    * returns only nodes on shapes.
328    */
329   SMESH::long_array* GetSubMeshNodesId(CORBA::Long ShapeID, CORBA::Boolean all);
330
331   /*!
332    * Returns type of elements for given submesh
333    */
334   SMESH::ElementType GetSubMeshElementType(CORBA::Long ShapeID);
335
336   char* Dump();
337
338   // Create groups of elements preventing computation of a sub-shape
339   SMESH::ListOfGroups* MakeGroupsOfBadInputElements( int         theSubShapeID,
340                                                      const char* theGroupName);
341
342   // ===================================================
343   // Internal methods not available through CORBA
344   // They are called by corresponding interface methods
345   // ===================================================
346
347   SMESH_Hypothesis::Hypothesis_Status addHypothesis(GEOM::GEOM_Object_ptr       aSubShape,
348                                                     SMESH::SMESH_Hypothesis_ptr anHyp,
349                                                     std::string*                anErrorText=0);
350
351   SMESH_Hypothesis::Hypothesis_Status removeHypothesis(GEOM::GEOM_Object_ptr aSubShape,
352                                                        SMESH::SMESH_Hypothesis_ptr anHyp);
353
354   static SMESH::Hypothesis_Status
355   ConvertHypothesisStatus (SMESH_Hypothesis::Hypothesis_Status theStatus);
356
357   static void PrepareForWriting (const char* file, bool overwrite = true);
358
359   //int importMEDFile( const char* theFileName, const char* theMeshName );
360
361   SMESH::SMESH_subMesh_ptr createSubMesh( GEOM::GEOM_Object_ptr theSubShapeObject );
362
363   bool removeSubMesh(SMESH::SMESH_subMesh_ptr theSubMesh,
364                      GEOM::GEOM_Object_ptr theSubShapeObject );
365
366   SMESH::SMESH_GroupBase_ptr createGroup(SMESH::ElementType        theElemType,
367                                          const char*               theName,
368                                          const int                 theID = -1,
369                                          const TopoDS_Shape&       theShape = TopoDS_Shape(),
370                                          const SMESH_PredicatePtr& thePred = SMESH_PredicatePtr());
371
372   void removeGroup( const int theId );
373
374   SMESH::SMESH_subMesh_ptr getSubMesh(int shapeID);
375   // return an existing subMesh object for the shapeID. shapeID == submeshID.
376
377   const std::map<int, SMESH::SMESH_GroupBase_ptr>& getGroups() { return _mapGroups; }
378   // return existing group objects
379
380   void onHypothesisModified(int theHypID, bool updateIcons);
381   // callback from _impl to forget not loaded mesh data (issue 0021208)
382
383   /*!
384    * \brief Update data if geometry changes
385    *
386    * Issue 0022501
387    */
388   void CheckGeomModif( bool isBreakLink = false );
389   /*!
390    * \brief Update hypotheses assigned to geom groups if the latter change
391    *
392    * NPAL16168: "geometrical group edition from a submesh don't modify mesh computation"
393    */
394   void CheckGeomGroupModif();
395
396   CORBA::LongLong GetMeshPtr();
397
398   /*!
399    * \brief Assure that all groups are published
400    */
401   void CreateGroupServants();
402
403   /*!
404    * \brief Return true if all sub-meshes are computed OK - to update an icon
405    */
406   bool IsComputedOK();
407
408
409   // ====================================
410   // SMESH_Mesh interface (continuation)
411   // ====================================
412
413   /*!
414    * \brief Return groups cantained in _mapGroups by their IDs
415    */
416   SMESH::ListOfGroups* GetGroups(const std::list<int>& groupIDs) const;
417
418   /*!
419    * Get XYZ coordinates of node as list of double
420    * If there is not node for given ID - returns empty list
421    */
422   SMESH::double_array* GetNodeXYZ(CORBA::Long id);
423
424   /*!
425    * For given node returns list of IDs of inverse elements
426    * If there is not node for given ID - returns empty list
427    */
428   SMESH::long_array* GetNodeInverseElements(CORBA::Long        id,
429                                             SMESH::ElementType elemType);
430
431   /*!
432    * \brief Return position of a node on shape
433    */
434   SMESH::NodePosition* GetNodePosition(CORBA::Long NodeID);
435
436   /*!
437    * \brief Return position of an element on shape
438    */
439   SMESH::ElementPosition GetElementPosition(CORBA::Long ElemID);
440
441   /*!
442    * If given element is node returns IDs of shape from position
443    * If there is not node for given ID - returns -1
444    */
445   CORBA::Long GetShapeID(CORBA::Long id);
446
447   /*!
448    * For given element returns ID of result shape after
449    * ::FindShape() from SMESH_MeshEditor
450    * If there is not element for given ID - returns -1
451    */
452   CORBA::Long GetShapeIDForElem(CORBA::Long id);
453
454   /*!
455    * Returns number of nodes for given element
456    * If there is not element for given ID - returns -1
457    */
458   CORBA::Long GetElemNbNodes(CORBA::Long id);
459
460   /*!
461    * Returns IDs of nodes of given element
462    */
463   SMESH::long_array* GetElemNodes(CORBA::Long id);
464
465   /*!
466    * Returns ID of node by given index for given element
467    * If there is not element for given ID - returns -1
468    * If there is not node for given index - returns -2
469    */
470   CORBA::Long GetElemNode(CORBA::Long id, CORBA::Long index);
471
472   /*!
473    * Returns true if given node is medium node
474    * in given quadratic element
475    */
476   CORBA::Boolean IsMediumNode(CORBA::Long ide, CORBA::Long idn);
477
478   /*!
479    * Returns true if given node is medium node
480    * in one of quadratic elements
481    */
482   CORBA::Boolean IsMediumNodeOfAnyElem(CORBA::Long        idn,
483                                        SMESH::ElementType elemType);
484
485   /*!
486    * Returns number of edges for given element
487    */
488   CORBA::Long ElemNbEdges(CORBA::Long id);
489
490   /*!
491    * Returns number of faces for given element
492    */
493   CORBA::Long ElemNbFaces(CORBA::Long id);
494   /*!
495    * Returns nodes of given face (counted from zero) for given element.
496    */
497   SMESH::long_array* GetElemFaceNodes(CORBA::Long elemId, CORBA::Short faceIndex);
498
499   /*!
500    * Returns three components of normal of given mesh face (or an empty array in KO case)
501    */
502   SMESH::double_array* GetFaceNormal(CORBA::Long faceId, CORBA::Boolean normalized);
503
504   /*!
505    * Returns an element based on all given nodes.
506    */
507   CORBA::Long FindElementByNodes(const SMESH::long_array& nodes);
508
509   /*!
510    * Return elements including all given nodes.
511    */
512   SMESH::long_array* GetElementsByNodes(const SMESH::long_array& nodes,
513                                         SMESH::ElementType       elemType);
514
515   /*!
516    * Returns true if given element is polygon
517    */
518   CORBA::Boolean IsPoly(CORBA::Long id);
519
520   /*!
521    * Returns true if given element is quadratic
522    */
523   CORBA::Boolean IsQuadratic(CORBA::Long id);
524
525   /*!
526    * Returns diameter of ball discrete element or zero in case of an invalid \a id
527    */
528   CORBA::Double GetBallDiameter(CORBA::Long id);
529
530   /*!
531    * Returns bary center for given element
532    */
533   SMESH::double_array* BaryCenter(CORBA::Long id);
534
535   /*!
536    * Returns information about imported MED file
537    */
538   virtual SMESH::MedFileInfo* GetMEDFileInfo();
539
540   /*!
541    * Persistence of file info
542    */
543   std::string FileInfoToString();
544   void FileInfoFromString(const std::string& info);
545
546   /*!
547    * Persistence of geometry tick
548    */
549   int& MainShapeTick() { return _mainShapeTick; }
550   
551
552   /*!
553    * Sets list of notebook variables used for Mesh operations separated by ":" symbol
554    */
555   void SetParameters (const char* theParameters);
556
557   /*!
558    * Returns list of notebook variables used for Mesh operations separated by ":" symbol
559    */
560   char* GetParameters();
561
562   /*!
563    * Returns list of notebook variables used for last Mesh operation
564    */
565   SMESH::string_array* GetLastParameters();
566
567   /*!
568    * \brief Return \c true if a meshing order not yet set for a concurrent sub-mesh
569    */
570   CORBA::Boolean IsUnorderedSubMesh(CORBA::Long submeshID);
571   /*!
572    * \brief Return submesh objects list in meshing order
573    */
574   virtual SMESH::submesh_array_array* GetMeshOrder();
575   /*!
576    * \brief Set submesh object order
577    */
578   virtual ::CORBA::Boolean SetMeshOrder(const SMESH::submesh_array_array& theSubMeshArray);
579
580
581   /*!
582    * Collect statistic of mesh elements given by iterator
583    */
584   static void CollectMeshInfo(const SMDS_ElemIteratorPtr theItr,
585                               SMESH::long_array&         theInfo);
586   /*!
587    * \brief Return iterator on elements of given type in given object
588    */
589   static SMDS_ElemIteratorPtr GetElements(SMESH::SMESH_IDSource_ptr obj,
590                                           SMESH::ElementType        type);
591
592   // =========================
593   // SMESH_IDSource interface
594   // =========================
595
596   virtual SMESH::long_array* GetIDs();
597   /*!
598    * Returns number of mesh elements of each \a EntityType
599    * Result array of number of elements per \a EntityType
600    * Inherited from SMESH_IDSource
601    */
602   virtual SMESH::long_array* GetMeshInfo();
603   /*!
604    * Returns number of mesh elements of each \a ElementType
605    */
606   virtual SMESH::long_array* GetNbElementsByType();
607   /*!
608    * Returns types of elements it contains
609    */
610   virtual SMESH::array_of_ElementType* GetTypes();
611   /*!
612    * Returns self
613    */
614   virtual SMESH::SMESH_Mesh_ptr GetMesh();
615   /*!
616    * Returns false if GetMeshInfo() returns incorrect information that may
617    * happen if mesh data is not yet fully loaded from the file of study.
618    */
619   bool IsMeshInfoCorrect();
620   /*!
621    * Returns mesh unstructed grid information.
622    */
623   virtual SALOMEDS::TMPFile* GetVtkUgStream();
624
625
626   std::map<int, SMESH_subMesh_i*> _mapSubMesh_i; //NRI
627   std::map<int, ::SMESH_subMesh*> _mapSubMesh;   //NRI
628
629 private:
630   std::string prepareMeshNameAndGroups( const char* file, CORBA::Boolean overwrite );
631
632   /*!
633    * Check and correct names of mesh groups
634    */
635   void checkGroupNames();
636
637   /*
638    * Write GEOM fields to MED file
639    */
640   void exportMEDFields( DriverMED_W_Field &       writer,
641                         SMESHDS_Mesh*             meshDS,
642                         const GEOM::ListOfFields& fields,
643                         const char*               geomAssocFields);
644   /*!
645    * Convert submesh ids into submesh interfaces
646    */
647   void convertMeshOrder(const TListOfListOfInt&     theIdsOrder,
648                         SMESH::submesh_array_array& theSubMeshOrder,
649                         const bool                  theIsDump);
650
651   /*!
652    * \brief Finds concurrent sub-meshes
653    */
654   TListOfListOfInt findConcurrentSubMeshes();
655
656  private:
657
658   static int    _idGenerator;
659   ::SMESH_Mesh* _impl;        // :: force no namespace here
660   SMESH_Gen_i*  _gen_i;
661   int           _id;          // id given by creator (unique within the creator instance)
662   int           _nbInvalidHypos;
663   std::map<int, SMESH::SMESH_subMesh_ptr>    _mapSubMeshIor;
664   std::map<int, SMESH::SMESH_GroupBase_ptr>  _mapGroups;
665   std::map<int, SMESH::SMESH_Hypothesis_ptr> _mapHypo;
666   SMESH_MeshEditor_i*    _editor;
667   SMESH_MeshEditor_i*    _previewEditor;
668   SMESH::MedFileInfo_var _medFileInfo;
669   SMESH_PreMeshInfo*     _preMeshInfo; // mesh info before full loading from study file
670
671   SMESH_PreMeshInfo* & changePreMeshInfo() { return _preMeshInfo; }
672   friend class SMESH_PreMeshInfo;
673
674 private:
675
676   // Data used to track changes of GEOM groups
677   struct TGeomGroupData {
678     // keep study entry but not ior because GEOM_Object actually changes if
679     // number of items in a group varies (1) <-> (>1)
680     std::string       _groupEntry;
681     std::set<int>     _indices; // indices of group items within group's main shape
682     CORBA::Object_var _smeshObject; // SMESH object depending on GEOM group
683   };
684   std::list<TGeomGroupData> _geomGroupData;
685   int                       _mainShapeTick; // to track modifications of the meshed shape
686
687   /*!
688    * Remember GEOM group data
689    */
690   void addGeomGroupData(GEOM::GEOM_Object_ptr theGeomObj,
691                         CORBA::Object_ptr     theSmeshObj);
692   /*!
693    * Remove GEOM group data relating to removed smesh object
694    */
695   void removeGeomGroupData(CORBA::Object_ptr theSmeshObj);
696   /*!
697    * Return new group contents if it has been changed and update group data
698    */
699   TopoDS_Shape newGroupShape( TGeomGroupData & groupData, int how );
700
701 };
702
703 #endif