]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
[Bug PAL7784] REGR: wrong Export-Import Mesh in med
authorapo <apo@opencascade.com>
Mon, 24 Jan 2005 12:58:07 +0000 (12:58 +0000)
committerapo <apo@opencascade.com>
Mon, 24 Jan 2005 12:58:07 +0000 (12:58 +0000)
12 files changed:
src/MEDWrapper/Base/MED_Algorithm.cxx
src/MEDWrapper/Base/MED_Common.hxx
src/MEDWrapper/Base/MED_Structures.cxx
src/MEDWrapper/Base/MED_Structures.hxx
src/MEDWrapper/Base/MED_TStructures.hxx
src/MEDWrapper/Base/MED_TWrapper.hxx
src/MEDWrapper/Base/MED_Wrapper.cxx
src/MEDWrapper/Base/MED_Wrapper.hxx
src/MEDWrapper/Factory/MED_Factory.hxx
src/MEDWrapper/Factory/MED_Test.cxx
src/MEDWrapper/V2_1/MED_V2_1_Wrapper.hxx
src/MEDWrapper/V2_2/MED_V2_2_Wrapper.hxx

index 2c0e4dc2af0f27c357439a8fe384fd61c529deea..fb9e24fa33805624f202e97ae544d39d4200c3a9 100644 (file)
@@ -83,18 +83,6 @@ namespace MED{
          {
            PCellInfo aCellInfo = theWrapper.GetPCellInfo(theMeshInfo,anEntity,aGeo);
            aElemSet.insert(aCellInfo);
-           if(MYDEBUG){
-             TInt aNbElem = aCellInfo->GetNbElem();
-             INITMSG(MYDEBUG,"aGeo = "<<aGeo<<"; aNbElem = "<<aNbElem<<": ");
-             for(TInt iElem = 0; iElem < aNbElem; iElem++){
-               TInt iConnEnd = aCellInfo->GetConnDim();
-               for(TInt iConn = 0; iConn < iConnEnd; iConn++){
-                 ADDMSG(MYVALUEDEBUG,aCellInfo->GetConn(iElem,iConn)<<",");
-               }
-               ADDMSG(MYVALUEDEBUG," ");
-             }
-             ADDMSG(MYDEBUG,"\n");
-           }
          }
        }
       }
@@ -110,24 +98,14 @@ namespace MED{
              const PMeshInfo& theMeshInfo)
   {
     MSG(MYDEBUG,"GetFamilies(...)");
+    TErr anErr;
     TFamilyGroup aGroup;
     TInt aNbFam = theWrapper.GetNbFamilies(*theMeshInfo);
     INITMSG(MYDEBUG,"GetNbFamilies() = "<<aNbFam<<"\n");
     for(TInt iFam = 1; iFam <= aNbFam; iFam++){
-      PFamilyInfo aFamilyInfo = theWrapper.GetPFamilyInfo(theMeshInfo,iFam);
-      aGroup.insert(aFamilyInfo);
-      if(MYDEBUG){
-       string aName = aFamilyInfo->GetName();
-       TInt aNbAttr = aFamilyInfo->GetNbAttr();
-       TInt aNbGroup = aFamilyInfo->GetNbGroup();
-       INITMSG(MYDEBUG,
-               "aFamilyName = '"<<aName<<"'; andId = "<<aFamilyInfo->GetId()<<
-               "; aNbAttr = "<<aNbAttr<<"; aNbGroup = "<<aNbGroup<<"\n");
-       for(TInt iGroup = 0; iGroup < aNbGroup; iGroup++){
-         aName = aFamilyInfo->GetGroupName(iGroup);
-         INITMSG(MYDEBUG,"aGroupName = '"<<aName<<"'\n");
-       }
-      }
+      PFamilyInfo aFamilyInfo = theWrapper.GetPFamilyInfo(theMeshInfo,iFam,&anErr);
+      if(anErr >= 0)
+       aGroup.insert(aFamilyInfo);
     }
     ADDMSG(MYDEBUG,"\n");
     return aGroup;
@@ -147,6 +125,8 @@ namespace MED{
        aGroup[aFamilyInfo->GetGroupName(iGroup)].insert(aFamilyInfo);
       } 
     }
+
+#ifdef _DEBUG_
     if(MYDEBUG){
       TGroupInfo::const_iterator anIter = aGroup.begin();
       for(; anIter != aGroup.end(); anIter++){
@@ -161,6 +141,8 @@ namespace MED{
       }
       ADDMSG(MYDEBUG,"\n");
     }
+#endif
+
     return aGroup;
   }
 
