Correction of Export/Import defines for Win32 platform.
Using WIN32 standard define instead WNT define of OpenCascade library.
Using Basics instead Utils library.
Removed "using namespace std" from header files.
double & ti,
double const & tf,
long & i,
- const string & nomVar,
+ const std::string & nomVar,
size_t bufferLength,
size_t & nRead,
T1 * &data )
// T1 est le type de données
template <typename T1 > static void
ecp_lecture ( Superv_Component_i & component,
- int const & dependencyType,
- double & ti,
- double const & tf,
- long & i,
- const string & nomVar,
- size_t bufferLength,
- size_t & nRead,
- T1 * &data )
+ int const & dependencyType,
+ double & ti,
+ double const & tf,
+ long & i,
+ const std::string & nomVar,
+ size_t bufferLength,
+ size_t & nRead,
+ T1 * &data )
{
ecp_lecture<T1,T1> (component,dependencyType,ti,tf,
i,nomVar,bufferLength,nRead,data);
// T2 : PortType
template <typename T1, typename T2> static void
ecp_ecriture ( Superv_Component_i & component,
- int const & dependencyType,
- double const & t,
- long const & i,
- const string & nomVar,
- size_t bufferLength,
- T1 const & data )
+ int const & dependencyType,
+ double const & t,
+ long const & i,
+ const std::string & nomVar,
+ size_t bufferLength,
+ T1 const & data )
{
assert(&component);
int const & dependencyType,
double const & t,
long const & i,
- const string & nomVar,
+ const std::string & nomVar,
size_t bufferLength,
T1 const & data ) {
ecp_ecriture<T1,T1> (component,dependencyType,t,i,nomVar,bufferLength,data);
#include "calcium_port_factory.hxx"
+using namespace std;
+
calcium_port_factory::calcium_port_factory() {}
calcium_port_factory::~calcium_port_factory() {}
#include "calcium_logical_port_uses.hxx"
#include "calcium_complex_port_uses.hxx"
-using namespace std;
-
class calcium_port_factory :
public port_factory
{
calcium_port_factory();
virtual ~calcium_port_factory();
- virtual provides_port * create_data_servant(string type);
- virtual uses_port * create_data_proxy(string type);
+ virtual provides_port * create_data_servant(std::string type);
+ virtual uses_port * create_data_proxy(std::string type);
};
#endif
MESSAGE("GenericObj_i::GenericObj_i() - this = "<<this<<
"; CORBA::is_nil(thePOA) = "<<CORBA::is_nil(thePOA));
if(CORBA::is_nil(thePOA))
-#ifndef WNT
+#ifndef WIN32
myPOA = PortableServer::ServantBase::_default_POA();
#else
myPOA = ServantBase::_default_POA();
#include "SALOMEconfig.h"
#include CORBA_SERVER_HEADER(SALOME_GenericObj)
-#if defined GENERICOBJ_EXPORTS
-#if defined WIN32
-#define GENERICOBJ_EXPORT __declspec( dllexport )
+#ifdef WIN32
+# ifdef GENERICOBJ_EXPORTS
+# define GENERICOBJ_EXPORT __declspec( dllexport )
+# else
+# define GENERICOBJ_EXPORT __declspec( dllimport )
+# endif
#else
-#define GENERICOBJ_EXPORT
-#endif
-#else
-#if defined WNT
-#define GENERICOBJ_EXPORT __declspec( dllimport )
-#else
-#define GENERICOBJ_EXPORT
-#endif
+# define GENERICOBJ_EXPORT
#endif
namespace SALOME{
#include <stdio.h>
#include <string>
-#ifdef WNT
+#ifdef WIN32
#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;
aDir = aTmpDir+buffer; //Build a unique directory name
}
-#ifdef WNT
+#ifdef WIN32
+ //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)
bool Exists(const string thePath)
{
-#ifdef WNT
+#ifdef WIN32
if ( GetFileAttributes ( thePath.c_str() ) == 0xFFFFFFFF ) {
if ( GetLastError () != ERROR_FILE_NOT_FOUND ) {
return false;
void Move(const string& fName, const string& fNameDst)
{
-#ifdef WNT
+#ifdef WIN32
MoveFileEx (fName.c_str(), fNameDst.c_str(),MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED);
#else
rename(fName.c_str(), fNameDst.c_str());
#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 "HDFconvert.hxx"
using namespace std;
-#ifdef WNT
+#ifdef WIN32
#include <io.h>
#include <windows.h>
#endif
perror("HDFConvert::FromAscii");
return -1;
};
-#elif defined WNT
+#elif defined WIN32
#define SHMEMSIZE 4096
extern "C"
{
#include "HDFtypes.h"
-#ifndef WNT
+#ifndef WIN32
#include <unistd.h>
#include <sys/mman.h>
#else
#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
extern "C"
{
#include "hdfi.h"
-#ifndef WNT
+#ifndef WIN32
#include <unistd.h>
#else
#include <io.h>
#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 "hdfi.h"
}
#include "HDFinternalObject.hxx"
-#ifndef WNT
+
using namespace std;
-#endif
HDFinternalObject::HDFinternalObject(const char *name)
: HDFobject(name)
#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;