Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/multipr.git] / src / MULTIPR / MULTIPR_Utils.hxx
diff --git a/src/MULTIPR/MULTIPR_Utils.hxx b/src/MULTIPR/MULTIPR_Utils.hxx
deleted file mode 100644 (file)
index 46362e7..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-// Project MULTIPR, IOLS WP1.2.1 - EDF/CS
-// Partitioning/decimation module for the SALOME v3.2 platform
-
-/**
- * \file    MULTIPR_Utils.hxx
- *
- * \brief   Some useful miscellaneous tools.
- *
- * \author  Olivier LE ROUX - CS, Virtual Reality Dpt
- * 
- * \date    01/2007
- */
-
-#ifndef MULTIPR_UTILS_HXX
-#define MULTIPR_UTILS_HXX
-
-extern "C"
-{
-    #include "med.h"
-}
-
-#include <string>
-#include <vector>
-
-
-namespace multipr
-{
-
-
-/**
- * Removes all the pChar at the end of the string.
- * \param  pStr  any valid C string ending with the char '\0'.
- * \param  pChar any char; SPACE by default.
- * \return the same string where the ending spaces have been removed.
- */
-void trim(char* pStr, char pChar=' ');
-
-
-/**
- * Returns true iff the given string starts by prefix.
- * \param  pStr       any valid C string ending with the char '\0'.
- * \param  pStrPrefix any valid C string ending with the char '\0'.
- * \return true iff the given string starts by prefix.
- */
-bool startsWith(const char* pStr, const char* pStrPrefix);
-
-/**
- * Removes the extension (suffix) of a filename.
- * Example: removeExtension("agregat100grains_12pas.med", ".med") -> "agregat100grains_12pas"
- * \param  pPilename  any valid C string ending with the char '\0'.
- * \param  pExtension any valid C string ending with the char '\0'.
- * \return the filename without extension.
- */
-std::string removeExtension(const char* pFilename, const char* pExtension);
-
-
-/**
- * Returns the name of the file, excluding the path.
- * Example: getFilenameWithoutPath("/home/data/agregat100grains_12pas.med") -> "agregat100grains_12pas.med"
- * \param  pPilename  any valid C string ending with the char '\0'.
- * \return the name of the file, excluding the path.
- */
-std::string getFilenameWithoutPath(const char* pFilename);
-
-
-/**
- * Returns the path of the filename (which may be relative or absolute).
- * Example: getPath("/home/data/agregat100grains_12pas.med") -> "/home/data/"
- * \param  pPilename  any valid C string ending with the char '\0'.
- * \return the path of the filename (which may be relative or absolute).
- */
-std::string getPath(const char* pFilename);
-
-
-/**
- * Copies the given file into a directory.
- * \param  pFilename  name of any file to be copied.
- * \param  pDestDir   destination directory.
- */
-void copyFile(const char* pFilename, const char* pDestDir);
-/**
- * Prints all the elements of a 2D array.
- * \param  pData   all the data (should contain pNumberOfElements * pDimOfElements values)
- * \param  pNumElt number of elements to display.
- * \param  pDimElt Dimension of elements.
- * \param  pPrefix string to display before each element.
- */
-void printArray2D(
-    const med_float* pData, 
-    const int        pNumElt,
-    const int        pDimElt,
-    const char*      pPrefix);
-    
-
-/**
- * Converts any float value to a string (remove unecessary 0).
- * \param  mV any float value.
- */
-std::string realToString(med_float mV);
-
-
-/**
- * Returns the name of all meshes contained in a sequential MED file.
- * \param  pMEDfilename name of any valid sequential MED file; must not be NULL.
- * \return a list of mesh names.
- * \throw  NullArgumentException if pMEDfilename is NULL.
- * \throw  IOException if any other error occurs while reading MED file.
- */
- std::vector<std::string> getListMeshes(const char* pMEDfilename);
-
- /**
-  * For each scalar field in a sequential MED file, returns its name and the related number of time stamps.
-  * Do not returns info about vectorial fields (because, currently, decimation can only be performed on scalar fields).
-  * \param  pMEDfilename name of any valid sequential MED file; must not be NULL.
-  * \return a list of (name, #time stamps).
-  * \throw  NullArgumentException if pMEDfilename is NULL.
-  * \throw  IOException if any other error occurs while reading MED file.
-  */
- std::vector< std::pair<std::string, int> > getListScalarFields(const char* pMEDfilename);
-
-} // namespace MULTIPR
-
-
-#endif // MULTIPR_UTILS_HXX
-
-// EOF