Back to index

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

#include <MEDSPLITTERTest_Utils.hxx>

Collaboration diagram for MEDSPLITTERTest_TmpFilesRemover:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MEDSPLITTERTest_TmpFilesRemover ()
bool Register (const std::string theTmpFile, const bool and_remove=true)
 ~MEDSPLITTERTest_TmpFilesRemover ()

Private Attributes

std::set< std::string > myTmpFiles

Detailed Description

Definition at line 32 of file MEDSPLITTERTest_Utils.hxx.


Constructor & Destructor Documentation

Definition at line 36 of file MEDSPLITTERTest_Utils.hxx.

{}

Definition at line 121 of file MEDSPLITTERTest_Utils.cxx.

{
  set< string>::iterator it = myTmpFiles.begin();
  for (; it != myTmpFiles.end(); it++) {
#ifndef WIN32
    if (access((*it).data(), F_OK) == 0)
#else 

#endif
      remove((*it).data());

  }
  myTmpFiles.clear();
}

Member Function Documentation

bool MEDSPLITTERTest_TmpFilesRemover::Register ( const std::string  theTmpFile,
const bool  and_remove = true 
)

Definition at line 114 of file MEDSPLITTERTest_Utils.cxx.

{
//   if ( and_remove && access( theTmpFile.data(), F_OK ) == 0 )
//     remove(theTmpFile.data());
  return (myTmpFiles.insert(theTmpFile)).second;
}

Member Data Documentation

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

Definition at line 41 of file MEDSPLITTERTest_Utils.hxx.


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