From 47f3adcc4c838b5ae354efdf2e17e49517eb727e Mon Sep 17 00:00:00 2001 From: abd Date: Fri, 8 Aug 2008 06:41:34 +0000 Subject: [PATCH] Merging with BR_WPdev_For_5_0 --- src/HDFPersist/HDFascii.cc | 16 +++++++++++++--- src/HDFPersist/HDFascii.hxx | 2 +- src/HDFPersist/HDFattribute.hxx | 2 +- src/HDFPersist/HDFcontainerObject.hxx | 2 +- src/HDFPersist/HDFconvert.hxx | 3 ++- src/HDFPersist/HDFdataset.hxx | 2 +- src/HDFPersist/HDFexception.hxx | 4 +++- src/HDFPersist/HDFexplorer.hxx | 2 +- src/HDFPersist/HDFexport.hxx | 14 +++++++------- src/HDFPersist/HDFfile.hxx | 2 +- src/HDFPersist/HDFgroup.hxx | 2 +- src/HDFPersist/HDFinternalObject.hxx | 2 +- src/HDFPersist/HDFobject.cc | 3 ++- src/HDFPersist/HDFobject.hxx | 2 +- 14 files changed, 36 insertions(+), 22 deletions(-) diff --git a/src/HDFPersist/HDFascii.cc b/src/HDFPersist/HDFascii.cc index 5e1cf18a8..4c265f63e 100644 --- a/src/HDFPersist/HDFascii.cc +++ b/src/HDFPersist/HDFascii.cc @@ -35,6 +35,10 @@ #ifdef WNT #include #include +#include +#define dir_separator '\\' +#else +#define dir_separator '/' #endif using namespace std; @@ -653,11 +657,12 @@ string GetTmpDir() 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 @@ -676,11 +681,14 @@ string GetTmpDir() 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; @@ -690,12 +698,14 @@ string GetTmpDir() } #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) diff --git a/src/HDFPersist/HDFascii.hxx b/src/HDFPersist/HDFascii.hxx index 999b17352..254fc9de5 100644 --- a/src/HDFPersist/HDFascii.hxx +++ b/src/HDFPersist/HDFascii.hxx @@ -31,7 +31,7 @@ #include "HDFexport.hxx" -class HDF_EXPORT HDFascii +class HDFPERSIST_EXPORT HDFascii { public: diff --git a/src/HDFPersist/HDFattribute.hxx b/src/HDFPersist/HDFattribute.hxx index 9ec84e75b..9ede64cec 100644 --- a/src/HDFPersist/HDFattribute.hxx +++ b/src/HDFPersist/HDFattribute.hxx @@ -34,7 +34,7 @@ extern "C" #include "HDFinternalObject.hxx" #include "HDFcontainerObject.hxx" -class HDFattribute : public HDFobject +class HDFPERSIST_EXPORT HDFattribute : public HDFobject { private : HDFinternalObject *_father; diff --git a/src/HDFPersist/HDFcontainerObject.hxx b/src/HDFPersist/HDFcontainerObject.hxx index dfc237b26..117145c94 100644 --- a/src/HDFPersist/HDFcontainerObject.hxx +++ b/src/HDFPersist/HDFcontainerObject.hxx @@ -35,7 +35,7 @@ extern "C" #include "HDFinternalObject.hxx" #include "HDFexport.hxx" -class HDF_EXPORT HDFcontainerObject : public HDFinternalObject +class HDFPERSIST_EXPORT HDFcontainerObject : public HDFinternalObject { private : HDFinternalObject *_firstson; diff --git a/src/HDFPersist/HDFconvert.hxx b/src/HDFPersist/HDFconvert.hxx index 20b65affd..e4fae3a06 100644 --- a/src/HDFPersist/HDFconvert.hxx +++ b/src/HDFPersist/HDFconvert.hxx @@ -41,13 +41,14 @@ extern "C" #include #include } +#include "HDFexport.hxx" #include "HDFcontainerObject.hxx" #include "HDFdataset.hxx" #include "HDFfile.hxx" #include -class HDFConvert +class HDFPERSIST_EXPORT HDFConvert { private: diff --git a/src/HDFPersist/HDFdataset.hxx b/src/HDFPersist/HDFdataset.hxx index 1e2a62401..b27f8bade 100644 --- a/src/HDFPersist/HDFdataset.hxx +++ b/src/HDFPersist/HDFdataset.hxx @@ -35,7 +35,7 @@ extern "C" #include "HDFcontainerObject.hxx" #include "HDFexport.hxx" -class HDF_EXPORT HDFdataset : public HDFinternalObject +class HDFPERSIST_EXPORT HDFdataset : public HDFinternalObject { private : HDFcontainerObject *_father; diff --git a/src/HDFPersist/HDFexception.hxx b/src/HDFPersist/HDFexception.hxx index 2ec2ce4a5..29b925ed0 100644 --- a/src/HDFPersist/HDFexception.hxx +++ b/src/HDFPersist/HDFexception.hxx @@ -27,11 +27,13 @@ #ifndef __HDFexception_H__ #define __HDFexception_H__ +#include + /* Exception */ #include -class HDFexception +class HDFPERSIST_EXPORT HDFexception { public : HDFexception(const char *message) { diff --git a/src/HDFPersist/HDFexplorer.hxx b/src/HDFPersist/HDFexplorer.hxx index e66fbe390..c2d5f3682 100644 --- a/src/HDFPersist/HDFexplorer.hxx +++ b/src/HDFPersist/HDFexplorer.hxx @@ -30,7 +30,7 @@ #include "HDFinternalObject.hxx" #include "HDFcontainerObject.hxx" -class HDFexplorer { +class HDFPERSIST_EXPORT HDFexplorer { private : int _size; HDFcontainerObject *_container; diff --git a/src/HDFPersist/HDFexport.hxx b/src/HDFPersist/HDFexport.hxx index 21b64d34e..060b1e592 100644 --- a/src/HDFPersist/HDFexport.hxx +++ b/src/HDFPersist/HDFexport.hxx @@ -26,14 +26,14 @@ #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 diff --git a/src/HDFPersist/HDFfile.hxx b/src/HDFPersist/HDFfile.hxx index b1d32881f..2f908cf9f 100644 --- a/src/HDFPersist/HDFfile.hxx +++ b/src/HDFPersist/HDFfile.hxx @@ -34,7 +34,7 @@ extern "C" #include "HDFcontainerObject.hxx" #include "HDFexport.hxx" -class HDF_EXPORT HDFfile : public HDFcontainerObject +class HDFPERSIST_EXPORT HDFfile : public HDFcontainerObject { private : hdf_access_mode _access_mode; diff --git a/src/HDFPersist/HDFgroup.hxx b/src/HDFPersist/HDFgroup.hxx index 07e79e36e..0a1bbc407 100644 --- a/src/HDFPersist/HDFgroup.hxx +++ b/src/HDFPersist/HDFgroup.hxx @@ -34,7 +34,7 @@ extern "C" #include "HDFcontainerObject.hxx" #include "HDFexport.hxx" -class HDF_EXPORT HDFgroup : public HDFcontainerObject +class HDFPERSIST_EXPORT HDFgroup : public HDFcontainerObject { private : HDFcontainerObject *_father; diff --git a/src/HDFPersist/HDFinternalObject.hxx b/src/HDFPersist/HDFinternalObject.hxx index ee4c32e51..232305016 100644 --- a/src/HDFPersist/HDFinternalObject.hxx +++ b/src/HDFPersist/HDFinternalObject.hxx @@ -34,7 +34,7 @@ extern "C" #include "HDFobject.hxx" #include "HDFexport.hxx" -class HDF_EXPORT HDFinternalObject : public HDFobject +class HDFPERSIST_EXPORT HDFinternalObject : public HDFobject { private : HDFinternalObject *_previousbrother; diff --git a/src/HDFPersist/HDFobject.cc b/src/HDFPersist/HDFobject.cc index 5adb8aafe..e4f751a9b 100644 --- a/src/HDFPersist/HDFobject.cc +++ b/src/HDFPersist/HDFobject.cc @@ -28,8 +28,9 @@ extern "C" { #include "hdfi.h" -#include } + +#include //#include "utilities.h" using namespace std; diff --git a/src/HDFPersist/HDFobject.hxx b/src/HDFPersist/HDFobject.hxx index 3c829822a..22b6a3b69 100644 --- a/src/HDFPersist/HDFobject.hxx +++ b/src/HDFPersist/HDFobject.hxx @@ -33,7 +33,7 @@ extern "C" } #include -class HDF_EXPORT HDFobject { +class HDFPERSIST_EXPORT HDFobject { protected : char *_name; hdf_idt _id; -- 2.39.2