Salome HOME
Small correction for writing of data to file.
[modules/hydro.git] / src / HYDROData / HYDROData_Tool.cxx
index 9ed8f0be5063deaae02dd4be0843c127db56ff42..9cb932d340a7066442e860a91959c030c7002799 100644 (file)
@@ -1,2 +1,21 @@
 
 #include "HYDROData_Tool.h"
+
+#include <QFile>
+#include <QStringList>
+#include <QTextStream>
+
+void HYDROData_Tool::WriteStringsToFile( QFile&             theFile,
+                                         const QStringList& theStrings,
+                                         const QString&     theSep )
+{
+  if ( !theFile.isOpen() || theStrings.isEmpty() )
+    return;
+  
+  QString aWriteStr = theStrings.join( theSep );
+  if ( aWriteStr.isEmpty() )
+    return;
+
+  QTextStream anOutStream( &theFile );
+  anOutStream << aWriteStr << theSep << theSep;
+}