]> SALOME platform Git repositories - modules/med.git/blob - src/MEDWrapper/Base/MED_TWrapper.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_TWrapper.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_TWrapper_HeaderFile
30 #define MED_TWrapper_HeaderFile
31
32 #include "MED_TStructures.hxx"
33 #include "MED_Wrapper.hxx"
34
35 namespace MED{
36
37   template<TInt nPNOM, TInt nDESC, TInt nIDENT, TInt nNOM, TInt nLNOM, EVersion nV>
38   class TTWrapper: public TWrapper{
39   public:
40     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41     virtual 
42     PMeshInfo
43     CrMeshInfo(TInt theDim = 0,
44                const std::string& theValue = "",
45                EMaillage theType = eNON_STRUCTURE,
46                const std::string& theDesc = "")
47     {
48       return PMeshInfo(new TTMeshInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
49                        (theDim,
50                         theValue,
51                         theType,
52                         theDesc));
53     }
54
55     virtual 
56     PMeshInfo
57     CrMeshInfo(const PMeshInfo& theInfo)
58     {
59       return PMeshInfo(new TTMeshInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>(theInfo));
60     }
61     
62
63     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
64     virtual
65     PFamilyInfo
66     CrFamilyInfo(const PMeshInfo& theMeshInfo,
67                  TInt theNbGroup = 0, 
68                  TInt theNbAttr = 0,
69                  TInt theId = 0,
70                  const std::string& theValue = "")
71     {
72       return PFamilyInfo(new TTFamilyInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
73                          (theMeshInfo,
74                           theNbGroup,
75                           theNbAttr,
76                           theId,
77                           theValue));
78     }
79
80     virtual
81     PFamilyInfo
82     CrFamilyInfo(const PMeshInfo& theMeshInfo,
83                  const std::string& theValue,
84                  TInt theId,
85                  const MED::TStringSet& theGroupNames, 
86                  const MED::TStringVector& theAttrDescs = MED::TStringVector(), 
87                  const MED::TIntVector& theAttrIds = MED::TIntVector(), 
88                  const MED::TIntVector& theAttrVals = MED::TIntVector())
89     {
90       return PFamilyInfo(new TTFamilyInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
91                          (theMeshInfo,
92                           theValue,
93                           theId,
94                           theGroupNames,
95                           theAttrDescs,
96                           theAttrIds,
97                           theAttrVals));
98     }
99
100     virtual
101     PFamilyInfo
102     CrFamilyInfo(const PMeshInfo& theMeshInfo,
103                  const PFamilyInfo& theInfo)
104     {
105       return PFamilyInfo(new TTFamilyInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
106                          (theMeshInfo,
107                           theInfo));
108     }
109
110
111     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
112     virtual
113     PNodeInfo
114     CrNodeInfo(const PMeshInfo& theMeshInfo, 
115                TInt theNbElem,
116                ERepere theSystem = eCART, 
117                EBooleen theIsElemNum = eVRAI,
118                EBooleen theIsElemNames = eVRAI)
119     {
120       return PNodeInfo(new TTNodeInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
121                        (theMeshInfo,
122                         theNbElem,
123                         theSystem,
124                         theIsElemNum,
125                         theIsElemNames));
126     }
127
128     virtual 
129     PNodeInfo
130     CrNodeInfo(const PMeshInfo& theMeshInfo, 
131                ERepere theSystem, 
132                const TFloatVector& theNodeCoords,
133                const TStringVector& theCoordNames,
134                const TStringVector& theCoordUnits,
135                const TIntVector& theFamilyNums,
136                const TIntVector& theElemNums,
137                const TStringVector& theElemNames = TStringVector())
138     {
139       return PNodeInfo(new TTNodeInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
140                        (theMeshInfo,
141                         theSystem,
142                         theNodeCoords,
143                         theCoordNames,
144                         theCoordUnits,
145                         theFamilyNums,
146                         theElemNums,
147                         theElemNames));
148     }
149
150     virtual 
151     PNodeInfo
152     CrNodeInfo(const PMeshInfo& theMeshInfo,
153                const PNodeInfo& theInfo)
154     {
155       return PNodeInfo(new TTNodeInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
156                        (theMeshInfo,
157                         theInfo));
158     }
159     
160     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
161     virtual
162     PPolygoneInfo
163     CrPolygoneInfo(const PMeshInfo& theMeshInfo, 
164                    TInt theNbElem,
165                    TInt theNbConn,
166                    EEntiteMaillage theTEntity, 
167                    EGeometrieElement theTGeom,
168                    EConnectivite theTConn = eNOD,
169                    EBooleen theIsElemNum = eVRAI,
170                    EBooleen theIsElemNames = eVRAI)
171     {
172       return PPolygoneInfo(new TTPolygoneInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
173                            (theMeshInfo,
174                             theNbElem,
175                             theNbConn,
176                             theTEntity,
177                             theTGeom,
178                             theTConn,
179                             theIsElemNum,
180                             theIsElemNames));
181     }
182
183     virtual
184     PPolygoneInfo
185     CrPolygoneInfo(const PMeshInfo& theMeshInfo, 
186                    EEntiteMaillage theTEntity, 
187                    EGeometrieElement theTGeom,
188                    EConnectivite theTConn,
189                    const TIntVector& theConnectivities,
190                    const TIntVector& theIndexes,
191                    const TIntVector& theFamilyNums,
192                    const TIntVector& theElemNums,
193                    const TStringVector& theElemNames = TStringVector())
194     {
195       return PPolygoneInfo(new TTPolygoneInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
196                            (theMeshInfo,
197                             theTEntity,
198                             theTGeom,
199                             theTConn,
200                             theConnectivities,
201                             theIndexes,
202                             theFamilyNums,
203                             theElemNums,
204                             theElemNames));
205     }
206
207     virtual
208     PPolygoneInfo
209     CrPolygoneInfo(const PMeshInfo& theMeshInfo,
210                    const PPolygoneInfo& theInfo)
211     {
212       return PPolygoneInfo(new TTPolygoneInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
213                            (theMeshInfo,
214                             theInfo));
215     }
216     
217     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
218     virtual
219     PPolyedreInfo
220     CrPolyedreInfo(const PMeshInfo& theMeshInfo, 
221                    TInt theNbElem,
222                    TInt theNbConn,
223                    TInt theNbFaces,
224                    EEntiteMaillage theTEntity, 
225                    EGeometrieElement theTGeom,
226                    EConnectivite theTConn = eNOD,
227                    EBooleen theIsElemNum = eVRAI,
228                    EBooleen theIsElemNames = eVRAI)
229     {
230       return PPolyedreInfo(new TTPolyedreInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
231                            (theMeshInfo,
232                             theNbElem,
233                             theNbConn,
234                             theNbFaces,
235                             theTEntity,
236                             theTGeom,
237                             theTConn,
238                             theIsElemNum,
239                             theIsElemNames));
240     }
241
242     virtual
243     PPolyedreInfo
244     CrPolyedreInfo(const PMeshInfo& theMeshInfo, 
245                    EEntiteMaillage theTEntity, 
246                    EGeometrieElement theTGeom,
247                    EConnectivite theTConn,
248                    const TIntVector& theConnectivities,
249                    const TIntVector& theFacesIndexes,
250                    const TIntVector& theIndexes,
251                    const TIntVector& theFamilyNums,
252                    const TIntVector& theElemNums,
253                    const TStringVector& theElemNames = TStringVector())
254     {
255       return PPolyedreInfo(new TTPolyedreInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
256                            (theMeshInfo,
257                             theTEntity,
258                             theTGeom,
259                             theTConn,
260                             theConnectivities,
261                             theFacesIndexes,
262                             theIndexes,
263                             theFamilyNums,
264                             theElemNums,
265                             theElemNames));
266     }
267
268     virtual
269     PPolyedreInfo
270     CrPolyedreInfo(const PMeshInfo& theMeshInfo,
271                    const PPolyedreInfo& theInfo)
272     {
273       return PPolyedreInfo(new TTPolyedreInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
274                            (theMeshInfo,
275                             theInfo));
276     }
277
278     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
279     virtual
280     PCellInfo
281     CrCellInfo(const PMeshInfo& theMeshInfo, 
282                TInt theNbElem,
283                EEntiteMaillage theTEntity, 
284                EGeometrieElement theTGeom,
285                EConnectivite theTConn = eNOD,
286                EBooleen theIsElemNum = eVRAI,
287                EBooleen theIsElemNames = eVRAI)
288     {
289       return PCellInfo(new TTCellInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
290                        (theMeshInfo,
291                         theNbElem,
292                         theTEntity,
293                         theTGeom,
294                         theTConn,
295                         theIsElemNum,
296                         theIsElemNames));
297     }
298
299     virtual
300     PCellInfo
301     CrCellInfo(const PMeshInfo& theMeshInfo, 
302                EEntiteMaillage theTEntity, 
303                EGeometrieElement theTGeom,
304                EConnectivite theTConn,
305                const TIntVector& theConnectivities,
306                const TIntVector& theFamilyNums,
307                const TIntVector& theElemNums,
308                const TStringVector& theElemNames = TStringVector())
309     {
310       return PCellInfo(new TTCellInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
311                        (theMeshInfo,
312                         theTEntity,
313                         theTGeom,
314                         theTConn,
315                         theConnectivities,
316                         theFamilyNums,
317                         theElemNums,
318                         theElemNames));
319     }
320
321     virtual
322     PCellInfo
323     CrCellInfo(const PMeshInfo& theMeshInfo,
324                const PCellInfo& theInfo)
325     {
326       return PCellInfo(new TTCellInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
327                        (theMeshInfo,
328                         theInfo));
329     }
330     
331
332     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
333     virtual
334     PFieldInfo
335     CrFieldInfo(const PMeshInfo& theMeshInfo, 
336                 TInt theNbComp = 0,
337                 ETypeChamp theType = eFLOAT64,
338                 const std::string& theValue = "",
339                 EBooleen theIsLocal = eVRAI,
340                 TInt theNbRef = 1)
341     {
342       return PFieldInfo(new TTFieldInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
343                         (theMeshInfo,
344                          theNbComp,
345                          theType,
346                          theValue,
347                          theIsLocal,
348                          theNbRef));
349     }
350
351     virtual
352     PFieldInfo
353     CrFieldInfo(const PMeshInfo& theMeshInfo,
354                 const PFieldInfo& theInfo)
355     {
356       return PFieldInfo(new TTFieldInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
357                         (theMeshInfo,
358                          theInfo));
359     }
360     
361
362     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
363     virtual
364     PTimeStampInfo
365     CrTimeStampInfo(const PFieldInfo& theFieldInfo, 
366                     EEntiteMaillage theEntity,
367                     const TGeom& theGeom,
368                     TInt theNbGauss = 0,
369                     TInt theNumDt = 0,
370                     TInt theNumOrd = 0,
371                     TFloat theDt = 0,
372                     const std::string& theUnitDt = "",
373                     const std::string& theGaussName = "")
374     {
375       return PTimeStampInfo(new TTTimeStampInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
376                             (theFieldInfo,
377                              theEntity,
378                              theGeom,
379                              theNbGauss,
380                              theNumDt,
381                              theNumOrd,
382                              theDt,
383                              theUnitDt,
384                              theGaussName));
385     }
386
387     virtual
388     PTimeStampInfo
389     CrTimeStampInfo(const PFieldInfo& theFieldInfo,
390                     const PTimeStampInfo& theInfo)
391     {
392       return PTimeStampInfo(new TTTimeStampInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
393                             (theFieldInfo,
394                              theInfo));
395     }
396     
397
398     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
399     virtual
400     PTimeStampVal
401     CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo,
402                    const std::string& thePflName = "",
403                    EModeProfil thePflMode = eCOMPACT)
404     {
405       return PTimeStampVal(new TTTimeStampVal<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
406                            (theTimeStampInfo,
407                             thePflName,
408                             thePflMode));
409     }
410
411     virtual
412     PTimeStampVal
413     CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo,
414                    const PTimeStampVal& theInfo)
415     {
416       return PTimeStampVal(new TTTimeStampVal<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
417                            (theTimeStampInfo,
418                             theInfo));
419     }
420     
421   };
422
423 }
424
425
426 #endif