Back to index

salome-med  6.5.0
Public Member Functions
MED::TTElemInfo< eVersion > Struct Template Reference

#include <MED_TStructures.hxx>

Inheritance diagram for MED::TTElemInfo< eVersion >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 TTElemInfo (const PMeshInfo &theMeshInfo, const PElemInfo &theInfo)
 TTElemInfo (const PMeshInfo &theMeshInfo, TInt theNbElem, EBooleen theIsElemNum, EBooleen theIsElemNames)
 TTElemInfo (const PMeshInfo &theMeshInfo, TInt theNbElem, const TIntVector &theFamilyNums, const TIntVector &theElemNums, const TStringVector &theElemNames)
virtual std::string GetElemName (TInt theId) const
virtual void SetElemName (TInt theId, const std::string &theValue)

Detailed Description

template<EVersion eVersion>
struct MED::TTElemInfo< eVersion >

Definition at line 304 of file MED_TStructures.hxx.


Constructor & Destructor Documentation

template<EVersion eVersion>
MED::TTElemInfo< eVersion >::TTElemInfo ( const PMeshInfo theMeshInfo,
const PElemInfo theInfo 
) [inline]

Definition at line 306 of file MED_TStructures.hxx.

    {
      myMeshInfo = theMeshInfo;
      
      myNbElem = theInfo->GetNbElem();
      myFamNum.reset(new TElemNum(myNbElem));
      myIsFamNum = eFAUX; // is set to eVRAI in SetFamNum()

      myIsElemNum = theInfo->IsElemNum();
      if(theInfo->IsElemNum())
        myElemNum.reset(new TElemNum(myNbElem));
      else
        myElemNum.reset(new TElemNum());

      myIsElemNames = theInfo->IsElemNames();
      if(theInfo->IsElemNames())
        myElemNames.reset(new TString(myNbElem*GetPNOMLength<eVersion>() + 1));
      else
        myElemNames.reset(new TString());

      if(theInfo->GetNbElem()){
        for(TInt anId = 0; anId < myNbElem; anId++){
          SetFamNum(anId, theInfo->GetFamNum(anId));
        }
        if(theInfo->IsElemNum() == eVRAI){
          for(TInt anId = 0; anId < myNbElem; anId++){
            SetElemNum(anId, theInfo->GetElemNum(anId));
          }
        }
        if(theInfo->IsElemNames() == eVRAI){
          for(TInt anId = 0; anId < myNbElem; anId++){
            SetElemName(anId,theInfo->GetElemName(anId));
          }
        }
      }
    }

Here is the call graph for this function:

template<EVersion eVersion>
MED::TTElemInfo< eVersion >::TTElemInfo ( const PMeshInfo theMeshInfo,
TInt  theNbElem,
EBooleen  theIsElemNum,
EBooleen  theIsElemNames 
) [inline]

Definition at line 343 of file MED_TStructures.hxx.

    {
      myMeshInfo = theMeshInfo;

      myNbElem = theNbElem;
      myFamNum.reset(new TElemNum(theNbElem));
      myIsFamNum = eFAUX; // is set to eVRAI in SetFamNum()

      myIsElemNum = theIsElemNum;
      if(theIsElemNum)
        myElemNum.reset(new TElemNum(theNbElem));
      else
        myElemNum.reset(new TElemNum());

      myIsElemNames = theIsElemNames;
      if(theIsElemNames)
        myElemNames.reset(new TString(theNbElem*GetPNOMLength<eVersion>() + 1));
      else
        myElemNames.reset(new TString());
   }
template<EVersion eVersion>
MED::TTElemInfo< eVersion >::TTElemInfo ( const PMeshInfo theMeshInfo,
TInt  theNbElem,
const TIntVector theFamilyNums,
const TIntVector theElemNums,
const TStringVector theElemNames 
) [inline]

Definition at line 367 of file MED_TStructures.hxx.

    {
      myMeshInfo = theMeshInfo;
      
      myNbElem = theNbElem;
      myFamNum.reset(new TElemNum(theNbElem));
      myIsFamNum = eFAUX; // is set to eVRAI in SetFamNum()
      
      myIsElemNum = theElemNums.size()? eVRAI: eFAUX;
      if(myIsElemNum)
        myElemNum.reset(new TElemNum(theNbElem));
      else
        myElemNum.reset(new TElemNum());
      
      myIsElemNames = theElemNames.size()? eVRAI: eFAUX;
      if(myIsElemNames)
        myElemNames.reset(new TString(theNbElem*GetPNOMLength<eVersion>() + 1));
      else
        myElemNames.reset(new TString());
     
      if(theNbElem){

        if(theFamilyNums.size())
          *myFamNum = theFamilyNums;

        if(myIsElemNum)
          *myElemNum = theElemNums;

        if(myIsElemNames){
          for(TInt anId = 0; anId < theNbElem; anId++){
            const std::string& aVal = theElemNames[anId];
            SetElemName(anId,aVal);
          }
        }
      }
    }

Here is the call graph for this function:


Member Function Documentation

template<EVersion eVersion>
virtual std::string MED::TTElemInfo< eVersion >::GetElemName ( TInt  theId) const [inline, virtual]

Definition at line 410 of file MED_TStructures.hxx.

    { 
      return GetString(theId,GetPNOMLength<eVersion>(), *myElemNames);
    }

Here is the call graph for this function:

template<EVersion eVersion>
virtual void MED::TTElemInfo< eVersion >::SetElemName ( TInt  theId,
const std::string &  theValue 
) [inline, virtual]

Definition at line 417 of file MED_TStructures.hxx.

    {
      SetString(theId,GetPNOMLength<eVersion>(), *myElemNames, theValue);
    }

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this struct was generated from the following file: