Back to index

salome-med  6.5.0
Public Member Functions | Private Attributes
MPIAccessDECTest_TmpFilesRemover Class Reference

#include <MPIAccessDECTest.hxx>

Collaboration diagram for MPIAccessDECTest_TmpFilesRemover:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MPIAccessDECTest_TmpFilesRemover ()
 ~MPIAccessDECTest_TmpFilesRemover ()
 Tool to remove temporary files.
bool Register (const std::string theTmpFile)

Private Attributes

std::set< std::string > myTmpFiles

Detailed Description

Definition at line 75 of file MPIAccessDECTest.hxx.


Constructor & Destructor Documentation

Definition at line 78 of file MPIAccessDECTest.hxx.

{}

Tool to remove temporary files.

Allows automatique removal of temporary files in case of test failure.

Definition at line 34 of file MPIAccessDECTest.cxx.

{
  set<string>::iterator it = myTmpFiles.begin();
  for (; it != myTmpFiles.end(); it++) {
    if (access((*it).data(), F_OK) == 0)
      remove((*it).data());
  }
  myTmpFiles.clear();
  //cout << "~MPIAccessTest_TmpFilesRemover()" << endl;
}

Member Function Documentation

bool MPIAccessDECTest_TmpFilesRemover::Register ( const std::string  theTmpFile)

Definition at line 45 of file MPIAccessDECTest.cxx.

{
  return (myTmpFiles.insert(theTmpFile)).second;
}

Member Data Documentation

std::set<std::string> MPIAccessDECTest_TmpFilesRemover::myTmpFiles [private]

Definition at line 83 of file MPIAccessDECTest.hxx.


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