Back to index

salome-med  6.5.0
Public Member Functions | Protected Attributes | Private Member Functions
MED::V2_2::TFile Class Reference
Collaboration diagram for MED::V2_2::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

TInt myCount
TIdt myFid
std::string myFileName

Private Member Functions

 TFile ()
 TFile (const TFile &)

Detailed Description

Definition at line 105 of file MED_V2_2_Wrapper.cxx.


Constructor & Destructor Documentation

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

Definition at line 110 of file MED_V2_2_Wrapper.cxx.

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

Definition at line 116 of file MED_V2_2_Wrapper.cxx.

      { 
        Close();
      }

Here is the call graph for this function:


Member Function Documentation

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

Definition at line 141 of file MED_V2_2_Wrapper.cxx.

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

Here is the caller graph for this function:

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

Definition at line 134 of file MED_V2_2_Wrapper.cxx.

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

Definition at line 122 of file MED_V2_2_Wrapper.cxx.

      {
        if(myCount++ == 0){
          const char* aFileName = myFileName.c_str();
          myFid = MEDfileOpen(aFileName,med_access_mode(theMode));
        }
        if(theErr)
          *theErr = TErr(myFid);
        else if(myFid < 0)
          EXCEPTION(std::runtime_error,"TFile - MEDfileOpen('"<<myFileName<<"',"<<theMode<<")");
      }

Member Data Documentation

Definition at line 148 of file MED_V2_2_Wrapper.cxx.

Definition at line 149 of file MED_V2_2_Wrapper.cxx.

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

Definition at line 150 of file MED_V2_2_Wrapper.cxx.


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