]> SALOME platform Git repositories - modules/med.git/blob - src/MEDWrapper/Base/MED_Wrapper.hxx
Salome HOME
update after merging trhe branches CEA_V3_0_x, OCC_V3_1_0_a1_x, and the main
[modules/med.git] / src / MEDWrapper / Base / MED_Wrapper.hxx
1 //  
2 //
3 //  Copyright (C) 2003  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. 
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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 //
24 //  File   : 
25 //  Author : 
26 //  Module : 
27 //  $Header$
28
29 #ifndef MED_Wrapper_HeaderFile
30 #define MED_Wrapper_HeaderFile
31
32 #include "MED_Structures.hxx"
33
34 namespace MED{
35
36   struct TWrapper{
37     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
38     virtual 
39     PMeshInfo 
40     CrMeshInfo(TInt theDim = 0,
41                const std::string& theValue = "",
42                EMaillage theType = eNON_STRUCTURE,
43                const std::string& theDesc = "") = 0;
44
45     virtual 
46     PMeshInfo 
47     CrMeshInfo(const PMeshInfo& theInfo) = 0;
48
49     virtual 
50     TInt 
51     GetNbMeshes(TErr* theErr = NULL) = 0;
52     
53     virtual 
54     void 
55     GetMeshInfo(TInt theMeshId, TMeshInfo&,
56                 TErr* theErr = NULL) = 0;
57
58     virtual 
59     void
60     SetMeshInfo(const TMeshInfo& theInfo,
61                 TErr* theErr = NULL) = 0;
62     
63     virtual 
64     PMeshInfo
65     GetPMeshInfo(TInt theId,
66                  TErr* theErr = NULL);
67
68
69     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70     virtual 
71     TInt
72     GetNbFamilies(const TMeshInfo& theMeshInfo,
73                   TErr* theErr = NULL) = 0;
74
75     virtual 
76     TInt
77     GetNbFamAttr(TInt theFamId, 
78                  const TMeshInfo& theInfo,
79                  TErr* theErr = NULL) = 0;
80     
81     virtual
82     TInt
83     GetNbFamGroup(TInt theFamId, 
84                   const TMeshInfo& theInfo,
85                   TErr* theErr = NULL) = 0;
86     
87     virtual
88     void
89     GetFamilyInfo(TInt theFamId, 
90                   TFamilyInfo& theInfo,
91                   TErr* theErr = NULL) = 0;
92     
93     virtual
94     void
95     SetFamilyInfo(const TFamilyInfo& theInfo,
96                   TErr* theErr = NULL) = 0;
97     
98     virtual 
99     PFamilyInfo
100     CrFamilyInfo(const PMeshInfo& theMeshInfo,
101                  TInt theNbGroup = 0, 
102                  TInt theNbAttr = 0,
103                  TInt theId = 0,
104                  const std::string& theValue = "") = 0;
105     
106     virtual 
107     PFamilyInfo
108     CrFamilyInfo(const PMeshInfo& theMeshInfo,
109                  const std::string& theValue,
110                  TInt theId,
111                  const TStringSet& theGroupNames, 
112                  const TStringVector& theAttrDescs = TStringVector(), 
113                  const TIntVector& theAttrIds = TIntVector(), 
114                  const TIntVector& theAttrVals = TIntVector()) = 0;
115     
116     virtual
117     PFamilyInfo
118     CrFamilyInfo(const PMeshInfo& theMeshInfo,
119                  const PFamilyInfo& theInfo) = 0;
120     
121     PFamilyInfo
122     GetPFamilyInfo(const PMeshInfo& theMeshInfo, 
123                    TInt theId,
124                    TErr* theErr = NULL);
125     
126     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
127     virtual
128     void
129     GetNames(TElemInfo& theInfo,
130              TInt nb,
131              EEntiteMaillage theTEntity, 
132              EGeometrieElement theTGeom,
133              TErr* theErr = NULL)
134     {}
135
136     virtual
137     void
138     GetNumeration(TElemInfo& theInfo,
139                   TInt nb,
140                   EEntiteMaillage theTEntity, 
141                   EGeometrieElement theTGeom,
142                   TErr* theErr = NULL)
143     {}
144
145     virtual
146     void
147     GetFamilies(TElemInfo& theInfo,
148                 TInt nb,
149                 EEntiteMaillage theTEntity, 
150                 EGeometrieElement theTGeom,
151                 TErr* theErr = NULL)
152     {}
153
154     virtual
155     void
156     SetNames(const TElemInfo& theInfo,
157              EEntiteMaillage theTEntity, 
158              EGeometrieElement theTGeom,
159              TErr* theErr = NULL)
160     {}
161
162     virtual
163     void
164     SetNumeration(const TElemInfo& theInfo,
165                   EEntiteMaillage theTEntity, 
166                   EGeometrieElement theTGeom,
167                   TErr* theErr = NULL)
168     {}
169
170     virtual
171     void
172     SetFamilies(const TElemInfo& theInfo,
173                 EEntiteMaillage theTEntity, 
174                 EGeometrieElement theTGeom,
175                 TErr* theErr = NULL)
176     {}
177
178     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
179     virtual
180     TInt
181     GetNbNodes(const TMeshInfo& theMeshInfo,
182                TErr* theErr = NULL) = 0;
183     
184     virtual
185     void
186     GetNodeInfo(TNodeInfo& theInfo,
187                 TErr* theErr = NULL) = 0;
188
189     virtual 
190     void
191     SetNodeInfo(const TNodeInfo& theInfo,
192                 TErr* theErr = NULL) = 0;
193     
194     virtual 
195     PNodeInfo
196     CrNodeInfo(const PMeshInfo& theMeshInfo, 
197                TInt theNbElem,
198                ERepere theSystem = eCART, 
199                EBooleen theIsElemNum = eVRAI,
200                EBooleen theIsElemNames = eVRAI) = 0;
201
202     virtual 
203     PNodeInfo
204     CrNodeInfo(const PMeshInfo& theMeshInfo, 
205                ERepere theSystem, 
206                const TFloatVector& theNodeCoords,
207                const TStringVector& theCoordNames,
208                const TStringVector& theCoordUnits,
209                const TIntVector& theFamilyNums,
210                const TIntVector& theElemNums,
211                const TStringVector& theElemNames = TStringVector()) = 0;
212     
213     virtual
214     PNodeInfo
215     CrNodeInfo(const PMeshInfo& theMeshInfo,
216                const PNodeInfo& theInfo) = 0;
217     
218     PNodeInfo
219     GetPNodeInfo(const PMeshInfo& theMeshInfo,
220                  TErr* theErr = NULL);
221     
222     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
223     virtual
224     void
225     GetPolygoneInfo(TPolygoneInfo& theInfo,
226                     TErr* theErr = NULL) 
227     {}
228
229     virtual
230     void
231     SetPolygoneInfo(const TPolygoneInfo& theInfo,
232                     TErr* theErr = NULL) 
233     {}
234
235     virtual
236     TInt
237     GetNbPolygones(const TMeshInfo& theMeshInfo,
238                    EEntiteMaillage,
239                    EGeometrieElement,
240                    EConnectivite,
241                    TErr* theErr = NULL) 
242     { return 0;}
243
244     virtual
245     TInt
246     GetNbPolygoneConn(const TMeshInfo& theMeshInfo,
247                       EEntiteMaillage,
248                       EGeometrieElement,
249                       EConnectivite,
250                       TErr* theErr = NULL)
251     { return 0;}
252     
253     virtual 
254     PPolygoneInfo
255     CrPolygoneInfo(const PMeshInfo& theMeshInfo, 
256                    TInt theNbElem,
257                    TInt theNbConn,
258                    EEntiteMaillage theTEntity, 
259                    EGeometrieElement theTGeom,
260                    EConnectivite theTConn = eNOD,
261                    EBooleen theIsElemNum = eVRAI,
262                    EBooleen theIsElemNames = eVRAI)
263     {
264       return PPolygoneInfo();
265     }
266     
267     virtual
268     PPolygoneInfo 
269     CrPolygoneInfo(const PMeshInfo& theMeshInfo, 
270                    EEntiteMaillage theTEntity, 
271                    EGeometrieElement theTGeom,
272                    EConnectivite theTConn,
273                    const TIntVector& theConnectivities,
274                    const TIntVector& theIndexes,
275                    const TIntVector& theFamilyNums,
276                    const TIntVector& theElemNums,
277                    const TStringVector& theElemNames = TStringVector())
278     {
279       return PPolygoneInfo();
280     }
281
282     virtual
283     PPolygoneInfo
284     CrPolygoneInfo(const PMeshInfo& theMeshInfo,
285                    const PPolygoneInfo& theInfo)
286     {
287       return PPolygoneInfo();
288     }
289     
290     PPolygoneInfo
291     GetPPolygoneInfo(const PMeshInfo& theMeshInfo,
292                      EEntiteMaillage theEntity, 
293                      EGeometrieElement theGeom, 
294                      EConnectivite theConn = eNOD);
295     
296     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
297     virtual 
298     void
299     GetPolyedreInfo(TPolyedreInfo& theInfo,
300                     TErr* theErr = NULL) 
301     {}
302
303     virtual
304     void
305     SetPolyedreInfo(const TPolyedreInfo& theInfo,
306                     TErr* theErr = NULL)
307     {}
308     
309     virtual
310     TInt
311     GetNbPolyedres(const TMeshInfo& theMeshInfo,
312                    EEntiteMaillage,
313                    EGeometrieElement,
314                                 EConnectivite,
315                    TErr* theErr = NULL)
316     { return 0;}
317
318     virtual 
319     void
320     GetNbPolyedreConnF(const TMeshInfo& theMeshInfo,
321                        EConnectivite theConn,
322                        TInt& nf,
323                        TInt& nc,
324                        TErr* theErr = NULL)
325     {}
326     
327     virtual
328     PPolyedreInfo
329     CrPolyedreInfo(const PMeshInfo& theMeshInfo, 
330                    TInt theNbElem,
331                    TInt theNbConn,
332                    TInt theNbFaces,
333                    EEntiteMaillage theTEntity, 
334                    EGeometrieElement theTGeom,
335                    EConnectivite theTConn = eNOD,
336                    EBooleen theIsElemNum = eVRAI,
337                    EBooleen theIsElemNames = eVRAI)
338     {
339       return PPolyedreInfo();
340     }
341     
342     virtual
343     PPolyedreInfo
344     CrPolyedreInfo(const PMeshInfo& theMeshInfo, 
345                    EEntiteMaillage theTEntity, 
346                    EGeometrieElement theTGeom,
347                    EConnectivite theTConn,
348                    const TIntVector& theConnectivities,
349                    const TIntVector& theFaces,
350                    const TIntVector& theIndexes,
351                    const TIntVector& theFamilyNums,
352                    const TIntVector& theElemNums,
353                    const TStringVector& theElemNames = TStringVector())
354     {
355       return PPolyedreInfo();
356     }
357
358     virtual
359     PPolyedreInfo
360     CrPolyedreInfo(const PMeshInfo& theMeshInfo,
361                    const PPolyedreInfo& theInfo)
362     {
363       return PPolyedreInfo();
364     }
365     
366     PPolyedreInfo
367     GetPPolyedreInfo(const PMeshInfo& theMeshInfo,
368                      EEntiteMaillage theEntity, 
369                      EGeometrieElement theGeom, 
370                      EConnectivite theConn = eNOD);
371     
372     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
373     virtual
374     TEntityInfo
375     GetEntityInfo(const TMeshInfo& theMeshInfo,
376                   EConnectivite theTConn = eNOD,
377                   TErr* theErr = NULL) = 0;
378     
379     virtual
380     TInt
381     GetNbCells(const TMeshInfo& theMeshInfo, 
382                EEntiteMaillage, 
383                EGeometrieElement, 
384                EConnectivite theTConn = eNOD,
385                TErr* theErr = NULL) = 0;
386     
387     virtual
388     void
389     GetCellInfo(TCellInfo& theInfo,
390                 TErr* theErr = NULL) = 0;
391     
392     virtual 
393     void
394     SetCellInfo(const TCellInfo& theInfo,
395                 TErr* theErr = NULL) = 0;
396     
397     virtual
398     PCellInfo
399     CrCellInfo(const PMeshInfo& theMeshInfo, 
400                TInt theNbElem,
401                EEntiteMaillage theTEntity, 
402                EGeometrieElement theTGeom,
403                EConnectivite theTConn = eNOD,
404                EBooleen theIsElemNum = eVRAI,
405                EBooleen theIsElemNames = eVRAI) = 0;
406     
407     virtual
408     PCellInfo
409     CrCellInfo(const PMeshInfo& theMeshInfo, 
410                EEntiteMaillage theTEntity, 
411                EGeometrieElement theTGeom,
412                EConnectivite theTConn,
413                const TIntVector& theConnectivities,
414                const TIntVector& theFamilyNums,
415                const TIntVector& theElemNums,
416                const TStringVector& theElemNames = TStringVector()) = 0;
417     
418     virtual
419     PCellInfo
420     CrCellInfo(const PMeshInfo& theMeshInfo,
421                const PCellInfo& theInfo) = 0;
422     
423     PCellInfo
424     GetPCellInfo(const PMeshInfo& theMeshInfo,
425                  EEntiteMaillage theEntity, 
426                  EGeometrieElement theGeom, 
427                  EConnectivite theConn = eNOD,
428                  TErr* theErr = NULL);
429
430
431     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
432     virtual 
433     TInt
434     GetNbFields(TErr* theErr = NULL) = 0;
435     
436     virtual
437     TInt
438     GetNbComp(TInt theFieldId,
439               TErr* theErr = NULL) = 0;
440     
441     virtual 
442     void
443     GetFieldInfo(TInt theFieldId, 
444                  TFieldInfo& theInfo,
445                  TErr* theErr = NULL) = 0;
446
447     virtual 
448     void
449     SetFieldInfo(const TFieldInfo& theInfo,
450                  TErr* theErr = NULL) = 0;
451     
452
453     virtual 
454     PFieldInfo
455     CrFieldInfo(const PMeshInfo& theMeshInfo, 
456                 TInt theNbComp = 0,
457                 ETypeChamp theType = eFLOAT64,
458                 const std::string& theValue = "",
459                 EBooleen theIsLocal = eVRAI,
460                 TInt theNbRef = 1) = 0;
461
462     virtual 
463     PFieldInfo
464     CrFieldInfo(const PMeshInfo& theMeshInfo,
465                 const PFieldInfo& theInfo) = 0;
466     
467     PFieldInfo
468     GetPFieldInfo(const PMeshInfo& theMeshInfo, 
469                   TInt theId,
470                   TErr* theErr = NULL);
471
472
473     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
474     virtual 
475     TInt
476     GetNbTimeStamps(const TFieldInfo& theInfo, 
477                     const TEntityInfo& theEntityInfo,
478                     EEntiteMaillage& theEntity,
479                     TGeom& theGeom,
480                     TErr* theErr = NULL) = 0;
481     
482     virtual 
483     void
484     GetTimeStampInfo(TInt theTimeStampId, 
485                      TTimeStampInfo& theInfo,
486                      TErr* theErr = NULL) = 0;
487
488     virtual 
489     PTimeStampInfo
490     CrTimeStampInfo(const PFieldInfo& theFieldInfo, 
491                     EEntiteMaillage theEntity,
492                     const TGeom& theGeom,
493                     TInt theNbGauss = 0,
494                     TInt theNumDt = 0,
495                     TInt theNumOrd = 0,
496                     TFloat theDt = 0,
497                     const std::string& theUnitDt = "",
498                     const std::string& theGaussName = "") = 0;
499
500     virtual 
501     PTimeStampInfo 
502     CrTimeStampInfo(const PFieldInfo& theFieldInfo,
503                     const PTimeStampInfo& theInfo) = 0;
504     
505     PTimeStampInfo
506     GetPTimeStampInfo(const PFieldInfo& theFieldInfo,
507                       EEntiteMaillage theEntity,
508                       const MED::TGeom& theGeom,
509                       TInt theId,
510                       TErr* theErr = NULL);
511     
512
513     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
514     virtual 
515     void
516     GetTimeStampVal(TTimeStampVal& theVal,
517                     TErr* theErr = NULL) = 0;
518     
519     virtual 
520     void
521     SetTimeStamp(const TTimeStampVal& theTimeStampVal,
522                  TErr* theErr = NULL) = 0;
523     
524     virtual
525     PTimeStampVal
526     CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo,
527                    const std::string& thePflName = "",
528                    EModeProfil thePflMode = eCOMPACT) = 0;
529
530     virtual 
531     PTimeStampVal
532     CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo,
533                    const PTimeStampVal& theInfo) = 0;
534     
535     PTimeStampVal
536     GetPTimeStampVal(const PTimeStampInfo& theTimeStampInfo,
537                      TErr* theErr = NULL);
538
539   };
540
541 }
542
543 #endif