#ifdef WNT
#include <io.h>
#include <time.h>
+#include <windows.h>
+#define dir_separator '\\'
+#else
+#define dir_separator '/'
#endif
using namespace std;
char *Tmp_dir = getenv("SALOME_TMP_DIR");
if(Tmp_dir != NULL) {
aTmpDir = string(Tmp_dir);
-#ifdef WIN32
+ if(aTmpDir[aTmpDir.size()-1] != dir_separator) aTmpDir+=dir_separator;
+/*#ifdef WIN32
if(aTmpDir[aTmpDir.size()-1] != '\\') aTmpDir+='\\';
#else
if(aTmpDir[aTmpDir.size()-1] != '/') aTmpDir+='/';
-#endif
+#endif*/
}
else {
#ifdef WIN32
aTmpDir += aSubDir; //Get RND sub directory
+ if(aTmpDir[aTmpDir.size()-1] != dir_separator) aTmpDir+=dir_separator;
+/*
#ifdef WIN32
if(aTmpDir[aTmpDir.size()-1] != '\\') aTmpDir+='\\';
#else
if(aTmpDir[aTmpDir.size()-1] != '/') aTmpDir+='/';
#endif
+ */
string aDir = aTmpDir;
}
#ifdef WNT
+ //fuction CreateDirectory create only final directory, but not intermediate
+ CreateDirectory(aTmpDir.c_str(), NULL);
CreateDirectory(aDir.c_str(), NULL);
#else
mkdir(aDir.c_str(), 0x1ff);
#endif
- return aDir;
+ return aDir + dir_separator;
}
char* makeName(char* name)
#include "HDFexport.hxx"
-class HDF_EXPORT HDFascii
+class HDFPERSIST_EXPORT HDFascii
{
public:
#include "HDFinternalObject.hxx"
#include "HDFcontainerObject.hxx"
-class HDFattribute : public HDFobject
+class HDFPERSIST_EXPORT HDFattribute : public HDFobject
{
private :
HDFinternalObject *_father;
#include "HDFinternalObject.hxx"
#include "HDFexport.hxx"
-class HDF_EXPORT HDFcontainerObject : public HDFinternalObject
+class HDFPERSIST_EXPORT HDFcontainerObject : public HDFinternalObject
{
private :
HDFinternalObject *_firstson;
#include <sys/stat.h>
#include <fcntl.h>
}
+#include "HDFexport.hxx"
#include "HDFcontainerObject.hxx"
#include "HDFdataset.hxx"
#include "HDFfile.hxx"
#include <string>
-class HDFConvert
+class HDFPERSIST_EXPORT HDFConvert
{
private:
#include "HDFcontainerObject.hxx"
#include "HDFexport.hxx"
-class HDF_EXPORT HDFdataset : public HDFinternalObject
+class HDFPERSIST_EXPORT HDFdataset : public HDFinternalObject
{
private :
HDFcontainerObject *_father;
#ifndef __HDFexception_H__
#define __HDFexception_H__
+#include <HDFexport.hxx>
+
/* Exception */
#include <iostream>
-class HDFexception
+class HDFPERSIST_EXPORT HDFexception
{
public :
HDFexception(const char *message) {
#include "HDFinternalObject.hxx"
#include "HDFcontainerObject.hxx"
-class HDFexplorer {
+class HDFPERSIST_EXPORT HDFexplorer {
private :
int _size;
HDFcontainerObject *_container;
#ifndef _HDF_export_HXX_
#define _HDF_export_HXX_
-#ifdef WNT
- #if defined WIN32
- #define HDF_EXPORT __declspec( dllimport )
- #else
- #define HDF_EXPORT
- #endif
+#ifdef WIN32
+# ifdef HDFPERSIST_EXPORTS
+# define HDFPERSIST_EXPORT __declspec( dllexport )
+# else
+# define HDFPERSIST_EXPORT __declspec( dllimport )
+# endif
#else
- #define HDF_EXPORT
+# define HDFPERSIST_EXPORT
#endif
#endif
#include "HDFcontainerObject.hxx"
#include "HDFexport.hxx"
-class HDF_EXPORT HDFfile : public HDFcontainerObject
+class HDFPERSIST_EXPORT HDFfile : public HDFcontainerObject
{
private :
hdf_access_mode _access_mode;
#include "HDFcontainerObject.hxx"
#include "HDFexport.hxx"
-class HDF_EXPORT HDFgroup : public HDFcontainerObject
+class HDFPERSIST_EXPORT HDFgroup : public HDFcontainerObject
{
private :
HDFcontainerObject *_father;
#include "HDFobject.hxx"
#include "HDFexport.hxx"
-class HDF_EXPORT HDFinternalObject : public HDFobject
+class HDFPERSIST_EXPORT HDFinternalObject : public HDFobject
{
private :
HDFinternalObject *_previousbrother;
extern "C"
{
#include "hdfi.h"
-#include <string.h>
}
+
+#include <string>
//#include "utilities.h"
using namespace std;
}
#include <HDFexport.hxx>
-class HDF_EXPORT HDFobject {
+class HDFPERSIST_EXPORT HDFobject {
protected :
char *_name;
hdf_idt _id;