index 9435a2dc88037f5677a215c2e1c352f12937e78d..5cac8fbd1650ccb8422caca31b1d92fb5729a622 100644 (file)
@@ -97,14 +97,21 @@ namespace MED{
 
   const TEntity2GeomSet& GetEntity2GeomSet();
 
-  inline TInt GetNbConn(EEntiteMaillage theEntity, 
-                       EGeometrieElement theElem,
-                       TInt theMeshDim)
-  {
-    TInt anElemDim = theElem / 100, nsup = 0;
-    if(theEntity == eMAILLE && anElemDim < theMeshDim) nsup = 1;
-    return nsup + theElem % 100;
-  }
+  enum EVersion {eVUnknown = -1, eV2_1, eV2_2};
+  
+  TInt GetNbConnectivities(EGeometrieElement typmai);
+
+  template<int EVersion>
+  TInt GetNbConn(EGeometrieElement typmai,
+                TInt mdim);
+  
+  template<>
+  TInt GetNbConn<eV2_1>(EGeometrieElement typmai,
+                       TInt mdim);
+
+  template<>
+  TInt GetNbConn<eV2_2>(EGeometrieElement typmai,
+                       TInt mdim);
 
   struct TNameInfo;
   typedef MED::shared_ptr<TNameInfo> PNameInfo;
index 7ba5c359c8e54b087dc4f1d739e3b7eb983bc785..3ec5eece456b553ab04f07c4c730406e343f1ae7 100644 (file)
@@ -22,6 +22,60 @@ using namespace MED;
 #define GETINDEX(anArray,ind) anArray.at(ind)
 #endif
 
+namespace MED{
+
+  TInt GetNbConnectivities(EGeometrieElement typmai)
+  {
+    TInt taille = typmai%100;
+    return taille;
+  }
+
+  template<>
+  TInt GetNbConn<eV2_1>(EGeometrieElement typmai,
+                       TInt mdim)
+  {
+    TInt edim = typmai / 100;
+    TInt nsup = 0;
+
+    if (mdim  == 2 || mdim == 3)
+      if (edim == 1)
+       nsup = 1;
+    
+    if (mdim == 3)
+      if (edim == 2)
+       nsup = 1;
+    
+    TInt taille = nsup+typmai%100;
+    return taille;
+  }
+
+  template<>
+  TInt GetNbConn<eV2_2>(EGeometrieElement typmai,
+                       TInt mdim)
+  {
+    TInt taille = typmai%100;
+    return taille;
+  }
+
+  std::string GetString(TInt theId, TInt theStep, 
+                       const TString& theString)
+  {
+    const char* aPos = &GETINDEX(theString,theId*theStep);
+    TInt aSize = std::min(TInt(strlen(aPos)),theStep);
+    return std::string(aPos,aSize);
+  }
+
+  void SetString(TInt theId, TInt theStep, 
+                TString& theString, 
+                const std::string& theValue)
+  {
+    TInt aSize = std::min(TInt(theValue.size()+1),theStep);
+    char* aPos = &GETINDEX(theString,theId*theStep);
+    strncpy(aPos,theValue.c_str(),aSize);
+  }
+
+}
+
 //---------------------------------------------------------------
 TInt TFamilyInfo::GetAttrId(TInt theId) const {
   return GETINDEX(myAttrId,theId);
@@ -63,11 +117,11 @@ void TNodeInfo::SetNodeCoord(TInt theId,TInt theComp,TFloat theVal) {
 
 //---------------------------------------------------------------
 TInt TCellInfo::GetConn(TInt theElemId, TInt theConnId) const {
-  return GETINDEX(myConn,myConnDim*theElemId + theConnId);
+  return GETINDEX(myConn,GetConnDim()*theElemId + theConnId);
 }
 
 void TCellInfo::SetConn(TInt theElemId, TInt theConnId, TInt theVal){
-  GETINDEX(myConn,myConnDim*theElemId + theConnId) = theVal;
+  GETINDEX(myConn,GetConnDim()*theElemId + theConnId) = theVal;
 }
 //---------------------------------------------------------------
 TInt TPolygoneInfo::GetNbConn(TInt theElemId) const {
index 5dad42751bc765a9c4a60a2b8cba68941abafa54..888c3aeb103c0ffa1adc2c302abcae169cd59809 100644 (file)
@@ -36,22 +36,12 @@ namespace MED{
   //---------------------------------------------------------------
   typedef std::vector<char> TString;
 
-  inline std::string GetString(TInt theId, TInt theStep, 
-                              const TString& theString)
-  {
-    const char* aPos = &theString[theId*theStep];
-    TInt aSize = std::min(TInt(strlen(aPos)),theStep);
-    return std::string(aPos,aSize);
-  }
-
-  inline void SetString(TInt theId, TInt theStep, 
-                       TString& theString, 
-                       const std::string& theValue)
-  {
-    TInt aSize = std::min(TInt(theValue.size()+1),theStep);
-    strncpy(&theString[theId*theStep],theValue.c_str(),aSize);
-  }
+  std::string GetString(TInt theId, TInt theStep, 
+                       const TString& theString);
 
+  void SetString(TInt theId, TInt theStep, 
+                TString& theString, 
+                const std::string& theValue);
 
   //---------------------------------------------------------------
   struct TBase
@@ -186,8 +176,7 @@ namespace MED{
     EConnectivite myTConn;
     EConnectivite GetConn() const { return myTConn;}
 
-    TInt myConnDim;
-    TInt GetConnDim() const { return myConnDim;}
+    virtual TInt GetConnDim() const = 0;
 
     TElemNum myConn;
     TInt GetConn(TInt theElemId, TInt theConnId) const;
index 674c5518ac2c81160ac290e09ea91da9c0c702d5..15319fe7e72c105332ab4269c4fa656654d05766 100644 (file)
@@ -39,7 +39,7 @@ namespace MED{
   const TInt LNOM = 80;
 
   //---------------------------------------------------------------
-  template<TInt nPNOM, TInt nDESC, TInt nIDENT, TInt nNOM, TInt nLNOM>
+  template<TInt nPNOM, TInt nDESC, TInt nIDENT, TInt nNOM, TInt nLNOM, EVersion nV>
   struct TTNameInfo: virtual TNameInfo
   {
     TTNameInfo(const std::string& theValue = "")
@@ -59,10 +59,10 @@ namespace MED{
 
 
   //---------------------------------------------------------------
-  template<TInt nPNOM, TInt nDESC, TInt nIDENT, TInt nNOM, TInt nLNOM>
-  struct TTMeshInfo: TMeshInfo, TTNameInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+  template<TInt nPNOM, TInt nDESC, TInt nIDENT, TInt nNOM, TInt nLNOM, EVersion nV>
+  struct TTMeshInfo: TMeshInfo, TTNameInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
   {
-    typedef TTNameInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM> TNameInfoBase;
+    typedef TTNameInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV> TNameInfoBase;
 
     TTMeshInfo(const PMeshInfo& theInfo):
       TNameInfoBase(theInfo->GetName())
@@ -98,10 +98,10 @@ namespace MED{
 
 
   //---------------------------------------------------------------
-  template<TInt nPNOM, TInt nDESC, TInt nIDENT, TInt nNOM, TInt nLNOM>
-  struct TTFamilyInfo: TFamilyInfo, TTNameInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+  template<TInt nPNOM, TInt nDESC, TInt nIDENT, TInt nNOM, TInt nLNOM, EVersion nV>
+  struct TTFamilyInfo: TFamilyInfo, TTNameInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
   {
-    typedef TTNameInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM> TNameInfoBase;
+    typedef TTNameInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV> TNameInfoBase;
 
     TTFamilyInfo(const PMeshInfo& theMeshInfo, const PFamilyInfo& theInfo):
       TNameInfoBase(theInfo->GetName())
@@ -206,7 +206,7 @@ namespace MED{
 
 
   //---------------------------------------------------------------
-  template<TInt nPNOM, TInt nDESC, TInt nIDENT, TInt nNOM, TInt nLNOM>
+  template<TInt nPNOM, TInt nDESC, TInt nIDENT, TInt nNOM, TInt nLNOM, EVersion nV>
   struct TTElemInfo: virtual TElemInfo
   {
     TTElemInfo(const PMeshInfo& theMeshInfo, const PElemInfo& theInfo)
@@ -301,10 +301,10 @@ namespace MED{
 
 
   //---------------------------------------------------------------
-  template<TInt nPNOM, TInt nDESC, TInt nIDENT, TInt nNOM, TInt nLNOM>
-  struct TTNodeInfo: TNodeInfo, TTElemInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+  template<TInt nPNOM, TInt nDESC, TInt nIDENT, TInt nNOM, TInt nLNOM, EVersion nV>
+  struct TTNodeInfo: TNodeInfo, TTElemInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
   {
-    typedef TTElemInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM> TElemInfoBase;
+    typedef TTElemInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV> TElemInfoBase;
 
     TTNodeInfo(const PMeshInfo& theMeshInfo, const PNodeInfo& theInfo):
       TElemInfoBase(theMeshInfo,theInfo)
@@ -399,10 +399,10 @@ namespace MED{
   };
 
   //---------------------------------------------------------------
-  template<TInt nPNOM, TInt nDESC, TInt nIDENT, TInt nNOM, TInt nLNOM>
-  struct TTPolygoneInfo: TPolygoneInfo, TTElemInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+  template<TInt nPNOM, TInt nDESC, TInt nIDENT, TInt nNOM, TInt nLNOM, EVersion nV>
+  struct TTPolygoneInfo: TPolygoneInfo, TTElemInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
   {
-    typedef TTElemInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM> TElemInfoBase;
+    typedef TTElemInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV> TElemInfoBase;
 
     TTPolygoneInfo(const PMeshInfo& theMeshInfo, const PPolygoneInfo& theInfo):
       TElemInfoBase(theMeshInfo,theInfo)
@@ -445,10 +445,10 @@ namespace MED{
                   const TIntVector& theFamilyNums,
                   const TIntVector& theElemNums,
                   const TStringVector& theElemNames = TStringVector()):
-      TTElemInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>(theMeshInfo,
-                                               theFamilyNums,
-                                               theElemNums,
-                                               theElemNames)
+      TElemInfoBase(theMeshInfo,
+                   theFamilyNums,
+                   theElemNums,
+                   theElemNames)
     {
       myTEntity = theTEntity;
       myTGeom = theTGeom;
@@ -459,10 +459,10 @@ namespace MED{
     }
   };
   //---------------------------------------------------------------
-  template<TInt nPNOM, TInt nDESC, TInt nIDENT, TInt nNOM, TInt nLNOM>
-  struct TTPolyedreInfo: TPolyedreInfo, TTElemInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+  template<TInt nPNOM, TInt nDESC, TInt nIDENT, TInt nNOM, TInt nLNOM, EVersion nV>
+  struct TTPolyedreInfo: TPolyedreInfo, TTElemInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
   {
-    typedef TTElemInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM> TElemInfoBase;
+    typedef TTElemInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV> TElemInfoBase;
 
     TTPolyedreInfo(const PMeshInfo& theMeshInfo, const PPolyedreInfo& theInfo):
       TElemInfoBase(theMeshInfo,theInfo)
@@ -511,10 +511,10 @@ namespace MED{
                   const TIntVector& theFamilyNums,
                   const TIntVector& theElemNums,
                   const TStringVector& theElemNames = TStringVector()):
-      TTElemInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>(theMeshInfo,
-                                               theFamilyNums,
-                                               theElemNums,
-                                               theElemNames)
+      TElemInfoBase(theMeshInfo,
+                   theFamilyNums,
+                   theElemNums,
+                   theElemNames)
     {
       myTEntity = theTEntity;
       myTGeom = theTGeom;
@@ -528,10 +528,10 @@ namespace MED{
   };
 
   //---------------------------------------------------------------
-  template<TInt nPNOM, TInt nDESC, TInt nIDENT, TInt nNOM, TInt nLNOM>
-  struct TTCellInfo: TCellInfo, TTElemInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+  template<TInt nPNOM, TInt nDESC, TInt nIDENT, TInt nNOM, TInt nLNOM, EVersion nV>
+  struct TTCellInfo: TCellInfo, TTElemInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
   {
-    typedef TTElemInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM> TElemInfoBase;
+    typedef TTElemInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV> TElemInfoBase;
 
     TTCellInfo(const PMeshInfo& theMeshInfo, const PCellInfo& theInfo):
       TElemInfoBase(theMeshInfo,theInfo)
@@ -539,11 +539,11 @@ namespace MED{
       myTEntity = theInfo->GetEntity();
       myTGeom = theInfo->GetGeom();
       myTConn  = theInfo->GetConn();
-      myConnDim = theInfo->GetConnDim();
       
-      myConn.resize(myNbElem*myConnDim);
+      TInt aConnDim = GetNbConnectivities(myTGeom);
+      myConn.resize(myNbElem*GetNbConn<nV>(myTGeom,myMeshInfo->myDim));
       for(TInt anElemId = 0; anElemId < myNbElem; anElemId++){
-       for(TInt anConnId = 0; anConnId < myConnDim; anConnId++){
+       for(TInt anConnId = 0; anConnId < aConnDim; anConnId++){
          SetConn(anElemId,anConnId,theInfo->GetConn(anElemId,anConnId));
        }
       }
@@ -564,8 +564,7 @@ namespace MED{
       myTEntity = theTEntity;
       myTGeom = theTGeom;
       myTConn  = theTConn;
-      myConnDim = GetNbConn(myTEntity,myTGeom,theMeshInfo->myDim);
-      myConn.resize(theNbElem*myConnDim);
+      myConn.resize(theNbElem*GetNbConn<nV>(theTGeom,theMeshInfo->myDim));
     }
     
     TTCellInfo(const PMeshInfo& theMeshInfo, 
@@ -576,28 +575,38 @@ namespace MED{
               const TIntVector& theFamilyNums,
               const TIntVector& theElemNums,
               const TStringVector& theElemNames = TStringVector()):
-      TTElemInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>(theMeshInfo,
-                                               theFamilyNums,
-                                               theElemNums,
-                                               theElemNames)
+      TElemInfoBase(theMeshInfo,
+                   theFamilyNums,
+                   theElemNums,
+                   theElemNames)
     {
       myTEntity = theTEntity;
       myTGeom = theTGeom;
       myTConn  = theTConn;
-      myConnDim = GetNbConn(myTEntity,myTGeom,theMeshInfo->myDim);
-      myConn.resize(theConnectivities.size());
-      for(TInt anId = 0, anEnd = myConn.size(); anId < anEnd; anId++){
-       myConn[anId] = theConnectivities[anId];
+
+      TInt aConnDim = GetNbConnectivities(myTGeom);
+      myNbElem = theConnectivities.size() / aConnDim;
+      myConn.resize(myNbElem*GetNbConn<nV>(myTGeom,myMeshInfo->myDim));
+      for(TInt anElemId = 0; anElemId < myNbElem; anElemId++){
+       for(TInt anConnId = 0; anConnId < aConnDim; anConnId++){
+         SetConn(anElemId,anConnId,theConnectivities[anElemId*aConnDim+anConnId]);
+       }
       }
+
     }
+
+    virtual TInt GetConnDim() const { 
+      return GetNbConn<nV>(myTGeom,myMeshInfo->myDim);
+    }
+
   };
 
 
   //---------------------------------------------------------------
-  template<TInt nPNOM, TInt nDESC, TInt nIDENT, TInt nNOM, TInt nLNOM>
-  struct TTFieldInfo: TFieldInfo, TTNameInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+  template<TInt nPNOM, TInt nDESC, TInt nIDENT, TInt nNOM, TInt nLNOM, EVersion nV>
+  struct TTFieldInfo: TFieldInfo, TTNameInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
   {
-    typedef TTNameInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM> TNameInfoBase;
+    typedef TTNameInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV> TNameInfoBase;
 
     TTFieldInfo(const PMeshInfo& theMeshInfo, const PFieldInfo& theInfo):
       TNameInfoBase(theInfo->GetName())
@@ -660,7 +669,7 @@ namespace MED{
 
 
   //---------------------------------------------------------------
-  template<TInt nPNOM, TInt nDESC, TInt nIDENT, TInt nNOM, TInt nLNOM>
+  template<TInt nPNOM, TInt nDESC, TInt nIDENT, TInt nNOM, TInt nLNOM, EVersion nV>
   struct TTTimeStampInfo: TTimeStampInfo
   {
     TTTimeStampInfo(const PFieldInfo& theFieldInfo, const PTimeStampInfo& theInfo)
@@ -728,7 +737,7 @@ namespace MED{
 
 
   //---------------------------------------------------------------
-  template<TInt nPNOM, TInt nDESC, TInt nIDENT, TInt nNOM, TInt nLNOM>
+  template<TInt nPNOM, TInt nDESC, TInt nIDENT, TInt nNOM, TInt nLNOM, EVersion nV>
   struct TTTimeStampVal: TTimeStampVal
   {
     TTTimeStampVal(const PTimeStampInfo& theTimeStampInfo, const PTimeStampVal& theInfo)
index ecfb13874d8df821375b9d8b487721595f81b2f3..e07ae30f8db013b6fb1661276670bdd4ad04af36 100644 (file)
 
 namespace MED{
 
-  template<TInt nPNOM, TInt nDESC, TInt nIDENT, TInt nNOM, TInt nLNOM>
+  template<TInt nPNOM, TInt nDESC, TInt nIDENT, TInt nNOM, TInt nLNOM, EVersion nV>
   class TTWrapper: public TWrapper{
   public:
     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    virtual PMeshInfo CrMeshInfo(TInt theDim = 0,
-                                const std::string& theValue = "",
-                                EMaillage theType = eNON_STRUCTURE,
-                                const std::string& theDesc = "")
+    virtual 
+    PMeshInfo
+    CrMeshInfo(TInt theDim = 0,
+              const std::string& theValue = "",
+              EMaillage theType = eNON_STRUCTURE,
+              const std::string& theDesc = "")
     {
-      return PMeshInfo(new TTMeshInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+      return PMeshInfo(new TTMeshInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
                       (theDim,
                        theValue,
                        theType,
                        theDesc));
     }
 
-    virtual PMeshInfo CrMeshInfo(const PMeshInfo& theInfo)
+    virtual 
+    PMeshInfo
+    CrMeshInfo(const PMeshInfo& theInfo)
     {
-      return PMeshInfo(new TTMeshInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>(theInfo));
+      return PMeshInfo(new TTMeshInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>(theInfo));
     }
-
+    
 
     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    virtual PFamilyInfo CrFamilyInfo(const PMeshInfo& theMeshInfo,
-                                    TInt theNbGroup = 0, 
-                                    TInt theNbAttr = 0,
-                                    TInt theId = 0,
-                                    const std::string& theValue = "")
+    virtual
+    PFamilyInfo
+    CrFamilyInfo(const PMeshInfo& theMeshInfo,
+                TInt theNbGroup = 0, 
+                TInt theNbAttr = 0,
+                TInt theId = 0,
+                const std::string& theValue = "")
     {
-      return PFamilyInfo(new TTFamilyInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+      return PFamilyInfo(new TTFamilyInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
                         (theMeshInfo,
                          theNbGroup,
                          theNbAttr,
@@ -71,15 +77,17 @@ namespace MED{
                          theValue));
     }
 
-    virtual PFamilyInfo CrFamilyInfo(const PMeshInfo& theMeshInfo,
-                                    const std::string& theValue,
-                                    TInt theId,
-                                    const MED::TStringSet& theGroupNames, 
-                                    const MED::TStringVector& theAttrDescs = MED::TStringVector(), 
-                                    const MED::TIntVector& theAttrIds = MED::TIntVector(), 
-                                    const MED::TIntVector& theAttrVals = MED::TIntVector())
+    virtual
+    PFamilyInfo
+    CrFamilyInfo(const PMeshInfo& theMeshInfo,
+                const std::string& theValue,
+                TInt theId,
+                const MED::TStringSet& theGroupNames, 
+                const MED::TStringVector& theAttrDescs = MED::TStringVector(), 
+                const MED::TIntVector& theAttrIds = MED::TIntVector(), 
+                const MED::TIntVector& theAttrVals = MED::TIntVector())
     {
-      return PFamilyInfo(new TTFamilyInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+      return PFamilyInfo(new TTFamilyInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
                         (theMeshInfo,
                          theValue,
                          theId,
@@ -89,23 +97,27 @@ namespace MED{
                          theAttrVals));
     }
 
-    virtual PFamilyInfo CrFamilyInfo(const PMeshInfo& theMeshInfo,
-                                    const PFamilyInfo& theInfo)
+    virtual
+    PFamilyInfo
+    CrFamilyInfo(const PMeshInfo& theMeshInfo,
+                const PFamilyInfo& theInfo)
     {
-      return PFamilyInfo(new TTFamilyInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+      return PFamilyInfo(new TTFamilyInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
                         (theMeshInfo,
                          theInfo));
     }
 
 
     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    virtual PNodeInfo CrNodeInfo(const PMeshInfo& theMeshInfo, 
-                                TInt theNbElem,
-                                ERepere theSystem = eCART, 
-                                EBooleen theIsElemNum = eVRAI,
-                                EBooleen theIsElemNames = eVRAI)
+    virtual
+    PNodeInfo
+    CrNodeInfo(const PMeshInfo& theMeshInfo, 
+              TInt theNbElem,
+              ERepere theSystem = eCART, 
+              EBooleen theIsElemNum = eVRAI,
+              EBooleen theIsElemNames = eVRAI)
     {
-      return PNodeInfo(new TTNodeInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+      return PNodeInfo(new TTNodeInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
                       (theMeshInfo,
                        theNbElem,
                        theSystem,
@@ -113,16 +125,18 @@ namespace MED{
                        theIsElemNames));
     }
 
-    virtual PNodeInfo CrNodeInfo(const PMeshInfo& theMeshInfo, 
-                                ERepere theSystem, 
-                                const TFloatVector& theNodeCoords,
-                                const TStringVector& theCoordNames,
-                                const TStringVector& theCoordUnits,
-                                const TIntVector& theFamilyNums,
-                                const TIntVector& theElemNums,
-                                const TStringVector& theElemNames = TStringVector())
+    virtual 
+    PNodeInfo
+    CrNodeInfo(const PMeshInfo& theMeshInfo, 
+              ERepere theSystem, 
+              const TFloatVector& theNodeCoords,
+              const TStringVector& theCoordNames,
+              const TStringVector& theCoordUnits,
+              const TIntVector& theFamilyNums,
+              const TIntVector& theElemNums,
+              const TStringVector& theElemNames = TStringVector())
     {
-      return PNodeInfo(new TTNodeInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+      return PNodeInfo(new TTNodeInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
                       (theMeshInfo,
                        theSystem,
                        theNodeCoords,
@@ -133,25 +147,29 @@ namespace MED{
                        theElemNames));
     }
 
-    virtual PNodeInfo CrNodeInfo(const PMeshInfo& theMeshInfo,
-                                const PNodeInfo& theInfo)
+    virtual 
+    PNodeInfo
+    CrNodeInfo(const PMeshInfo& theMeshInfo,
+              const PNodeInfo& theInfo)
     {
-      return PNodeInfo(new TTNodeInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+      return PNodeInfo(new TTNodeInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
                       (theMeshInfo,
                        theInfo));
     }
     
     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    virtual PPolygoneInfo CrPolygoneInfo(const PMeshInfo& theMeshInfo, 
-                                        TInt theNbElem,
-                                        TInt theNbConn,
-                                        EEntiteMaillage theTEntity, 
-                                        EGeometrieElement theTGeom,
-                                        EConnectivite theTConn = eNOD,
-                                        EBooleen theIsElemNum = eVRAI,
-                                        EBooleen theIsElemNames = eVRAI)
+    virtual
+    PPolygoneInfo
+    CrPolygoneInfo(const PMeshInfo& theMeshInfo, 
+                  TInt theNbElem,
+                  TInt theNbConn,
+                  EEntiteMaillage theTEntity, 
+                  EGeometrieElement theTGeom,
+                  EConnectivite theTConn = eNOD,
+                  EBooleen theIsElemNum = eVRAI,
+                  EBooleen theIsElemNames = eVRAI)
     {
-      return PPolygoneInfo(new TTPolygoneInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+      return PPolygoneInfo(new TTPolygoneInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
                           (theMeshInfo,
                            theNbElem,
                            theNbConn,
@@ -162,17 +180,19 @@ namespace MED{
                            theIsElemNames));
     }
 
-    virtual PPolygoneInfo CrPolygoneInfo(const PMeshInfo& theMeshInfo, 
-                                        EEntiteMaillage theTEntity, 
-                                        EGeometrieElement theTGeom,
-                                        EConnectivite theTConn,
-                                        const TIntVector& theConnectivities,
-                                        const TIntVector& theIndexes,
-                                        const TIntVector& theFamilyNums,
-                                        const TIntVector& theElemNums,
-                                        const TStringVector& theElemNames = TStringVector())
+    virtual
+    PPolygoneInfo
+    CrPolygoneInfo(const PMeshInfo& theMeshInfo, 
+                  EEntiteMaillage theTEntity, 
+                  EGeometrieElement theTGeom,
+                  EConnectivite theTConn,
+                  const TIntVector& theConnectivities,
+                  const TIntVector& theIndexes,
+                  const TIntVector& theFamilyNums,
+                  const TIntVector& theElemNums,
+                  const TStringVector& theElemNames = TStringVector())
     {
-      return PPolygoneInfo(new TTPolygoneInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+      return PPolygoneInfo(new TTPolygoneInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
                           (theMeshInfo,
                            theTEntity,
                            theTGeom,
@@ -184,26 +204,30 @@ namespace MED{
                            theElemNames));
     }
 
-    virtual PPolygoneInfo CrPolygoneInfo(const PMeshInfo& theMeshInfo,
-                                        const PPolygoneInfo& theInfo)
+    virtual
+    PPolygoneInfo
+    CrPolygoneInfo(const PMeshInfo& theMeshInfo,
+                  const PPolygoneInfo& theInfo)
     {
-      return PPolygoneInfo(new TTPolygoneInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+      return PPolygoneInfo(new TTPolygoneInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
                           (theMeshInfo,
                            theInfo));
     }
-
+    
     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    virtual PPolyedreInfo CrPolyedreInfo(const PMeshInfo& theMeshInfo, 
-                                        TInt theNbElem,
-                                        TInt theNbConn,
-                                        TInt theNbFaces,
-                                        EEntiteMaillage theTEntity, 
-                                        EGeometrieElement theTGeom,
-                                        EConnectivite theTConn = eNOD,
-                                        EBooleen theIsElemNum = eVRAI,
-                                        EBooleen theIsElemNames = eVRAI)
+    virtual
+    PPolyedreInfo
+    CrPolyedreInfo(const PMeshInfo& theMeshInfo, 
+                  TInt theNbElem,
+                  TInt theNbConn,
+                  TInt theNbFaces,
+                  EEntiteMaillage theTEntity, 
+                  EGeometrieElement theTGeom,
+                  EConnectivite theTConn = eNOD,
+                  EBooleen theIsElemNum = eVRAI,
+                  EBooleen theIsElemNames = eVRAI)
     {
-      return PPolyedreInfo(new TTPolyedreInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+      return PPolyedreInfo(new TTPolyedreInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
                           (theMeshInfo,
                            theNbElem,
                            theNbConn,
@@ -215,18 +239,20 @@ namespace MED{
                            theIsElemNames));
     }
 
-    virtual PPolyedreInfo CrPolyedreInfo(const PMeshInfo& theMeshInfo, 
-                                        EEntiteMaillage theTEntity, 
-                                        EGeometrieElement theTGeom,
-                                        EConnectivite theTConn,
-                                        const TIntVector& theConnectivities,
-                                        const TIntVector& theFacesIndexes,
-                                        const TIntVector& theIndexes,
-                                        const TIntVector& theFamilyNums,
-                                        const TIntVector& theElemNums,
-                                        const TStringVector& theElemNames = TStringVector())
+    virtual
+    PPolyedreInfo
+    CrPolyedreInfo(const PMeshInfo& theMeshInfo, 
+                  EEntiteMaillage theTEntity, 
+                  EGeometrieElement theTGeom,
+                  EConnectivite theTConn,
+                  const TIntVector& theConnectivities,
+                  const TIntVector& theFacesIndexes,
+                  const TIntVector& theIndexes,
+                  const TIntVector& theFamilyNums,
+                  const TIntVector& theElemNums,
+                  const TStringVector& theElemNames = TStringVector())
     {
-      return PPolyedreInfo(new TTPolyedreInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+      return PPolyedreInfo(new TTPolyedreInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
                           (theMeshInfo,
                            theTEntity,
                            theTGeom,
@@ -239,24 +265,28 @@ namespace MED{
                            theElemNames));
     }
 
-    virtual PPolyedreInfo CrPolyedreInfo(const PMeshInfo& theMeshInfo,
-                                        const PPolyedreInfo& theInfo)
+    virtual
+    PPolyedreInfo
+    CrPolyedreInfo(const PMeshInfo& theMeshInfo,
+                  const PPolyedreInfo& theInfo)
     {
-      return PPolyedreInfo(new TTPolyedreInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+      return PPolyedreInfo(new TTPolyedreInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
                           (theMeshInfo,
                            theInfo));
     }
 
     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    virtual PCellInfo CrCellInfo(const PMeshInfo& theMeshInfo, 
-                                TInt theNbElem,
-                                EEntiteMaillage theTEntity, 
-                                EGeometrieElement theTGeom,
-                                EConnectivite theTConn = eNOD,
-                                EBooleen theIsElemNum = eVRAI,
-                                EBooleen theIsElemNames = eVRAI)
+    virtual
+    PCellInfo
+    CrCellInfo(const PMeshInfo& theMeshInfo, 
+              TInt theNbElem,
+              EEntiteMaillage theTEntity, 
+              EGeometrieElement theTGeom,
+              EConnectivite theTConn = eNOD,
+              EBooleen theIsElemNum = eVRAI,
+              EBooleen theIsElemNames = eVRAI)
     {
-      return PCellInfo(new TTCellInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+      return PCellInfo(new TTCellInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
                       (theMeshInfo,
                        theNbElem,
                        theTEntity,
@@ -266,16 +296,18 @@ namespace MED{
                        theIsElemNames));
     }
 
-    virtual PCellInfo CrCellInfo(const PMeshInfo& theMeshInfo, 
-                                EEntiteMaillage theTEntity, 
-                                EGeometrieElement theTGeom,
-                                EConnectivite theTConn,
-                                const TIntVector& theConnectivities,
-                                const TIntVector& theFamilyNums,
-                                const TIntVector& theElemNums,
-                                const TStringVector& theElemNames = TStringVector())
+    virtual
+    PCellInfo
+    CrCellInfo(const PMeshInfo& theMeshInfo, 
+              EEntiteMaillage theTEntity, 
+              EGeometrieElement theTGeom,
+              EConnectivite theTConn,
+              const TIntVector& theConnectivities,
+              const TIntVector& theFamilyNums,
+              const TIntVector& theElemNums,
+              const TStringVector& theElemNames = TStringVector())
     {
-      return PCellInfo(new TTCellInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+      return PCellInfo(new TTCellInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
                       (theMeshInfo,
                        theTEntity,
                        theTGeom,
@@ -286,24 +318,28 @@ namespace MED{
                        theElemNames));
     }
 
-    virtual PCellInfo CrCellInfo(const PMeshInfo& theMeshInfo,
-                                const PCellInfo& theInfo)
+    virtual
+    PCellInfo
+    CrCellInfo(const PMeshInfo& theMeshInfo,
+              const PCellInfo& theInfo)
     {
-      return PCellInfo(new TTCellInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+      return PCellInfo(new TTCellInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
                       (theMeshInfo,
                        theInfo));
     }
     
 
     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    virtual PFieldInfo CrFieldInfo(const PMeshInfo& theMeshInfo, 
-                                  TInt theNbComp = 0,
-                                  ETypeChamp theType = eFLOAT64,
-                                  const std::string& theValue = "",
-                                  EBooleen theIsLocal = eVRAI,
-                                  TInt theNbRef = 1)
+    virtual
+    PFieldInfo
+    CrFieldInfo(const PMeshInfo& theMeshInfo, 
+               TInt theNbComp = 0,
+               ETypeChamp theType = eFLOAT64,
+               const std::string& theValue = "",
+               EBooleen theIsLocal = eVRAI,
+               TInt theNbRef = 1)
     {
-      return PFieldInfo(new TTFieldInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+      return PFieldInfo(new TTFieldInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
                        (theMeshInfo,
                         theNbComp,
                         theType,
@@ -312,27 +348,31 @@ namespace MED{
                         theNbRef));
     }
 
-    virtual PFieldInfo CrFieldInfo(const PMeshInfo& theMeshInfo,
-                                  const PFieldInfo& theInfo)
+    virtual
+    PFieldInfo
+    CrFieldInfo(const PMeshInfo& theMeshInfo,
+               const PFieldInfo& theInfo)
     {
-      return PFieldInfo(new TTFieldInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+      return PFieldInfo(new TTFieldInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
                        (theMeshInfo,
                         theInfo));
     }
     
 
     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    virtual PTimeStampInfo CrTimeStampInfo(const PFieldInfo& theFieldInfo, 
-                                          EEntiteMaillage theEntity,
-                                          const TGeom& theGeom,
-                                          TInt theNbGauss = 0,
-                                          TInt theNumDt = 0,
-                                          TInt theNumOrd = 0,
-                                          TFloat theDt = 0,
-                                          const std::string& theUnitDt = "",
-                                          const std::string& theGaussName = "")
+    virtual
+    PTimeStampInfo
+    CrTimeStampInfo(const PFieldInfo& theFieldInfo, 
+                   EEntiteMaillage theEntity,
+                   const TGeom& theGeom,
+                   TInt theNbGauss = 0,
+                   TInt theNumDt = 0,
+                   TInt theNumOrd = 0,
+                   TFloat theDt = 0,
+                   const std::string& theUnitDt = "",
+                   const std::string& theGaussName = "")
     {
-      return PTimeStampInfo(new TTTimeStampInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+      return PTimeStampInfo(new TTTimeStampInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
                            (theFieldInfo,
                             theEntity,
                             theGeom,
@@ -344,30 +384,36 @@ namespace MED{
                             theGaussName));
     }
 
-    virtual PTimeStampInfo CrTimeStampInfo(const PFieldInfo& theFieldInfo,
-                                          const PTimeStampInfo& theInfo)
+    virtual
+    PTimeStampInfo
+    CrTimeStampInfo(const PFieldInfo& theFieldInfo,
+                   const PTimeStampInfo& theInfo)
     {
-      return PTimeStampInfo(new TTTimeStampInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+      return PTimeStampInfo(new TTTimeStampInfo<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
                            (theFieldInfo,
                             theInfo));
     }
     
 
     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    virtual PTimeStampVal CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo,
-                                        const std::string& thePflName = "",
-                                        EModeProfil thePflMode = eCOMPACT)
+    virtual
+    PTimeStampVal
+    CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo,
+                  const std::string& thePflName = "",
+                  EModeProfil thePflMode = eCOMPACT)
     {
-      return PTimeStampVal(new TTTimeStampVal<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+      return PTimeStampVal(new TTTimeStampVal<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
                           (theTimeStampInfo,
                            thePflName,
                            thePflMode));
     }
 
-    virtual PTimeStampVal CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo,
-                                        const PTimeStampVal& theInfo)
+    virtual
+    PTimeStampVal
+    CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo,
+                  const PTimeStampVal& theInfo)
     {
-      return PTimeStampVal(new TTTimeStampVal<nPNOM,nDESC,nIDENT,nNOM,nLNOM>
+      return PTimeStampVal(new TTTimeStampVal<nPNOM,nDESC,nIDENT,nNOM,nLNOM,nV>
                           (theTimeStampInfo,
                            theInfo));
     }
index 1c01b2716d6f8b197ae2b0cd1892536d24c831dc..f536162c712c922e9a193ca25a62e6e364bda12a 100644 (file)
@@ -9,33 +9,88 @@
 #include "MED_Wrapper.hxx"
 #include "MED_Utilities.hxx"
  
+#ifdef _DEBUG_
+static int MYDEBUG = 0;
+static int MYVALUEDEBUG = 0;
+#else
+static int MYDEBUG = 0;
+static int MYVALUEDEBUG = 0;
+#endif
+
 namespace MED{
   //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  PMeshInfo TWrapper::GetPMeshInfo(TInt theId)
+  PMeshInfo TWrapper::GetPMeshInfo(TInt theId,
+                                  TErr* theErr)
   {
     PMeshInfo anInfo = CrMeshInfo();
-    GetMeshInfo(theId,*anInfo);
+    GetMeshInfo(theId,*anInfo,theErr);
     return anInfo;
   }
 
 
   //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  PFamilyInfo TWrapper::GetPFamilyInfo(const PMeshInfo& theMeshInfo, TInt theId)
+  PFamilyInfo TWrapper::GetPFamilyInfo(const PMeshInfo& theMeshInfo, 
+                                      TInt theId,
+                                      TErr* theErr)
   {
     TInt aNbAttr = GetNbFamAttr(theId,*theMeshInfo);
     TInt aNbGroup = GetNbFamGroup(theId,*theMeshInfo);
     PFamilyInfo anInfo = CrFamilyInfo(theMeshInfo,aNbGroup,aNbAttr);
-    GetFamilyInfo(theId,*anInfo);
+    GetFamilyInfo(theId,*anInfo,theErr);
+
+#ifdef _DEBUG_
+    string aName = anInfo->GetName();
+    INITMSG(MYDEBUG,
+           "aFamilyName = '"<<aName<<"'; andId = "<<anInfo->GetId()<<
+           "; aNbAttr = "<<aNbAttr<<"; aNbGroup = "<<aNbGroup<<"\n");
+    for(TInt iGroup = 0; iGroup < aNbGroup; iGroup++){
+      aName = anInfo->GetGroupName(iGroup);
+      INITMSG(MYDEBUG,"aGroupName = '"<<aName<<"'\n");
+    }
+#endif
+    
     return anInfo;
   }
 
 
   //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  PNodeInfo TWrapper::GetPNodeInfo(const PMeshInfo& theMeshInfo)
+  PNodeInfo TWrapper::GetPNodeInfo(const PMeshInfo& theMeshInfo,
+                                  TErr* theErr)
   {
     TInt aNbElems = GetNbNodes(*theMeshInfo);
     PNodeInfo anInfo = CrNodeInfo(theMeshInfo,aNbElems);
-    GetNodeInfo(*anInfo);
+    GetNodeInfo(*anInfo,theErr);
+
+#ifdef _DEBUG_
+    TInt aDim = theMeshInfo->myDim;
+    TInt aNbElem = anInfo->GetNbElem();
+    INITMSG(MYDEBUG,"GetPNodeInfo - aCoords: "<<aNbElem<<": ");
+    TNodeCoord& aCoord = anInfo->myCoord;
+    for(TInt iElem = 0; iElem < aNbElem; iElem++){
+      for(TInt iDim = 0, anId = iElem*aDim; iDim < aDim; iDim++, anId++){
+       ADDMSG(MYVALUEDEBUG,aCoord[anId]<<",");
+      }
+      ADDMSG(MYVALUEDEBUG," ");
+    }
+    ADDMSG(MYDEBUG,endl);
+
+    BEGMSG(MYDEBUG,"GetPNodeInfo - GetFamNum: ");
+    for(TInt iElem = 0; iElem < aNbElem; iElem++){
+      ADDMSG(MYVALUEDEBUG,anInfo->GetFamNum(iElem)<<", ");
+    }
+    ADDMSG(MYDEBUG,endl);
+
+    if(anInfo->IsElemNum()){
+      BEGMSG(MYDEBUG,"GetPNodeInfo - GetElemNum: ");
+      for(TInt iElem = 0; iElem < aNbElem; iElem++){
+       ADDMSG(MYVALUEDEBUG,anInfo->GetElemNum(iElem)<<", ");
+      }
+      ADDMSG(MYDEBUG,endl);
+    }
+
+    ADDMSG(MYDEBUG,endl);
+#endif
+    
     return anInfo;
   }
 
@@ -71,21 +126,54 @@ namespace MED{
   PCellInfo TWrapper::GetPCellInfo(const PMeshInfo& theMeshInfo,
                                   EEntiteMaillage theEntity, 
                                   EGeometrieElement theGeom, 
-                                  EConnectivite theConn)
+                                  EConnectivite theConn,
+                                  TErr* theErr)
   {
     TInt aNbElem = GetNbCells(*theMeshInfo,theEntity,theGeom,theConn);
     PCellInfo anInfo = CrCellInfo(theMeshInfo,aNbElem,theEntity,theGeom,theConn);
-    GetCellInfo(*anInfo);
+    GetCellInfo(*anInfo,theErr);
+
+#ifdef _DEBUG_
+    TInt aConnDim = anInfo->GetConnDim();
+    INITMSG(MYDEBUG,"GetPCellInfo - theEntity = "<<theEntity<<"; theGeom = "<<theGeom<<"; aConnDim: "<<aConnDim<<"\n");
+    BEGMSG(MYDEBUG,"GetPCellInfo - aNbElem: "<<aNbElem<<": ");
+    for(TInt iElem = 0; iElem < aNbElem; iElem++){
+      for(TInt iConn = 0; iConn < aConnDim; iConn++){
+       ADDMSG(MYVALUEDEBUG,anInfo->GetConn(iElem,iConn)<<",");
+      }
+      ADDMSG(MYVALUEDEBUG," ");
+    }
+    ADDMSG(MYDEBUG,endl);
+
+    BEGMSG(MYDEBUG,"GetPCellInfo - GetFamNum: ");
+    for(TInt iElem = 0; iElem < aNbElem; iElem++){
+      ADDMSG(MYVALUEDEBUG,anInfo->GetFamNum(iElem)<<", ");
+    }
+    ADDMSG(MYDEBUG,endl);
+
+    if(anInfo->IsElemNum()){
+      BEGMSG(MYDEBUG,"GetPCellInfo - GetElemNum: ");
+      for(TInt iElem = 0; iElem < aNbElem; iElem++){
+       ADDMSG(MYVALUEDEBUG,anInfo->GetElemNum(iElem)<<", ");
+      }
+      ADDMSG(MYDEBUG,endl);
+    }
+
+    ADDMSG(MYDEBUG,endl);
+#endif
+    
     return anInfo;
   }
 
 
   //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  PFieldInfo TWrapper::GetPFieldInfo(const PMeshInfo& theMeshInfo, TInt theId)
+  PFieldInfo TWrapper::GetPFieldInfo(const PMeshInfo& theMeshInfo, 
+                                    TInt theId,
+                                    TErr* theErr)
   {
     TInt aNbComp = GetNbComp(theId);
     PFieldInfo anInfo = CrFieldInfo(theMeshInfo,aNbComp);
-    GetFieldInfo(theId,*anInfo);
+    GetFieldInfo(theId,*anInfo,theErr);
     return anInfo;
   }
 
@@ -94,19 +182,21 @@ namespace MED{
   PTimeStampInfo TWrapper::GetPTimeStampInfo(const PFieldInfo& theFieldInfo,
                                             EEntiteMaillage theEntity,
                                             const MED::TGeom& theGeom,
-                                            TInt theId)
+                                            TInt theId,
+                                            TErr* theErr)
   {
     PTimeStampInfo anInfo = CrTimeStampInfo(theFieldInfo,theEntity,theGeom);
-    GetTimeStampInfo(theId,*anInfo);
+    GetTimeStampInfo(theId,*anInfo,theErr);
     return anInfo;
   }
 
 
   //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  PTimeStampVal TWrapper::GetPTimeStampVal(const PTimeStampInfo& theTimeStampInfo)
+  PTimeStampVal TWrapper::GetPTimeStampVal(const PTimeStampInfo& theTimeStampInfo,
+                                          TErr* theErr)
   {
     PTimeStampVal anInfo = CrTimeStampVal(theTimeStampInfo);
-    GetTimeStampVal(*anInfo);
+    GetTimeStampVal(*anInfo,theErr);
     return anInfo;
   }
 }
index e0ccbd9f36b2a71e229d2937761ad897ffbfdeae..4865a156e37fa658217567021815c0ba7309d0b1 100644 (file)
@@ -35,313 +35,452 @@ namespace MED{
 
   struct TWrapper{
     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    virtual PMeshInfo CrMeshInfo(TInt theDim = 0,
-                                const std::string& theValue = "",
-                                EMaillage theType = eNON_STRUCTURE,
-                                const std::string& theDesc = "") = 0;
-
-    virtual PMeshInfo CrMeshInfo(const PMeshInfo& theInfo) = 0;
-
-    virtual TInt GetNbMeshes(TErr* theErr = NULL) = 0;
+    virtual 
+    PMeshInfo 
+    CrMeshInfo(TInt theDim = 0,
+              const std::string& theValue = "",
+              EMaillage theType = eNON_STRUCTURE,
+              const std::string& theDesc = "") = 0;
+
+    virtual 
+    PMeshInfo 
+    CrMeshInfo(const PMeshInfo& theInfo) = 0;
+
+    virtual 
+    TInt 
+    GetNbMeshes(TErr* theErr = NULL) = 0;
     
-    virtual void GetMeshInfo(TInt theMeshId, TMeshInfo&,
-                            TErr* theErr = NULL) = 0;
-
-    virtual void SetMeshInfo(const TMeshInfo& theInfo,
-                            TErr* theErr = NULL) = 0;
+    virtual 
+    void 
+    GetMeshInfo(TInt theMeshId, TMeshInfo&,
+               TErr* theErr = NULL) = 0;
+
+    virtual 
+    void
+    SetMeshInfo(const TMeshInfo& theInfo,
+               TErr* theErr = NULL) = 0;
     
-    virtual PMeshInfo GetPMeshInfo(TInt theId);
+    virtual 
+    PMeshInfo
+    GetPMeshInfo(TInt theId,
+                TErr* theErr = NULL);
 
 
     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    virtual TInt GetNbFamilies(const TMeshInfo& theMeshInfo,
-                              TErr* theErr = NULL) = 0;
-
-    virtual TInt GetNbFamAttr(TInt theFamId, 
-                             const TMeshInfo& theInfo,
-                             TErr* theErr = NULL) = 0;
-
-    virtual TInt GetNbFamGroup(TInt theFamId, 
-                              const TMeshInfo& theInfo,
-                              TErr* theErr = NULL) = 0;
+    virtual 
+    TInt
+    GetNbFamilies(const TMeshInfo& theMeshInfo,
+                 TErr* theErr = NULL) = 0;
+
+    virtual 
+    TInt
+    GetNbFamAttr(TInt theFamId, 
+                const TMeshInfo& theInfo,
+                TErr* theErr = NULL) = 0;
     
-    virtual void GetFamilyInfo(TInt theFamId, 
-                              TFamilyInfo& theInfo,
-                              TErr* theErr = NULL) = 0;
+    virtual
+    TInt
+    GetNbFamGroup(TInt theFamId, 
+                 const TMeshInfo& theInfo,
+                 TErr* theErr = NULL) = 0;
     
-    virtual void SetFamilyInfo(const TFamilyInfo& theInfo,
-                              TErr* theErr = NULL) = 0;
+    virtual
+    void
+    GetFamilyInfo(TInt theFamId, 
+                 TFamilyInfo& theInfo,
+                 TErr* theErr = NULL) = 0;
     
-    virtual PFamilyInfo CrFamilyInfo(const PMeshInfo& theMeshInfo,
-                                    TInt theNbGroup = 0, 
-                                    TInt theNbAttr = 0,
-                                    TInt theId = 0,
-                                    const std::string& theValue = "") = 0;
+    virtual
+    void
+    SetFamilyInfo(const TFamilyInfo& theInfo,
+                 TErr* theErr = NULL) = 0;
+    
+    virtual 
+    PFamilyInfo
+    CrFamilyInfo(const PMeshInfo& theMeshInfo,
+                TInt theNbGroup = 0, 
+                TInt theNbAttr = 0,
+                TInt theId = 0,
+                const std::string& theValue = "") = 0;
+    
+    virtual 
+    PFamilyInfo
+    CrFamilyInfo(const PMeshInfo& theMeshInfo,
+                const std::string& theValue,
+                TInt theId,
+                const TStringSet& theGroupNames, 
+                const TStringVector& theAttrDescs = TStringVector(), 
+                const TIntVector& theAttrIds = TIntVector(), 
+                const TIntVector& theAttrVals = TIntVector()) = 0;
+    
+    virtual
+    PFamilyInfo
+    CrFamilyInfo(const PMeshInfo& theMeshInfo,
+                const PFamilyInfo& theInfo) = 0;
+    
+    PFamilyInfo
+    GetPFamilyInfo(const PMeshInfo& theMeshInfo, 
+                  TInt theId,
+                  TErr* theErr = NULL);
     
-    virtual PFamilyInfo CrFamilyInfo(const PMeshInfo& theMeshInfo,
-                                    const std::string& theValue,
-                                    TInt theId,
-                                    const TStringSet& theGroupNames, 
-                                    const TStringVector& theAttrDescs = TStringVector(), 
-                                    const TIntVector& theAttrIds = TIntVector(), 
-                                    const TIntVector& theAttrVals = TIntVector()) = 0;
-
-    virtual PFamilyInfo CrFamilyInfo(const PMeshInfo& theMeshInfo,
-                                    const PFamilyInfo& theInfo) = 0;
-
-    PFamilyInfo GetPFamilyInfo(const PMeshInfo& theMeshInfo, TInt theId);
-
 
     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    virtual TInt GetNbNodes(const TMeshInfo& theMeshInfo,
-                           TErr* theErr = NULL) = 0;
+    virtual
+    TInt
+    GetNbNodes(const TMeshInfo& theMeshInfo,
+              TErr* theErr = NULL) = 0;
     
-    virtual void GetNodeInfo(TNodeInfo& theInfo,
-                            TErr* theErr = NULL) = 0;
-
-    virtual void SetNodeInfo(const TNodeInfo& theInfo,
-                            TErr* theErr = NULL) = 0;
+    virtual
+    void
+    GetNodeInfo(TNodeInfo& theInfo,
+               TErr* theErr = NULL) = 0;
+
+    virtual 
+    void
+    SetNodeInfo(const TNodeInfo& theInfo,
+               TErr* theErr = NULL) = 0;
+    
+    virtual 
+    PNodeInfo
+    CrNodeInfo(const PMeshInfo& theMeshInfo, 
+              TInt theNbElem,
+              ERepere theSystem = eCART, 
+              EBooleen theIsElemNum = eVRAI,
+              EBooleen theIsElemNames = eVRAI) = 0;
+
+    virtual 
+    PNodeInfo
+    CrNodeInfo(const PMeshInfo& theMeshInfo, 
+              ERepere theSystem, 
+              const TFloatVector& theNodeCoords,
+              const TStringVector& theCoordNames,
+              const TStringVector& theCoordUnits,
+              const TIntVector& theFamilyNums,
+              const TIntVector& theElemNums,
+              const TStringVector& theElemNames = TStringVector()) = 0;
+    
+    virtual
+    PNodeInfo
+    CrNodeInfo(const PMeshInfo& theMeshInfo,
+              const PNodeInfo& theInfo) = 0;
+    
+    PNodeInfo
+    GetPNodeInfo(const PMeshInfo& theMeshInfo,
+                TErr* theErr = NULL);
     
-    virtual PNodeInfo CrNodeInfo(const PMeshInfo& theMeshInfo, 
-                                TInt theNbElem,
-                                ERepere theSystem = eCART, 
-                                EBooleen theIsElemNum = eVRAI,
-                                EBooleen theIsElemNames = eVRAI) = 0;
-
-    virtual PNodeInfo CrNodeInfo(const PMeshInfo& theMeshInfo, 
-                                ERepere theSystem, 
-                                const TFloatVector& theNodeCoords,
-                                const TStringVector& theCoordNames,
-                                const TStringVector& theCoordUnits,
-                                const TIntVector& theFamilyNums,
-                                const TIntVector& theElemNums,
-                                const TStringVector& theElemNames = TStringVector()) = 0;
-
-    virtual PNodeInfo CrNodeInfo(const PMeshInfo& theMeshInfo,
-                                const PNodeInfo& theInfo) = 0;
-
-    PNodeInfo GetPNodeInfo(const PMeshInfo& theMeshInfo);
-
     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    virtual void GetPolygoneInfo(TPolygoneInfo& theInfo,
-                                TErr* theErr = NULL) {};
-    virtual void SetPolygoneInfo(const TPolygoneInfo& theInfo,
-                                TErr* theErr = NULL) {};
-    virtual TInt GetNbPolygones(const TMeshInfo& theMeshInfo,
-                               EEntiteMaillage,
-                               EGeometrieElement,
-                               EConnectivite,
-                               TErr* theErr = NULL) { return 0;};
-
-    virtual TInt GetNbPolygoneConn(const TMeshInfo& theMeshInfo,
-                                  EEntiteMaillage,
-                                  EGeometrieElement,
-                                  EConnectivite,
-                                  TErr* theErr = NULL){ return 0;};
-
-    virtual PPolygoneInfo CrPolygoneInfo(const PMeshInfo& theMeshInfo, 
-                                        TInt theNbElem,
-                                        TInt theNbConn,
-                                        EEntiteMaillage theTEntity, 
-                                        EGeometrieElement theTGeom,
-                                        EConnectivite theTConn = eNOD,
-                                        EBooleen theIsElemNum = eVRAI,
-                                        EBooleen theIsElemNames = eVRAI)
+    virtual
+    void
+    GetPolygoneInfo(TPolygoneInfo& theInfo,
+                   TErr* theErr = NULL) 
+    {}
+
+    virtual
+    void
+    SetPolygoneInfo(const TPolygoneInfo& theInfo,
+                   TErr* theErr = NULL) 
+    {}
+
+    virtual
+    TInt
+    GetNbPolygones(const TMeshInfo& theMeshInfo,
+                  EEntiteMaillage,
+                  EGeometrieElement,
+                  EConnectivite,
+                  TErr* theErr = NULL) 
+    { return 0;}
+
+    virtual
+    TInt
+    GetNbPolygoneConn(const TMeshInfo& theMeshInfo,
+                     EEntiteMaillage,
+                     EGeometrieElement,
+                     EConnectivite,
+                     TErr* theErr = NULL)
+    { return 0;}
+    
+    virtual 
+    PPolygoneInfo
+    CrPolygoneInfo(const PMeshInfo& theMeshInfo, 
+                  TInt theNbElem,
+                  TInt theNbConn,
+                  EEntiteMaillage theTEntity, 
+                  EGeometrieElement theTGeom,
+                  EConnectivite theTConn = eNOD,
+                  EBooleen theIsElemNum = eVRAI,
+                  EBooleen theIsElemNames = eVRAI)
     {
       return PPolygoneInfo();
-    };
-
-    virtual PPolygoneInfo CrPolygoneInfo(const PMeshInfo& theMeshInfo, 
-                                        EEntiteMaillage theTEntity, 
-                                        EGeometrieElement theTGeom,
-                                        EConnectivite theTConn,
-                                        const TIntVector& theConnectivities,
-                                        const TIntVector& theFamilyNums,
-                                        const TIntVector& theElemNums,
-                                        const TStringVector& theElemNames = TStringVector())
+    }
+    
+    virtual
+    PPolygoneInfo 
+    CrPolygoneInfo(const PMeshInfo& theMeshInfo, 
+                  EEntiteMaillage theTEntity, 
+                  EGeometrieElement theTGeom,
+                  EConnectivite theTConn,
+                  const TIntVector& theConnectivities,
+                  const TIntVector& theFamilyNums,
+                  const TIntVector& theElemNums,
+                  const TStringVector& theElemNames = TStringVector())
     {
       return PPolygoneInfo();
-    };
+    }
 
-    virtual PPolygoneInfo CrPolygoneInfo(const PMeshInfo& theMeshInfo,
-                                        const PPolygoneInfo& theInfo)
+    virtual
+    PPolygoneInfo
+    CrPolygoneInfo(const PMeshInfo& theMeshInfo,
+                  const PPolygoneInfo& theInfo)
     {
       return PPolygoneInfo();
-    };
+    }
+    
+    PPolygoneInfo
+    GetPPolygoneInfo(const PMeshInfo& theMeshInfo,
+                    EEntiteMaillage theEntity, 
+                    EGeometrieElement theGeom, 
+                    EConnectivite theConn = eNOD);
     
-    PPolygoneInfo GetPPolygoneInfo(const PMeshInfo& theMeshInfo,
-                                  EEntiteMaillage theEntity, 
-                                  EGeometrieElement theGeom, 
-                                  EConnectivite theConn = eNOD);
-
     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    virtual void GetPolyedreInfo(TPolyedreInfo& theInfo,
-                                TErr* theErr = NULL) {};
-    virtual void SetPolyedreInfo(const TPolyedreInfo& theInfo,
-                                TErr* theErr = NULL) {};
-    virtual TInt GetNbPolyedres(const TMeshInfo& theMeshInfo,
-                               EEntiteMaillage,
-                               EGeometrieElement,
+    virtual 
+    void
+    GetPolyedreInfo(TPolyedreInfo& theInfo,
+                   TErr* theErr = NULL) 
+    {}
+
+    virtual
+    void
+    SetPolyedreInfo(const TPolyedreInfo& theInfo,
+                   TErr* theErr = NULL)
+    {}
+    
+    virtual
+    TInt
+    GetNbPolyedres(const TMeshInfo& theMeshInfo,
+                  EEntiteMaillage,
+                  EGeometrieElement,
                                EConnectivite,
-                               TErr* theErr = NULL) { return 0;};
-
-    virtual void GetNbPolyedreConnF(const TMeshInfo& theMeshInfo,
-                                   EConnectivite theConn,
-                                   TInt& nf,
-                                   TInt& nc,
-                                   TErr* theErr = NULL){};
-    
-    virtual PPolyedreInfo CrPolyedreInfo(const PMeshInfo& theMeshInfo, 
-                                        TInt theNbElem,
-                                        TInt theNbConn,
-                                        TInt theNbFaces,
-                                        EEntiteMaillage theTEntity, 
-                                        EGeometrieElement theTGeom,
-                                        EConnectivite theTConn = eNOD,
-                                        EBooleen theIsElemNum = eVRAI,
-                                        EBooleen theIsElemNames = eVRAI)
+                  TErr* theErr = NULL)
+    { return 0;}
+
+    virtual 
+    void
+    GetNbPolyedreConnF(const TMeshInfo& theMeshInfo,
+                      EConnectivite theConn,
+                      TInt& nf,
+                      TInt& nc,
+                      TErr* theErr = NULL)
+    {}
+    
+    virtual
+    PPolyedreInfo
+    CrPolyedreInfo(const PMeshInfo& theMeshInfo, 
+                  TInt theNbElem,
+                  TInt theNbConn,
+                  TInt theNbFaces,
+                  EEntiteMaillage theTEntity, 
+                  EGeometrieElement theTGeom,
+                  EConnectivite theTConn = eNOD,
+                  EBooleen theIsElemNum = eVRAI,
+                  EBooleen theIsElemNames = eVRAI)
     {
       return PPolyedreInfo();
-    };
-
-    virtual PPolyedreInfo CrPolyedreInfo(const PMeshInfo& theMeshInfo, 
-                                        EEntiteMaillage theTEntity, 
-                                        EGeometrieElement theTGeom,
-                                        EConnectivite theTConn,
-                                        const TIntVector& theConnectivities,
-                                        const TIntVector& theFamilyNums,
-                                        const TIntVector& theElemNums,
-                                        const TStringVector& theElemNames = TStringVector())
+    }
+    
+    virtual
+    PPolyedreInfo
+    CrPolyedreInfo(const PMeshInfo& theMeshInfo, 
+                  EEntiteMaillage theTEntity, 
+                  EGeometrieElement theTGeom,
+                  EConnectivite theTConn,
+                  const TIntVector& theConnectivities,
+                  const TIntVector& theFamilyNums,
+                  const TIntVector& theElemNums,
+                  const TStringVector& theElemNames = TStringVector())
     {
       return PPolyedreInfo();
-    };
+    }
 
-    virtual PPolyedreInfo CrPolyedreInfo(const PMeshInfo& theMeshInfo,
-                                        const PPolyedreInfo& theInfo)
+    virtual
+    PPolyedreInfo
+    CrPolyedreInfo(const PMeshInfo& theMeshInfo,
+                  const PPolyedreInfo& theInfo)
     {
       return PPolyedreInfo();
-    };
+    }
+    
+    PPolyedreInfo
+    GetPPolyedreInfo(const PMeshInfo& theMeshInfo,
+                    EEntiteMaillage theEntity, 
+                    EGeometrieElement theGeom, 
+                    EConnectivite theConn = eNOD);
     
-    PPolyedreInfo GetPPolyedreInfo(const PMeshInfo& theMeshInfo,
-                                  EEntiteMaillage theEntity, 
-                                  EGeometrieElement theGeom, 
-                                  EConnectivite theConn = eNOD);
-
     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    virtual TEntityInfo GetEntityInfo(const TMeshInfo& theMeshInfo,
-                                     EConnectivite theTConn = eNOD,
-                                     TErr* theErr = NULL) = 0;
-    
-    virtual TInt GetNbCells(const TMeshInfo& theMeshInfo, 
-                           EEntiteMaillage, 
-                           EGeometrieElement, 
-                           EConnectivite theTConn = eNOD,
-                           TErr* theErr = NULL) = 0;
-    
-    virtual void GetCellInfo(TCellInfo& theInfo,
-                            TErr* theErr = NULL) = 0;
-
-    virtual void SetCellInfo(const TCellInfo& theInfo,
-                            TErr* theErr = NULL) = 0;
-    
-    virtual PCellInfo CrCellInfo(const PMeshInfo& theMeshInfo, 
-                                TInt theNbElem,
-                                EEntiteMaillage theTEntity, 
-                                EGeometrieElement theTGeom,
-                                EConnectivite theTConn = eNOD,
-                                EBooleen theIsElemNum = eVRAI,
-                                EBooleen theIsElemNames = eVRAI) = 0;
-
-    virtual PCellInfo CrCellInfo(const PMeshInfo& theMeshInfo, 
-                                EEntiteMaillage theTEntity, 
-                                EGeometrieElement theTGeom,
-                                EConnectivite theTConn,
-                                const TIntVector& theConnectivities,
-                                const TIntVector& theFamilyNums,
-                                const TIntVector& theElemNums,
-                                const TStringVector& theElemNames = TStringVector()) = 0;
-
-    virtual PCellInfo CrCellInfo(const PMeshInfo& theMeshInfo,
-                                const PCellInfo& theInfo) = 0;
-
-    PCellInfo GetPCellInfo(const PMeshInfo& theMeshInfo,
-                          EEntiteMaillage theEntity, 
-                          EGeometrieElement theGeom, 
-                          EConnectivite theConn = eNOD);
+    virtual
+    TEntityInfo
+    GetEntityInfo(const TMeshInfo& theMeshInfo,
+                 EConnectivite theTConn = eNOD,
+                 TErr* theErr = NULL) = 0;
+    
+    virtual
+    TInt
+    GetNbCells(const TMeshInfo& theMeshInfo, 
+              EEntiteMaillage, 
+              EGeometrieElement, 
+              EConnectivite theTConn = eNOD,
+              TErr* theErr = NULL) = 0;
+    
+    virtual
+    void
+    GetCellInfo(TCellInfo& theInfo,
+               TErr* theErr = NULL) = 0;
+    
+    virtual 
+    void
+    SetCellInfo(const TCellInfo& theInfo,
+               TErr* theErr = NULL) = 0;
+    
+    virtual
+    PCellInfo
+    CrCellInfo(const PMeshInfo& theMeshInfo, 
+              TInt theNbElem,
+              EEntiteMaillage theTEntity, 
+              EGeometrieElement theTGeom,
+              EConnectivite theTConn = eNOD,
+              EBooleen theIsElemNum = eVRAI,
+              EBooleen theIsElemNames = eVRAI) = 0;
+    
+    virtual
+    PCellInfo
+    CrCellInfo(const PMeshInfo& theMeshInfo, 
+              EEntiteMaillage theTEntity, 
+              EGeometrieElement theTGeom,
+              EConnectivite theTConn,
+              const TIntVector& theConnectivities,
+              const TIntVector& theFamilyNums,
+              const TIntVector& theElemNums,
+              const TStringVector& theElemNames = TStringVector()) = 0;
+    
+    virtual
+    PCellInfo
+    CrCellInfo(const PMeshInfo& theMeshInfo,
+              const PCellInfo& theInfo) = 0;
+    
+    PCellInfo
+    GetPCellInfo(const PMeshInfo& theMeshInfo,
+                EEntiteMaillage theEntity, 
+                EGeometrieElement theGeom, 
+                EConnectivite theConn = eNOD,
+                TErr* theErr = NULL);
 
 
     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    virtual TInt GetNbFields(TErr* theErr = NULL) = 0;
+    virtual 
+    TInt
+    GetNbFields(TErr* theErr = NULL) = 0;
     
-    virtual TInt GetNbComp(TInt theFieldId,
-                          TErr* theErr = NULL) = 0;
+    virtual
+    TInt
+    GetNbComp(TInt theFieldId,
+             TErr* theErr = NULL) = 0;
     
-    virtual void GetFieldInfo(TInt theFieldId, 
-                             TFieldInfo& theInfo,
-                             TErr* theErr = NULL) = 0;
-
-    virtual void SetFieldInfo(const TFieldInfo& theInfo,
-                             TErr* theErr = NULL) = 0;
+    virtual 
+    void
+    GetFieldInfo(TInt theFieldId, 
+                TFieldInfo& theInfo,
+                TErr* theErr = NULL) = 0;
+
+    virtual 
+    void
+    SetFieldInfo(const TFieldInfo& theInfo,
+                TErr* theErr = NULL) = 0;
     
 
-    virtual PFieldInfo CrFieldInfo(const PMeshInfo& theMeshInfo, 
-                                  TInt theNbComp = 0,
-                                  ETypeChamp theType = eFLOAT64,
-                                  const std::string& theValue = "",
-                                  EBooleen theIsLocal = eVRAI,
-                                  TInt theNbRef = 1) = 0;
-
-    virtual PFieldInfo CrFieldInfo(const PMeshInfo& theMeshInfo,
-                                  const PFieldInfo& theInfo) = 0;
-
-    PFieldInfo GetPFieldInfo(const PMeshInfo& theMeshInfo, TInt theId);
+    virtual 
+    PFieldInfo
+    CrFieldInfo(const PMeshInfo& theMeshInfo, 
+               TInt theNbComp = 0,
+               ETypeChamp theType = eFLOAT64,
+               const std::string& theValue = "",
+               EBooleen theIsLocal = eVRAI,
+               TInt theNbRef = 1) = 0;
+
+    virtual 
+    PFieldInfo
+    CrFieldInfo(const PMeshInfo& theMeshInfo,
+               const PFieldInfo& theInfo) = 0;
+    
+    PFieldInfo
+    GetPFieldInfo(const PMeshInfo& theMeshInfo, 
+                 TInt theId,
+                 TErr* theErr = NULL);
 
 
     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    virtual TInt GetNbTimeStamps(const TFieldInfo& theInfo, 
-                                const TEntityInfo& theEntityInfo,
-                                EEntiteMaillage& theEntity,
-                                TGeom& theGeom,
-                                TErr* theErr = NULL) = 0;
-    
-    virtual void GetTimeStampInfo(TInt theTimeStampId, 
-                                 TTimeStampInfo& theInfo,
-                                 TErr* theErr = NULL) = 0;
-
-    virtual PTimeStampInfo CrTimeStampInfo(const PFieldInfo& theFieldInfo, 
-                                          EEntiteMaillage theEntity,
-                                          const TGeom& theGeom,
-                                          TInt theNbGauss = 0,
-                                          TInt theNumDt = 0,
-                                          TInt theNumOrd = 0,
-                                          TFloat theDt = 0,
-                                          const std::string& theUnitDt = "",
-                                          const std::string& theGaussName = "") = 0;
-
-    virtual PTimeStampInfo CrTimeStampInfo(const PFieldInfo& theFieldInfo,
-                                          const PTimeStampInfo& theInfo) = 0;
-
-    PTimeStampInfo GetPTimeStampInfo(const PFieldInfo& theFieldInfo,
-                                    EEntiteMaillage theEntity,
-                                    const MED::TGeom& theGeom,
-                                    TInt theId);
+    virtual 
+    TInt
+    GetNbTimeStamps(const TFieldInfo& theInfo, 
+                   const TEntityInfo& theEntityInfo,
+                   EEntiteMaillage& theEntity,
+                   TGeom& theGeom,
+                   TErr* theErr = NULL) = 0;
+    
+    virtual 
+    void
+    GetTimeStampInfo(TInt theTimeStampId, 
+                    TTimeStampInfo& theInfo,
+                    TErr* theErr = NULL) = 0;
+
+    virtual 
+    PTimeStampInfo
+    CrTimeStampInfo(const PFieldInfo& theFieldInfo, 
+                   EEntiteMaillage theEntity,
+                   const TGeom& theGeom,
+                   TInt theNbGauss = 0,
+                   TInt theNumDt = 0,
+                   TInt theNumOrd = 0,
+                   TFloat theDt = 0,
+                   const std::string& theUnitDt = "",
+                   const std::string& theGaussName = "") = 0;
+
+    virtual 
+    PTimeStampInfo 
+    CrTimeStampInfo(const PFieldInfo& theFieldInfo,
+                   const PTimeStampInfo& theInfo) = 0;
+    
+    PTimeStampInfo
+    GetPTimeStampInfo(const PFieldInfo& theFieldInfo,
+                     EEntiteMaillage theEntity,
+                     const MED::TGeom& theGeom,
+                     TInt theId,
+                     TErr* theErr = NULL);
     
 
     //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    virtual void GetTimeStampVal(TTimeStampVal& theVal,
-                                TErr* theErr = NULL) = 0;
+    virtual 
+    void
+    GetTimeStampVal(TTimeStampVal& theVal,
+                   TErr* theErr = NULL) = 0;
     
-    virtual void SetTimeStamp(const TTimeStampVal& theTimeStampVal,
-                             TErr* theErr = NULL) = 0;
-
-    virtual PTimeStampVal CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo,
-                                        const std::string& thePflName = "",
-                                        EModeProfil thePflMode = eCOMPACT) = 0;
-
-    virtual PTimeStampVal CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo,
-                                        const PTimeStampVal& theInfo) = 0;
-
-    PTimeStampVal GetPTimeStampVal(const PTimeStampInfo& theTimeStampInfo);
+    virtual 
+    void
+    SetTimeStamp(const TTimeStampVal& theTimeStampVal,
+                TErr* theErr = NULL) = 0;
+    
+    virtual
+    PTimeStampVal
+    CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo,
+                  const std::string& thePflName = "",
+                  EModeProfil thePflMode = eCOMPACT) = 0;
+
+    virtual 
+    PTimeStampVal
+    CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo,
+                  const PTimeStampVal& theInfo) = 0;
+    
+    PTimeStampVal
+    GetPTimeStampVal(const PTimeStampInfo& theTimeStampInfo,
+                    TErr* theErr = NULL);
 
   };
 
index 3bdb2ae72ac56d461e0f65f859f92c3b3d694e91..ba2116894ff4b47d204227fb92afc284b9c0c1db 100644 (file)
@@ -33,8 +33,6 @@
 
 namespace MED{
 
-  enum EVersion {eVUnknown = -1, eV2_1, eV2_2};
-
   EVersion GetVersionId(const std::string& theFileName);
 
   PWrapper CrWrapper(const std::string& theFileName);
index 50dcd0499dcd06498fc13a3e6bd9aea51b204c24..2167c17cb8a6c92327f4dc46dd841f7c635209fa 100644 (file)
@@ -166,6 +166,9 @@ void CopyMed(const PWrapper& theMed,
       TInt aNbGroup = aFamilyInfo->GetNbGroup();
       TInt aNbAttr = aFamilyInfo->GetNbAttr();
       TInt anId = aFamilyInfo->GetId();
+      if(anId == 0)
+       continue;
+
       aName = aFamilyInfo->GetName();
       INITMSG(MYDEBUG,"aName = '"<<aName<<"'; anId = "<<anId<<
              "; aNbAttr = "<<aNbAttr<<"; aNbGroup = "<<aNbGroup<<"\n");
@@ -193,17 +196,6 @@ void CopyMed(const PWrapper& theMed,
       INITMSG(MYDEBUG,"anEntity = "<<anEntity<<"\n");
       if(anEntity == eNOEUD){
        PNodeInfo aNodeInfo = theMed->GetPNodeInfo(aMeshInfo);
-       TInt aNbNodes = aNodeInfo->GetNbElem();
-       INITMSG(MYDEBUG,"GetNodeInfo - aNbNodes = "<<aNbNodes<<": ");
-       TNodeCoord& aCoord = aNodeInfo->myCoord;
-       for(TInt iNode = 0; iNode < aNbNodes; iNode++){
-         for(TInt iDim = 0, anId = iNode*aDim; iDim < aDim; iDim++, anId++){
-           ADDMSG(MYVALUEDEBUG,aCoord[anId]<<",");
-           aCoord[anId] += theIncr;
-         }
-         ADDMSG(MYVALUEDEBUG," ");
-       }
-       ADDMSG(MYDEBUG,endl);
        PNodeInfo aNodeInfo2 = theMed->CrNodeInfo(aMeshInfo2,aNodeInfo);
        if(MYWRITEDEBUG) theMed2->SetNodeInfo(aNodeInfo2);
        continue;
@@ -268,15 +260,7 @@ void CopyMed(const PWrapper& theMed,
          }
        default:
          PCellInfo aCellInfo = theMed->GetPCellInfo(aMeshInfo,anEntity,aGeom);
-         TInt aConnDim = aCellInfo->GetConnDim();
-         for(TInt iElem = 0; iElem < aNbElem; iElem++){
-           for(TInt iConn = 0; iConn < aConnDim; iConn++){
-             ADDMSG(MYVALUEDEBUG,aCellInfo->GetConn(iElem,iConn)<<",");
-           }
-           ADDMSG(MYVALUEDEBUG," ");
-         }
-         ADDMSG(MYDEBUG,endl);
-         PCellInfo aCellInfo2 = theMed->CrCellInfo(aMeshInfo2,aCellInfo);
+         PCellInfo aCellInfo2 = theMed2->CrCellInfo(aMeshInfo2,aCellInfo);
          if(MYWRITEDEBUG) theMed2->SetCellInfo(aCellInfo2);
        }
       }
@@ -292,7 +276,7 @@ void CopyMed(const std::string& theFileName,
             MED::EVersion theVersion,
             int theNbCopy)
 {
-  MSG(MYDEBUG,"CopyMed - theFileName = '"<<theFileName<<"'; theFileName2 = '"<<theFileName2<<"'");
+  MSG(MYDEBUG,"CopyMed - theFileName = '"<<theFileName<<"'; theFileName2 = '"<<theFileName2<<"', theVersion = "<<theVersion);
 
   PWrapper aMed = CrWrapper(theFileName);
 
@@ -331,7 +315,7 @@ int main(int argc, char** argv){
   }catch(std::exception& exc){
     MSG(MYDEBUG,"Follow exception was accured :\n"<<exc.what());
   }catch(...){
-    MSG(MYDEBUG,"Unknown exception was accured in VISU_Convertor_impl");
+    MSG(MYDEBUG,"Unknown exception was accured");
   } 
   return 1;
 }
index 7314d386bcc261ecdbb377f0de518e7b3cf6efa3..0b903b74e42f34058a318b61fedee30037238601 100644 (file)
@@ -36,19 +36,19 @@ namespace MED{
 
     const TInt PNOM = 8;
 
-    typedef MED::TTMeshInfo<PNOM,DESC,IDENT,NOM,LNOM> TVMeshInfo;
+    typedef MED::TTMeshInfo<PNOM,DESC,IDENT,NOM,LNOM,eV2_1> TVMeshInfo;
 
-    typedef MED::TTFamilyInfo<PNOM,DESC,IDENT,NOM,LNOM> TVFamilyInfo;
+    typedef MED::TTFamilyInfo<PNOM,DESC,IDENT,NOM,LNOM,eV2_1> TVFamilyInfo;
 
-    typedef MED::TTNodeInfo<PNOM,DESC,IDENT,NOM,LNOM> TVNodeInfo;
+    typedef MED::TTNodeInfo<PNOM,DESC,IDENT,NOM,LNOM,eV2_1> TVNodeInfo;
 
-    typedef MED::TTCellInfo<PNOM,DESC,IDENT,NOM,LNOM> TVCellInfo;
+    typedef MED::TTCellInfo<PNOM,DESC,IDENT,NOM,LNOM,eV2_1> TVCellInfo;
 
-    typedef MED::TTFieldInfo<PNOM,DESC,IDENT,NOM,LNOM> TVFieldInfo;
+    typedef MED::TTFieldInfo<PNOM,DESC,IDENT,NOM,LNOM,eV2_1> TVFieldInfo;
 
-    typedef MED::TTTimeStampInfo<PNOM,DESC,IDENT,NOM,LNOM> TVTimeStampInfo;
+    typedef MED::TTTimeStampInfo<PNOM,DESC,IDENT,NOM,LNOM,eV2_1> TVTimeStampInfo;
 
-    typedef MED::TTTimeStampVal<PNOM,DESC,IDENT,NOM,LNOM> TVTimeStampVal;
+    typedef MED::TTTimeStampVal<PNOM,DESC,IDENT,NOM,LNOM,eV2_1> TVTimeStampVal;
 
     //---------------------------------------------------------------
     class TFile;
@@ -57,7 +57,8 @@ namespace MED{
     typedef enum {eLECT, eECRI, eREMP} EModeAcces; 
 
     //---------------------------------------------------------------
-    class TVWrapper: public MED::TTWrapper<PNOM,DESC,IDENT,NOM,LNOM>{
+    class TVWrapper: public MED::TTWrapper<PNOM,DESC,IDENT,NOM,LNOM,eV2_1>
+    {
       TVWrapper();
       TVWrapper(const TVWrapper&);
       TVWrapper& operator=(const TVWrapper&);
index ac113af85d5cde4249dce2df5c985734d668b604..6adcab87c2ad9e9c5f3f8ab48c212224367fd35d 100644 (file)
@@ -37,19 +37,19 @@ namespace MED{
 
     const TInt PNOM = 16;
 
-    typedef MED::TTMeshInfo<PNOM,DESC,IDENT,NOM,LNOM> TVMeshInfo;
+    typedef MED::TTMeshInfo<PNOM,DESC,IDENT,NOM,LNOM,eV2_2> TVMeshInfo;
 
-    typedef MED::TTFamilyInfo<PNOM,DESC,IDENT,NOM,LNOM> TVFamilyInfo;
+    typedef MED::TTFamilyInfo<PNOM,DESC,IDENT,NOM,LNOM,eV2_2> TVFamilyInfo;
 
-    typedef MED::TTNodeInfo<PNOM,DESC,IDENT,NOM,LNOM> TVNodeInfo;
+    typedef MED::TTNodeInfo<PNOM,DESC,IDENT,NOM,LNOM,eV2_2> TVNodeInfo;
 
-    typedef MED::TTCellInfo<PNOM,DESC,IDENT,NOM,LNOM> TVCellInfo;
+    typedef MED::TTCellInfo<PNOM,DESC,IDENT,NOM,LNOM,eV2_2> TVCellInfo;
 
-    typedef MED::TTFieldInfo<PNOM,DESC,IDENT,NOM,LNOM> TVFieldInfo;
+    typedef MED::TTFieldInfo<PNOM,DESC,IDENT,NOM,LNOM,eV2_2> TVFieldInfo;
 
-    typedef MED::TTTimeStampInfo<PNOM,DESC,IDENT,NOM,LNOM> TVTimeStampInfo;
+    typedef MED::TTTimeStampInfo<PNOM,DESC,IDENT,NOM,LNOM,eV2_2> TVTimeStampInfo;
 
-    typedef MED::TTTimeStampVal<PNOM,DESC,IDENT,NOM,LNOM> TVTimeStampVal;
+    typedef MED::TTTimeStampVal<PNOM,DESC,IDENT,NOM,LNOM,eV2_2> TVTimeStampVal;
 
     //---------------------------------------------------------------
     class TFile;
@@ -58,7 +58,7 @@ namespace MED{
     typedef enum {eLECTURE, eLECTURE_ECRITURE, eLECTURE_AJOUT, eCREATION} EModeAcces; 
 
     //---------------------------------------------------------------
-    class TVWrapper: public MED::TTWrapper<PNOM,DESC,IDENT,NOM,LNOM>{
+    class TVWrapper: public MED::TTWrapper<PNOM,DESC,IDENT,NOM,LNOM,eV2_2>{
       TVWrapper();
       TVWrapper(const TVWrapper&);
       TVWrapper& operator=(const TVWrapper&);
@@ -67,164 +67,233 @@ namespace MED{
       TVWrapper(const std::string& theFileName);
 
       //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-      virtual TInt GetNbMeshes(TErr* theErr = NULL);
+      virtual 
+      TInt
+      GetNbMeshes(TErr* theErr = NULL);
       
-      virtual void GetMeshInfo(TInt theMeshId, MED::TMeshInfo&,
+      virtual
+      void
+      GetMeshInfo(TInt theMeshId, MED::TMeshInfo&,
                               TErr* theErr = NULL);
 
-      virtual void SetMeshInfo(const MED::TMeshInfo& theInfo,
-                              TErr* theErr = NULL);
+      virtual
+      void
+      SetMeshInfo(const MED::TMeshInfo& theInfo,
+                 TErr* theErr = NULL);
       
       void SetMeshInfo(const MED::TMeshInfo& theInfo,
                       EModeAcces theMode,
                       TErr* theErr = NULL);
-
+      
       
       //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-      virtual TInt GetNbFamilies(const MED::TMeshInfo& theMeshInfo,
-                                TErr* theErr = NULL);
-
-      virtual TInt GetNbFamAttr(TInt theFamId, 
-                               const MED::TMeshInfo& theInfo,
-                               TErr* theErr = NULL);
-
-      virtual TInt GetNbFamGroup(TInt theFamId, 
-                                const MED::TMeshInfo& theInfo,
-                                TErr* theErr = NULL);
+      virtual
+      TInt
+      GetNbFamilies(const MED::TMeshInfo& theMeshInfo,
+                   TErr* theErr = NULL);
+
+      virtual 
+      TInt
+      GetNbFamAttr(TInt theFamId, 
+                  const MED::TMeshInfo& theInfo,
+                  TErr* theErr = NULL);
       
-      virtual void GetFamilyInfo(TInt theFamId, 
-                                MED::TFamilyInfo& theInfo,
-                                TErr* theErr = NULL);
-
-      virtual void SetFamilyInfo(const MED::TFamilyInfo& theInfo,
-                                TErr* theErr = NULL);
+      virtual
+      TInt
+      GetNbFamGroup(TInt theFamId, 
+                   const MED::TMeshInfo& theInfo,
+                   TErr* theErr = NULL);
+      
+      virtual
+      void
+      GetFamilyInfo(TInt theFamId, 
+                   MED::TFamilyInfo& theInfo,
+                   TErr* theErr = NULL);
+      
+      virtual
+      void
+      SetFamilyInfo(const MED::TFamilyInfo& theInfo,
+                   TErr* theErr = NULL);
+      
+      void 
+      SetFamilyInfo(const MED::TFamilyInfo& theInfo,
+                   EModeAcces theMode,
+                   TErr* theErr = NULL);
       
-      void SetFamilyInfo(const MED::TFamilyInfo& theInfo,
-                        EModeAcces theMode,
-                        TErr* theErr = NULL);
-
       
       //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-      virtual TInt GetNbNodes(const MED::TMeshInfo& theMeshInfo,
-                             TErr* theErr = NULL);
+      virtual
+      TInt
+      GetNbNodes(const MED::TMeshInfo& theMeshInfo,
+                TErr* theErr = NULL);
       
-      virtual void GetNodeInfo(MED::TNodeInfo& theInfo,
-                              TErr* theErr = NULL);
-
-      virtual void SetNodeInfo(const MED::TNodeInfo& theInfo,
-                              TErr* theErr = NULL);
+      virtual 
+      void
+      GetNodeInfo(MED::TNodeInfo& theInfo,
+                 TErr* theErr = NULL);
+      
+      virtual
+      void
+      SetNodeInfo(const MED::TNodeInfo& theInfo,
+                 TErr* theErr = NULL);
+      
+      void
+      SetNodeInfo(const MED::TNodeInfo& theInfo,
+                 EModeAcces theMode,
+                 TErr* theErr = NULL);
       
-      void SetNodeInfo(const MED::TNodeInfo& theInfo,
-                      EModeAcces theMode,
-                      TErr* theErr = NULL);
-
       //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-      virtual void GetPolygoneInfo(TPolygoneInfo& theInfo,
-                                  TErr* theErr = NULL);
-
-      virtual void SetPolygoneInfo(const TPolygoneInfo& theInfo,
+      virtual
+      void
+      GetPolygoneInfo(TPolygoneInfo& theInfo,
+                     TErr* theErr = NULL);
+
+      virtual 
+      void
+      SetPolygoneInfo(const TPolygoneInfo& theInfo,
                                   TErr* theErr = NULL);
       
-      void SetPolygoneInfo(const MED::TPolygoneInfo& theInfo,
-                      EModeAcces theMode,
-                      TErr* theErr = NULL);
-
-      virtual TInt GetNbPolygones(const TMeshInfo& theMeshInfo,
-                                 EEntiteMaillage,
-                                 EGeometrieElement,
-                                 EConnectivite,
-                                 TErr* theErr = NULL);
+      void
+      SetPolygoneInfo(const MED::TPolygoneInfo& theInfo,
+                     EModeAcces theMode,
+                     TErr* theErr = NULL);
+
+      virtual 
+      TInt
+      GetNbPolygones(const TMeshInfo& theMeshInfo,
+                    EEntiteMaillage,
+                    EGeometrieElement,
+                    EConnectivite,
+                    TErr* theErr = NULL);
       
-      virtual TInt GetNbPolygoneConn(const TMeshInfo& theMeshInfo,
-                                    EEntiteMaillage,
-                                    EGeometrieElement,
-                                    EConnectivite,
-                                    TErr* theErr = NULL);
+      virtual 
+      TInt
+      GetNbPolygoneConn(const TMeshInfo& theMeshInfo,
+                       EEntiteMaillage,
+                       EGeometrieElement,
+                       EConnectivite,
+                       TErr* theErr = NULL);
 
       //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-      virtual void GetPolyedreInfo(TPolyedreInfo& theInfo,
-                                  TErr* theErr = NULL);
-
-      virtual void SetPolyedreInfo(const TPolyedreInfo& theInfo,
-                                  TErr* theErr = NULL);
+      virtual 
+      void
+      GetPolyedreInfo(TPolyedreInfo& theInfo,
+                     TErr* theErr = NULL);
       
-      void SetPolyedreInfo(const MED::TPolyedreInfo& theInfo,
-                          EModeAcces theMode,
-                          TErr* theErr = NULL);
-
-      virtual TInt GetNbPolyedres(const TMeshInfo& theMeshInfo,
-                                 EEntiteMaillage,
-                                 EGeometrieElement,
-                                 EConnectivite,
-                                 TErr* theErr = NULL);
+      virtual
+      void
+      SetPolyedreInfo(const TPolyedreInfo& theInfo,
+                     TErr* theErr = NULL);
+      
+      void
+      SetPolyedreInfo(const MED::TPolyedreInfo& theInfo,
+                     EModeAcces theMode,
+                     TErr* theErr = NULL);
       
-      virtual void GetNbPolyedreConnF(const TMeshInfo& theMeshInfo,
-                                     EConnectivite,
-                                     TInt& nf,
-                                     TInt& nc,
-                                     TErr* theErr = NULL);
+      virtual
+      TInt
+      GetNbPolyedres(const TMeshInfo& theMeshInfo,
+                    EEntiteMaillage,
+                    EGeometrieElement,
+                    EConnectivite,
+                    TErr* theErr = NULL);
+      
+      virtual 
+      void
+      GetNbPolyedreConnF(const TMeshInfo& theMeshInfo,
+                        EConnectivite,
+                        TInt& nf,
+                        TInt& nc,
+                        TErr* theErr = NULL);
       
       //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-      virtual TEntityInfo GetEntityInfo(const MED::TMeshInfo& theMeshInfo,
-                                       EConnectivite theTConn = eNOD,
-                                       TErr* theErr = NULL);
+      virtual
+      TEntityInfo
+      GetEntityInfo(const MED::TMeshInfo& theMeshInfo,
+                   EConnectivite theTConn = eNOD,
+                   TErr* theErr = NULL);
       
-      virtual TInt GetNbCells(const MED::TMeshInfo& theMeshInfo, 
-                             EEntiteMaillage, 
-                             EGeometrieElement, 
-                             EConnectivite theTConn = eNOD,
-                             TErr* theErr = NULL);
+      virtual 
+      TInt
+      GetNbCells(const MED::TMeshInfo& theMeshInfo, 
+                EEntiteMaillage, 
+                EGeometrieElement, 
+                EConnectivite theTConn = eNOD,
+                TErr* theErr = NULL);
       
-      virtual void GetCellInfo(MED::TCellInfo& theInfo,
-                              TErr* theErr = NULL);
-
-      virtual void SetCellInfo(const MED::TCellInfo& theInfo,
-                              TErr* theErr = NULL);
+      virtual
+      void
+      GetCellInfo(MED::TCellInfo& theInfo,
+                 TErr* theErr = NULL);
+
+      virtual 
+      void
+      SetCellInfo(const MED::TCellInfo& theInfo,
+                 TErr* theErr = NULL);
+      
+      void 
+      SetCellInfo(const MED::TCellInfo& theInfo,
+                 EModeAcces theMode,
+                 TErr* theErr = NULL);
       
-      void SetCellInfo(const MED::TCellInfo& theInfo,
-                      EModeAcces theMode,
-                      TErr* theErr = NULL);
-
       
       //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-      virtual TInt GetNbFields(TErr* theErr = NULL);
+      virtual
+      TInt
+      GetNbFields(TErr* theErr = NULL);
       
-      virtual TInt GetNbComp(TInt theFieldId,
-                            TErr* theErr = NULL);
+      virtual
+      TInt
+      GetNbComp(TInt theFieldId,
+               TErr* theErr = NULL);
       
-      virtual void GetFieldInfo(TInt theFieldId, 
-                               MED::TFieldInfo& theInfo,
-                               TErr* theErr = NULL);
-
-      virtual void SetFieldInfo(const MED::TFieldInfo& theInfo,
-                               TErr* theErr = NULL);
+      virtual 
+      void
+      GetFieldInfo(TInt theFieldId, 
+                  MED::TFieldInfo& theInfo,
+                  TErr* theErr = NULL);
+      
+      virtual
+      void
+      SetFieldInfo(const MED::TFieldInfo& theInfo,
+                  TErr* theErr = NULL);
+      
+      void
+      SetFieldInfo(const MED::TFieldInfo& theInfo,
+                  EModeAcces theMode,
+                  TErr* theErr = NULL);
       
-      void SetFieldInfo(const MED::TFieldInfo& theInfo,
-                       EModeAcces theMode,
-                       TErr* theErr = NULL);
-
       
       //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-      virtual TInt GetNbTimeStamps(const MED::TFieldInfo& theInfo, 
-                                  const MED::TEntityInfo& theEntityInfo,
-                                  EEntiteMaillage& theEntity,
-                                  TGeom& theGeom,
-                                  TErr* theErr = NULL);
+      virtual 
+      TInt
+      GetNbTimeStamps(const MED::TFieldInfo& theInfo, 
+                     const MED::TEntityInfo& theEntityInfo,
+                     EEntiteMaillage& theEntity,
+                     TGeom& theGeom,
+                     TErr* theErr = NULL);
       
-      virtual void GetTimeStampInfo(TInt theTimeStampId, 
-                                   MED::TTimeStampInfo& theInfo,
-                                   TErr* theErr = NULL);
-
-      virtual void GetTimeStampVal(MED::TTimeStampVal& theVal,
-                                  TErr* theErr = NULL);
+      virtual 
+      void
+      GetTimeStampInfo(TInt theTimeStampId, 
+                      MED::TTimeStampInfo& theInfo,
+                      TErr* theErr = NULL);
       
-      virtual void SetTimeStamp(const MED::TTimeStampVal& theTimeStampVal,
-                               TErr* theErr = NULL);
+      virtual
+      void
+      GetTimeStampVal(MED::TTimeStampVal& theVal,
+                     TErr* theErr = NULL);
+      
+      virtual
+      void
+      SetTimeStamp(const MED::TTimeStampVal& theTimeStampVal,
+                  TErr* theErr = NULL);
+      
+      void 
+      SetTimeStamp(const MED::TTimeStampVal& theTimeStampVal,
+                  EModeAcces theMode,
+                  TErr* theErr = NULL);
       
-      void SetTimeStamp(const MED::TTimeStampVal& theTimeStampVal,
-                       EModeAcces theMode,
-                       TErr* theErr = NULL);
-
     protected:
       PFile myFile;
     };