Version: 6.3.1
Functions

src/MEDMEMCppTest/MEDMEMTest_Utils.cxx File Reference

#include "MEDMEMTest_Utils.hxx"
#include <cstdlib>
#include <list>
#include <stdexcept>
Include dependency graph for MEDMEMTest_Utils.cxx:

Functions

std::string getResourceFile (const std::string &filename)
 Get path to the resources file.
std::string getTmpDirectory ()
 Returns writable temporary directory.
std::string makeTmpFile (const std::string &tmpfile, const std::string &srcfile)
 Creates a copy of source file (if source file is specified) in the temporary directory and returns a path to the tmp file.
std::string fixSlashes (const std::string &path)
 On WINDOWS, replaces all forward slashes by back slashes to avoid mixed slashes in one path.

Function Documentation

std::string getResourceFile ( const std::string &  filename)

Get path to the resources file.

When running 'make test' source file is taken from MED_SRC/resources folder. Otherwise, file is searched in ${MED_ROOT_DIR}/share/salome/resources/med folder.

Parameters:
filenamename of the resource file (should not include a path)
Returns:
full path to the resource file

References test_NonCoincidentDEC.filename, and fixSlashes().

std::string getTmpDirectory ( )

Returns writable temporary directory.

Returns:
full path to the temporary directory
std::string makeTmpFile ( const std::string &  tmpfile,
const std::string &  srcfile 
)

Creates a copy of source file (if source file is specified) in the temporary directory and returns a path to the tmp file.

Parameters:
tmpfilename of the temporary file (without path)
srcfilesource file
Returns:
path to the temporary file
std::string fixSlashes ( const std::string &  path)

On WINDOWS, replaces all forward slashes by back slashes to avoid mixed slashes in one path.

Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS