Back to index

salome-med  6.5.0
Public Member Functions | Protected Attributes | Private Member Functions
MED::V2_1::TFile Class Reference
Collaboration diagram for MED::V2_1::TFile:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TFile (const std::string &theFileName)
 ~TFile ()
void Open (EModeAcces theMode, TErr *theErr=NULL)
const TIdtId () const
void Close ()

Protected Attributes

std::string myFileName
TInt myCount
TIdt myFid

Private Member Functions

 TFile ()
 TFile (const TFile &)

Detailed Description

Definition at line 114 of file MED_V2_1_Wrapper.cxx.


Constructor & Destructor Documentation

MED::V2_1::TFile::TFile ( ) [private]
MED::V2_1::TFile::TFile ( const TFile ) [private]
MED::V2_1::TFile::TFile ( const std::string &  theFileName) [inline]

Definition at line 119 of file MED_V2_1_Wrapper.cxx.

                                         : 
        myFid(-1), 
        myCount(0),
        myFileName(theFileName)
      {}

Definition at line 125 of file MED_V2_1_Wrapper.cxx.

      { 
        Close();
      }

Member Function Documentation

void MED::V2_1::TFile::Close ( ) [inline]

Definition at line 151 of file MED_V2_1_Wrapper.cxx.

      { 
        if(--myCount == 0)
          MEDfermer(myFid);
      }

Here is the call graph for this function:

const TIdt& MED::V2_1::TFile::Id ( ) const [inline]

Definition at line 144 of file MED_V2_1_Wrapper.cxx.

      { 
        if(myFid < 0)
          EXCEPTION(std::runtime_error, "TFile - GetFid() < 0");
        return myFid;
      }
void MED::V2_1::TFile::Open ( EModeAcces  theMode,
TErr theErr = NULL 
) [inline]

Definition at line 131 of file MED_V2_1_Wrapper.cxx.

      {
        if(myCount++ == 0){
          char* aFileName = const_cast<char*>(myFileName.c_str());
          myFid = MEDouvrir(aFileName,med_mode_acces(theMode));
        }
        if(theErr){
          *theErr = TErr(myFid);
          INITMSG(MYDEBUG && myFid < 0,"TFile::Open - MED_MODE_ACCES = "<<theMode<<"; myFid = "<<myFid<<std::endl);
        }else if(myFid < 0)
          EXCEPTION(std::runtime_error, "TFile - MEDouvrir('"<<myFileName<<"',"<<theMode<<")");
      }

Here is the call graph for this function:


Member Data Documentation

Definition at line 159 of file MED_V2_1_Wrapper.cxx.

Definition at line 160 of file MED_V2_1_Wrapper.cxx.

std::string MED::V2_1::TFile::myFileName [protected]

Definition at line 158 of file MED_V2_1_Wrapper.cxx.


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