From 408c0191e3bbfd149adbf04e2e7bce039703a144 Mon Sep 17 00:00:00 2001 From: rnv Date: Fri, 1 Nov 2013 08:13:12 +0000 Subject: [PATCH] Porting HOMARD SALOME module on WIN32 platform. --- src/HOMARD/HOMARD.hxx | 10 ++ src/HOMARD/HOMARD_Boundary.cxx | 2 +- src/HOMARD/HOMARD_Boundary.hxx | 8 +- src/HOMARD/HOMARD_Cas.cxx | 21 ++- src/HOMARD/HOMARD_Cas.hxx | 8 +- src/HOMARD/HOMARD_DriverTools.cxx | 12 +- src/HOMARD/HOMARD_DriverTools.hxx | 30 ++-- src/HOMARD/HOMARD_Gen.hxx | 4 +- src/HOMARD/HOMARD_Hypothesis.cxx | 16 +- src/HOMARD/HOMARD_Hypothesis.hxx | 8 +- src/HOMARD/HOMARD_Iteration.hxx | 8 +- src/HOMARD/HOMARD_YACS.hxx | 4 +- src/HOMARD/HOMARD_Zone.cxx | 8 +- src/HOMARD/HOMARD_Zone.hxx | 8 +- src/HOMARD/HomardDriver.cxx | 18 ++- src/HOMARD/HomardDriver.hxx | 4 +- src/HOMARD/YACSDriver.cxx | 8 +- src/HOMARD/YACSDriver.hxx | 4 +- src/HOMARDGUI/CMakeLists.txt | 1 + src/HOMARDGUI/HOMARDGUI.cxx | 9 +- src/HOMARDGUI/HOMARDGUI.h | 4 +- src/HOMARDGUI/HOMARDGUI_Exports.hxx | 35 ++++ src/HOMARDGUI/HOMARDGUI_Utils.cxx | 2 + src/HOMARDGUI/HOMARDGUI_Utils.h | 39 ++--- src/HOMARDGUI/HomardQtCommun.cxx | 2 + src/HOMARDGUI/HomardQtCommun.h | 17 +- src/HOMARDGUI/MonCreateBoundaryAn.cxx | 74 ++++----- src/HOMARDGUI/MonCreateBoundaryAn.h | 3 +- src/HOMARDGUI/MonCreateBoundaryDi.cxx | 4 +- src/HOMARDGUI/MonCreateBoundaryDi.h | 3 +- src/HOMARDGUI/MonCreateCase.cxx | 11 +- src/HOMARDGUI/MonCreateCase.h | 4 +- src/HOMARDGUI/MonCreateHypothesis.cxx | 10 +- src/HOMARDGUI/MonCreateHypothesis.h | 3 +- src/HOMARDGUI/MonCreateIteration.cxx | 6 +- src/HOMARDGUI/MonCreateIteration.h | 3 +- src/HOMARDGUI/MonCreateListGroup.cxx | 4 +- src/HOMARDGUI/MonCreateListGroup.h | 3 +- src/HOMARDGUI/MonCreateYACS.cxx | 10 +- src/HOMARDGUI/MonCreateYACS.h | 4 +- src/HOMARDGUI/MonCreateZone.cxx | 62 +++---- src/HOMARDGUI/MonCreateZone.h | 3 +- src/HOMARDGUI/MonEditBoundaryAn.cxx | 3 +- src/HOMARDGUI/MonEditBoundaryAn.h | 4 +- src/HOMARDGUI/MonEditBoundaryDi.cxx | 3 +- src/HOMARDGUI/MonEditBoundaryDi.h | 4 +- src/HOMARDGUI/MonEditCase.cxx | 3 +- src/HOMARDGUI/MonEditCase.h | 4 +- src/HOMARDGUI/MonEditFile.cxx | 4 +- src/HOMARDGUI/MonEditFile.h | 3 +- src/HOMARDGUI/MonEditHypothesis.cxx | 9 +- src/HOMARDGUI/MonEditHypothesis.h | 4 +- src/HOMARDGUI/MonEditIteration.cxx | 7 +- src/HOMARDGUI/MonEditIteration.h | 4 +- src/HOMARDGUI/MonEditListGroup.cxx | 3 +- src/HOMARDGUI/MonEditListGroup.h | 3 +- src/HOMARDGUI/MonEditYACS.cxx | 3 +- src/HOMARDGUI/MonEditYACS.h | 4 +- src/HOMARDGUI/MonEditZone.cxx | 3 +- src/HOMARDGUI/MonEditZone.h | 4 +- src/HOMARDGUI/MonIterInfo.cxx | 5 +- src/HOMARDGUI/MonIterInfo.h | 4 +- src/HOMARDGUI/MonMeshInfo.cxx | 13 +- src/HOMARDGUI/MonMeshInfo.h | 4 +- src/HOMARDGUI/MonPursueIteration.cxx | 11 +- src/HOMARDGUI/MonPursueIteration.h | 4 +- src/HOMARD_I/CMakeLists.txt | 5 + src/HOMARD_I/HOMARD_Boundary_i.hxx | 3 +- src/HOMARD_I/HOMARD_Cas_i.cxx | 8 + src/HOMARD_I/HOMARD_Cas_i.hxx | 3 +- src/HOMARD_I/HOMARD_Gen_i.cxx | 223 ++++++++++++++++++++++---- src/HOMARD_I/HOMARD_Gen_i.hxx | 3 +- src/HOMARD_I/HOMARD_Hypothesis_i.hxx | 3 +- src/HOMARD_I/HOMARD_Iteration_i.hxx | 3 +- src/HOMARD_I/HOMARD_YACS_i.hxx | 3 +- src/HOMARD_I/HOMARD_Zone_i.hxx | 3 +- src/HOMARD_I/HOMARD_i.hxx | 35 ++++ src/HOMARD_I/HomardMedCommun.h | 7 +- 78 files changed, 643 insertions(+), 266 deletions(-) create mode 100755 src/HOMARDGUI/HOMARDGUI_Exports.hxx create mode 100755 src/HOMARD_I/HOMARD_i.hxx diff --git a/src/HOMARD/HOMARD.hxx b/src/HOMARD/HOMARD.hxx index abc1805c..61f47832 100644 --- a/src/HOMARD/HOMARD.hxx +++ b/src/HOMARD/HOMARD.hxx @@ -31,4 +31,14 @@ if (!(condition)){INTERRUPTION("CONDITION "<<#condition<<" NOT VERIFIED")} #endif /* VERIFICATION */ +#ifdef WIN32 + #if defined HOMARDIMPL_EXPORTS || defined HOMARDImpl_EXPORTS + #define HOMARDIMPL_EXPORT __declspec( dllexport ) + #else + #define HOMARDIMPL_EXPORT __declspec( dllimport ) + #endif +#else + #define HOMARDIMPL_EXPORT +#endif + #endif diff --git a/src/HOMARD/HOMARD_Boundary.cxx b/src/HOMARD/HOMARD_Boundary.cxx index 24db564a..f7743014 100644 --- a/src/HOMARD/HOMARD_Boundary.cxx +++ b/src/HOMARD/HOMARD_Boundary.cxx @@ -235,7 +235,7 @@ std::vector HOMARD_Boundary::GetCoords() const mesCoor.push_back( _Rayon2 ); break ; } - VERIFICATION( (_Type>=1) and (_Type<=4) ) ; + VERIFICATION( (_Type>=1) && (_Type<=4) ) ; } return mesCoor; } diff --git a/src/HOMARD/HOMARD_Boundary.hxx b/src/HOMARD/HOMARD_Boundary.hxx index b54a5c47..df94e5e6 100644 --- a/src/HOMARD/HOMARD_Boundary.hxx +++ b/src/HOMARD/HOMARD_Boundary.hxx @@ -34,11 +34,17 @@ #ifndef _HOMARD_Boundary_HXX_ #define _HOMARD_Boundary_HXX_ +#include "HOMARD.hxx" + #include #include #include -class HOMARD_Boundary +#if defined WIN32 +#pragma warning ( disable: 4251 ) +#endif + +class HOMARDIMPL_EXPORT HOMARD_Boundary { public: HOMARD_Boundary(); diff --git a/src/HOMARD/HOMARD_Cas.cxx b/src/HOMARD/HOMARD_Cas.cxx index 9d11b745..2823be12 100644 --- a/src/HOMARD/HOMARD_Cas.cxx +++ b/src/HOMARD/HOMARD_Cas.cxx @@ -37,7 +37,9 @@ #include #ifndef WIN32 -# include +#include +#else +#include #endif //============================================================================= @@ -111,12 +113,25 @@ int HOMARD_Cas::SetDirName( const char* NomDir ) MESSAGE("SetDirName, _ListIter.size() : "<<_ListIter.size()); if ( _ListIter.size() > 1 ) { erreur = 1 ; } // Creation - if ( chdir(NomDir) == 0 ) { _NomDir = std::string( NomDir ); } +#ifndef WIN32 + if ( chdir(NomDir) == 0 ) +#else + if ( _chdir(NomDir) == 0 ) +#endif + { _NomDir = std::string( NomDir ); } else { + +#ifndef WIN32 if ( mkdir(NomDir, S_IRWXU|S_IRGRP|S_IXGRP) == 0 ) { - if ( chdir(NomDir) == 0 ) { _NomDir = std::string( NomDir ); } + if ( chdir(NomDir) == 0 ) +#else + if ( _mkdir(NomDir) == 0 ) + { + if ( _chdir(NomDir) == 0 ) +#endif + { _NomDir = std::string( NomDir ); } else { erreur = 2 ; } } else { erreur = 2 ; } diff --git a/src/HOMARD/HOMARD_Cas.hxx b/src/HOMARD/HOMARD_Cas.hxx index 0ecf0512..f9543a47 100644 --- a/src/HOMARD/HOMARD_Cas.hxx +++ b/src/HOMARD/HOMARD_Cas.hxx @@ -34,11 +34,17 @@ #ifndef _HOMARD_CAS_HXX_ #define _HOMARD_CAS_HXX_ +#include "HOMARD.hxx" + #include #include #include -class HOMARD_Cas +#if defined WIN32 +#pragma warning ( disable: 4251 ) +#endif + +class HOMARDIMPL_EXPORT HOMARD_Cas { public: HOMARD_Cas(); diff --git a/src/HOMARD/HOMARD_DriverTools.cxx b/src/HOMARD/HOMARD_DriverTools.cxx index b1d5f6f4..57c939cc 100644 --- a/src/HOMARD/HOMARD_DriverTools.cxx +++ b/src/HOMARD/HOMARD_DriverTools.cxx @@ -669,10 +669,10 @@ namespace HOMARD // Les coordonnees des zones : le nombre depend du type std::vector coords; int lgcoords ; - if ( ZoneType == 2 or ( ZoneType >= 11 and ZoneType <= 13 ) ) { lgcoords = 6 ; } + if ( ZoneType == 2 || ( ZoneType >= 11 && ZoneType <= 13 ) ) { lgcoords = 6 ; } else if ( ZoneType == 4 ) { lgcoords = 4 ; } - else if ( ZoneType == 5 or ( ZoneType >= 31 and ZoneType <= 33 ) ) { lgcoords = 8 ; } - else if ( ZoneType == 7 or ( ZoneType >= 61 and ZoneType <= 63 ) ) { lgcoords = 9 ; } + else if ( ZoneType == 5 || ( ZoneType >= 31 && ZoneType <= 33 ) ) { lgcoords = 8 ; } + else if ( ZoneType == 7 || ( ZoneType >= 61 && ZoneType <= 63 ) ) { lgcoords = 9 ; } else return false; coords.resize( lgcoords ); for ( int i = 0; i < lgcoords; i++ ) { @@ -680,13 +680,13 @@ namespace HOMARD if ( !ok ) return false; coords[i] = strtod( chunk.c_str(), 0 ); } - if ( ZoneType == 2 or ( ZoneType >= 11 and ZoneType <= 13 ) ) + if ( ZoneType == 2 || ( ZoneType >= 11 && ZoneType <= 13 ) ) { zone.SetBox( coords[0], coords[1], coords[2], coords[3], coords[4], coords[5] ); } else if ( ZoneType == 4 ) { zone.SetSphere( coords[0], coords[1], coords[2], coords[3] ); } - else if ( ZoneType == 5 or ( ZoneType >= 31 and ZoneType <= 33 ) ) + else if ( ZoneType == 5 || ( ZoneType >= 31 && ZoneType <= 33 ) ) { zone.SetCylinder( coords[0], coords[1], coords[2], coords[3], coords[4], coords[5], coords[6], coords[7] ); } - else if ( ZoneType == 7 or ( ZoneType >= 61 and ZoneType <= 63 ) ) + else if ( ZoneType == 7 || ( ZoneType >= 61 && ZoneType <= 63 ) ) { zone.SetPipe( coords[0], coords[1], coords[2], coords[3], coords[4], coords[5], coords[6], coords[7], coords[8] ); } // Remarque : la taille de coords est suffisante pour les limites for ( int i = 0; i < 3; i++ ) { diff --git a/src/HOMARD/HOMARD_DriverTools.hxx b/src/HOMARD/HOMARD_DriverTools.hxx index ba4a92ab..8898e153 100644 --- a/src/HOMARD/HOMARD_DriverTools.hxx +++ b/src/HOMARD/HOMARD_DriverTools.hxx @@ -24,6 +24,8 @@ #ifndef HOMARD_DRIVERTOOLS_H #define HOMARD_DRIVERTOOLS_H +#include "HOMARD.hxx" + #include class HOMARD_Boundary; @@ -39,36 +41,36 @@ namespace HOMARD typedef enum { Case, Zone, Hypothesis, Iteration, Boundary, YACS } SignatureType; //! get persistence signature - std::string GetSignature( SignatureType type ); + HOMARDIMPL_EXPORT std::string GetSignature( SignatureType type ); //! get data separator - std::string separator(); + HOMARDIMPL_EXPORT std::string separator(); //! dump boundary to the string - std::string Dump( const ::HOMARD_Boundary& boundary ); + HOMARDIMPL_EXPORT std::string Dump( const ::HOMARD_Boundary& boundary ); //! dump case to the string - std::string Dump( const ::HOMARD_Cas& cas ); + HOMARDIMPL_EXPORT std::string Dump( const ::HOMARD_Cas& cas ); //! dump iteration to the string - std::string Dump( const ::HOMARD_Iteration& iteration ); + HOMARDIMPL_EXPORT std::string Dump( const ::HOMARD_Iteration& iteration ); //! dump hypothesis to the string - std::string Dump( const ::HOMARD_Hypothesis& hypothesis ); + HOMARDIMPL_EXPORT std::string Dump( const ::HOMARD_Hypothesis& hypothesis ); //! dump zone to the string - std::string Dump( const ::HOMARD_Zone& zone ); + HOMARDIMPL_EXPORT std::string Dump( const ::HOMARD_Zone& zone ); //! dump yacs to the string - std::string Dump( const ::HOMARD_YACS& yacs ); + HOMARDIMPL_EXPORT std::string Dump( const ::HOMARD_YACS& yacs ); //! restore boundary from the string - bool Restore( ::HOMARD_Boundary& boundary, const std::string& stream ); + HOMARDIMPL_EXPORT bool Restore( ::HOMARD_Boundary& boundary, const std::string& stream ); //! restore case from the string - bool Restore( ::HOMARD_Cas& cas, const std::string& stream ); + HOMARDIMPL_EXPORT bool Restore( ::HOMARD_Cas& cas, const std::string& stream ); //! restore hypothesis from the string - bool Restore( ::HOMARD_Hypothesis& hypothesis, const std::string& stream ); + HOMARDIMPL_EXPORT bool Restore( ::HOMARD_Hypothesis& hypothesis, const std::string& stream ); //! restore iteration from the string - bool Restore( ::HOMARD_Iteration& iteration, const std::string& stream ); + HOMARDIMPL_EXPORT bool Restore( ::HOMARD_Iteration& iteration, const std::string& stream ); //! restore zone from the string - bool Restore( ::HOMARD_Zone& zone, const std::string& stream ); + HOMARDIMPL_EXPORT bool Restore( ::HOMARD_Zone& zone, const std::string& stream ); //! restore yacs from the string - bool Restore( ::HOMARD_YACS& yacs, const std::string& stream ); + HOMARDIMPL_EXPORT bool Restore( ::HOMARD_YACS& yacs, const std::string& stream ); }; #endif // HOMARD_DRIVERTOOLS_H diff --git a/src/HOMARD/HOMARD_Gen.hxx b/src/HOMARD/HOMARD_Gen.hxx index f8fd09c1..340acecd 100644 --- a/src/HOMARD/HOMARD_Gen.hxx +++ b/src/HOMARD/HOMARD_Gen.hxx @@ -25,7 +25,9 @@ #ifndef _HOMARD_GEN_HXX_ #define _HOMARD_GEN_HXX_ -class HOMARD_Gen +#include "HOMARD.hxx" + +class HOMARDIMPL_EXPORT HOMARD_Gen { public : HOMARD_Gen(); diff --git a/src/HOMARD/HOMARD_Hypothesis.cxx b/src/HOMARD/HOMARD_Hypothesis.cxx index efa92d3d..bd68ce5f 100644 --- a/src/HOMARD/HOMARD_Hypothesis.cxx +++ b/src/HOMARD/HOMARD_Hypothesis.cxx @@ -162,7 +162,7 @@ std::string HOMARD_Hypothesis::GetDumpPython() const //============================================================================= void HOMARD_Hypothesis::SetAdapType( int TypeAdap ) { - VERIFICATION( (TypeAdap>=-1) and (TypeAdap<=1) ); + VERIFICATION( (TypeAdap>=-1) && (TypeAdap<=1) ); _TypeAdap = TypeAdap; } //============================================================================= @@ -173,9 +173,9 @@ int HOMARD_Hypothesis::GetAdapType() const //============================================================================= void HOMARD_Hypothesis::SetRefinTypeDera( int TypeRaff, int TypeDera ) { - VERIFICATION( (TypeRaff>=-1) and (TypeRaff<=1) ); + VERIFICATION( (TypeRaff>=-1) && (TypeRaff<=1) ); _TypeRaff = TypeRaff; - VERIFICATION( (TypeDera>=-1) and (TypeDera<=1) ); + VERIFICATION( (TypeDera>=-1) && (TypeDera<=1) ); _TypeDera = TypeDera; } //============================================================================= @@ -202,7 +202,7 @@ std::string HOMARD_Hypothesis::GetFieldName() const //============================================================================= void HOMARD_Hypothesis::SetUseField( int UsField ) { - VERIFICATION( (UsField>=0) and (UsField<=1) ); + VERIFICATION( (UsField>=0) && (UsField<=1) ); _UsField = UsField; } //============================================================================= @@ -213,7 +213,7 @@ int HOMARD_Hypothesis::GetUseField() const //============================================================================= void HOMARD_Hypothesis::SetUseComp( int UsCmpI ) { - VERIFICATION( (UsCmpI>=0) and (UsCmpI<=2) ); + VERIFICATION( (UsCmpI>=0) && (UsCmpI<=2) ); _UsCmpI = UsCmpI; } //============================================================================= @@ -252,7 +252,7 @@ const std::list& HOMARD_Hypothesis::GetComps() const void HOMARD_Hypothesis::SetRefinThr( int TypeThR, double ThreshR ) { MESSAGE( "SetRefinThr : TypeThR = " << TypeThR << ", ThreshR = " << ThreshR ); - VERIFICATION( (TypeThR>=0) and (TypeThR<=4) ); + VERIFICATION( (TypeThR>=0) && (TypeThR<=4) ); _TypeThR = TypeThR; _ThreshR = ThreshR; } @@ -269,7 +269,7 @@ double HOMARD_Hypothesis::GetThreshR() const //============================================================================= void HOMARD_Hypothesis::SetUnRefThr( int TypeThC, double ThreshC ) { - VERIFICATION( (TypeThC>=0) and (TypeThC<=4) ); + VERIFICATION( (TypeThC>=0) && (TypeThC<=4) ); _TypeThC = TypeThC; _ThreshC = ThreshC; } @@ -356,7 +356,7 @@ const std::list& HOMARD_Hypothesis::GetGroups() const // 2 : certains champs sont interpoles void HOMARD_Hypothesis::SetTypeFieldInterp( int TypeFieldInterp ) { - VERIFICATION( (TypeFieldInterp>=0) and (TypeFieldInterp<=2) ); + VERIFICATION( (TypeFieldInterp>=0) && (TypeFieldInterp<=2) ); _TypeFieldInterp = TypeFieldInterp; } //============================================================================= diff --git a/src/HOMARD/HOMARD_Hypothesis.hxx b/src/HOMARD/HOMARD_Hypothesis.hxx index 83f9c592..f8988469 100644 --- a/src/HOMARD/HOMARD_Hypothesis.hxx +++ b/src/HOMARD/HOMARD_Hypothesis.hxx @@ -34,10 +34,16 @@ #ifndef _HOMARD_HYPOTHESIS_HXX_ #define _HOMARD_HYPOTHESIS_HXX_ +#include "HOMARD.hxx" + #include #include -class HOMARD_Hypothesis +#if defined WIN32 +#pragma warning ( disable: 4251 ) +#endif + +class HOMARDIMPL_EXPORT HOMARD_Hypothesis { public: HOMARD_Hypothesis(); diff --git a/src/HOMARD/HOMARD_Iteration.hxx b/src/HOMARD/HOMARD_Iteration.hxx index 3acf698f..d6300a0b 100644 --- a/src/HOMARD/HOMARD_Iteration.hxx +++ b/src/HOMARD/HOMARD_Iteration.hxx @@ -34,10 +34,16 @@ #ifndef _HOMARD_ITER_HXX_ #define _HOMARD_ITER_HXX_ +#include "HOMARD.hxx" + #include #include -class HOMARD_Iteration +#if defined WIN32 +#pragma warning ( disable: 4251 ) +#endif + +class HOMARDIMPL_EXPORT HOMARD_Iteration { public: HOMARD_Iteration(); diff --git a/src/HOMARD/HOMARD_YACS.hxx b/src/HOMARD/HOMARD_YACS.hxx index 7b771a7c..4c8597dd 100644 --- a/src/HOMARD/HOMARD_YACS.hxx +++ b/src/HOMARD/HOMARD_YACS.hxx @@ -34,10 +34,12 @@ #ifndef _HOMARD_YACS_HXX_ #define _HOMARD_YACS_HXX_ +#include "HOMARD.hxx" + #include #include -class HOMARD_YACS +class HOMARDIMPL_EXPORT HOMARD_YACS { public: HOMARD_YACS(); diff --git a/src/HOMARD/HOMARD_Zone.cxx b/src/HOMARD/HOMARD_Zone.cxx index d4a207f1..3d4f7ce0 100644 --- a/src/HOMARD/HOMARD_Zone.cxx +++ b/src/HOMARD/HOMARD_Zone.cxx @@ -76,12 +76,12 @@ std::string HOMARD_Zone::GetDumpPython() const // MESSAGE("GetDumpPython avec _Name " << _Name) ; std::ostringstream aScript; aScript << "\n# Creation of the "; - if ( _Type >= 11 and _Type <= 13 ) { aScript << "rectangle " ; } + if ( _Type >= 11 && _Type <= 13 ) { aScript << "rectangle " ; } else if ( _Type == 2 ) { aScript << "box " ;} - else if ( _Type >= 31 and _Type <= 33 ) { aScript << "disk " ;} + else if ( _Type >= 31 && _Type <= 33 ) { aScript << "disk " ;} else if ( _Type == 4 ) { aScript << "sphere " ; } else if ( _Type == 5 ) { aScript << "cylinder " ; } - else if ( _Type >= 61 and _Type <= 63 ) { aScript << "disk with hole " ;} + else if ( _Type >= 61 && _Type <= 63 ) { aScript << "disk with hole " ;} else if ( _Type == 7 ) { aScript << "pipe " ; } aScript << _Name << "\n" ; // @@ -276,7 +276,7 @@ std::vector HOMARD_Zone::GetCoords() const mesCoor.push_back( _Rayonint ) ; break ; } - VERIFICATION ( ( (_Type>10) and (_Type<14) ) or (_Type==2) or ( (_Type>30) and (_Type<34) ) or (_Type==4) or (_Type==5) or ( (_Type>60) and (_Type<64) ) or (_Type==7) ) ; + VERIFICATION ( ( (_Type>10) && (_Type<14) ) || (_Type==2) || ( (_Type>30) && (_Type<34) ) || (_Type==4) || (_Type==5) || ( (_Type>60) && (_Type<64) ) || (_Type==7) ) ; } return mesCoor; } diff --git a/src/HOMARD/HOMARD_Zone.hxx b/src/HOMARD/HOMARD_Zone.hxx index fa0fd22f..f326098b 100644 --- a/src/HOMARD/HOMARD_Zone.hxx +++ b/src/HOMARD/HOMARD_Zone.hxx @@ -34,11 +34,17 @@ #ifndef _HOMARD_Zone_HXX_ #define _HOMARD_Zone_HXX_ +#include "HOMARD.hxx" + #include #include #include -class HOMARD_Zone +#if defined WIN32 +#pragma warning ( disable: 4251 ) +#endif + +class HOMARDIMPL_EXPORT HOMARD_Zone { public: HOMARD_Zone(); diff --git a/src/HOMARD/HomardDriver.cxx b/src/HOMARD/HomardDriver.cxx index 3da2f75a..4589c24a 100644 --- a/src/HOMARD/HomardDriver.cxx +++ b/src/HOMARD/HomardDriver.cxx @@ -22,7 +22,9 @@ // Pilote l'ecriture du fichier de configuration pour lancer l'execution de HOMARD #include +#ifndef WIN32 #include +#endif #include #include "HomardDriver.hxx" @@ -241,9 +243,9 @@ void HomardDriver::TexteZone( int NumeZone, int ZoneType, int TypeUse, double x0 // <0 signifie que l'on deraffinera // int ZoneTypeHOMARD ; - if ( ZoneType >= 11 and ZoneType <= 13 ) { ZoneTypeHOMARD = 1 ; } - else if ( ZoneType >= 31 and ZoneType <= 33 ) { ZoneTypeHOMARD = 3 ; } - else if ( ZoneType >= 61 and ZoneType <= 63 ) { ZoneTypeHOMARD = 6 ; } + if ( ZoneType >= 11 && ZoneType <= 13 ) { ZoneTypeHOMARD = 1 ; } + else if ( ZoneType >= 31 && ZoneType <= 33 ) { ZoneTypeHOMARD = 3 ; } + else if ( ZoneType >= 61 && ZoneType <= 63 ) { ZoneTypeHOMARD = 6 ; } else { ZoneTypeHOMARD = ZoneType ; } // if ( TypeUse < 0 ) { ZoneTypeHOMARD = -ZoneTypeHOMARD ; } @@ -358,7 +360,7 @@ void HomardDriver::TexteZone( int NumeZone, int ZoneType, int TypeUse, double x0 // // Cas du disque // - else if ( ZoneType == 31 or ZoneType == 61 ) + else if ( ZoneType == 31 || ZoneType == 61 ) { saux += "# Sphere\n" ; { std::stringstream saux1 ; @@ -381,7 +383,7 @@ void HomardDriver::TexteZone( int NumeZone, int ZoneType, int TypeUse, double x0 saux += "ZoRaRayI " + saux1.str() + "\n" ; } } - else if ( ZoneType == 32 or ZoneType == 62 ) + else if ( ZoneType == 32 || ZoneType == 62 ) { saux += "# Sphere\n" ; { std::stringstream saux1 ; @@ -404,7 +406,7 @@ void HomardDriver::TexteZone( int NumeZone, int ZoneType, int TypeUse, double x0 saux += "ZoRaRayI " + saux1.str() + "\n" ; } } - else if ( ZoneType == 33 or ZoneType == 63 ) + else if ( ZoneType == 33 || ZoneType == 63 ) { saux += "# Sphere\n" ; { std::stringstream saux1 ; @@ -453,7 +455,7 @@ void HomardDriver::TexteZone( int NumeZone, int ZoneType, int TypeUse, double x0 // // Cas du cylindre ou du tuyau // - else if ( ZoneType == 5 or ZoneType == 7 ) + else if ( ZoneType == 5 || ZoneType == 7 ) { if ( ZoneType == 5 ) { saux += "# Cylindre\n" ; } else { saux += "# Tuyau\n" ; } @@ -653,7 +655,7 @@ void HomardDriver::TexteBoundaryAn( const std::string NameBoundary, int NumeBoun { saux += "# Cylindre\n" ; } if ( BoundaryType == 2 ) { saux += "# Sphere\n" ; } - if ( BoundaryType == 3 or BoundaryType == 4 ) + if ( BoundaryType == 3 || BoundaryType == 4 ) { saux += "# Cone\n" ; } // // Le nom de la frontiere diff --git a/src/HOMARD/HomardDriver.hxx b/src/HOMARD/HomardDriver.hxx index f75754ac..efabde20 100644 --- a/src/HOMARD/HomardDriver.hxx +++ b/src/HOMARD/HomardDriver.hxx @@ -22,10 +22,12 @@ # ifndef _HOMARDDRIVER_HXX_ # define _HOMARDDRIVER_HXX_ +#include "HOMARD.hxx" + #include #include -class HomardDriver +class HOMARDIMPL_EXPORT HomardDriver { public: HomardDriver(const std::string siter, const std::string siterp1); diff --git a/src/HOMARD/YACSDriver.cxx b/src/HOMARD/YACSDriver.cxx index 982217e2..dee4f894 100644 --- a/src/HOMARD/YACSDriver.cxx +++ b/src/HOMARD/YACSDriver.cxx @@ -22,7 +22,9 @@ // Pilote l'ecriture du fichier xml pour lancer un schema YACS #include +#ifndef WIN32 #include +#endif #include #include "YACSDriver.hxx" @@ -178,7 +180,7 @@ std::string YACSDriver::Texte_Iter_1_Zone( int ZoneType, const std::string pytho } // // 4.2. Cas du rectangle (11, 12, 13) - else if ( ( ZoneType > 10 ) and ( ZoneType < 14 ) ) + else if ( ( ZoneType > 10 ) && ( ZoneType < 14 ) ) { _Texte += Texte_inport( "double", "Umini" ) ; _Texte += Texte_inport( "double", "Umaxi" ) ; @@ -193,7 +195,7 @@ std::string YACSDriver::Texte_Iter_1_Zone( int ZoneType, const std::string pytho } // // 4.2. Cas du disque (31, 32, 33) ou du disque perce (61, 62, 63) - else if ( ( ( ZoneType > 30 ) and ( ZoneType < 34 ) ) or ( ( ZoneType > 60 ) and ( ZoneType < 64 ) ) ) + else if ( ( ( ZoneType > 30 ) && ( ZoneType < 34 ) ) || ( ( ZoneType > 60 ) && ( ZoneType < 64 ) ) ) { _Texte += Texte_inport( "double", "Ucentre" ) ; _Texte += Texte_inport( "double", "Vcentre" ) ; @@ -224,7 +226,7 @@ std::string YACSDriver::Texte_Iter_1_Zone( int ZoneType, const std::string pytho } // // 4.2. Cas du cylindre (5) ou du tuyau (7) - else if ( ZoneType == 5 or ZoneType == 7 ) + else if ( ZoneType == 5 || ZoneType == 7 ) { _Texte += Texte_inport( "double", "Xcentre" ) ; _Texte += Texte_inport( "double", "Ycentre" ) ; diff --git a/src/HOMARD/YACSDriver.hxx b/src/HOMARD/YACSDriver.hxx index 7f2aa161..89632e76 100644 --- a/src/HOMARD/YACSDriver.hxx +++ b/src/HOMARD/YACSDriver.hxx @@ -22,10 +22,12 @@ # ifndef __YACSDRIVER_H__ # define __YACSDRIVER_H__ +#include "HOMARD.hxx" + #include #include -class YACSDriver +class HOMARDIMPL_EXPORT YACSDriver { public: YACSDriver(const std::string XMLFile, const std::string DirName) ; diff --git a/src/HOMARDGUI/CMakeLists.txt b/src/HOMARDGUI/CMakeLists.txt index 5fc8bec0..cb7c3ad8 100644 --- a/src/HOMARDGUI/CMakeLists.txt +++ b/src/HOMARDGUI/CMakeLists.txt @@ -101,6 +101,7 @@ SET(_other_HEADERS HOMARDGUI_Utils.h EditFile.h HomardQtCommun.h + HOMARDGUI_Exports.hxx ) # header files / to install diff --git a/src/HOMARDGUI/HOMARDGUI.cxx b/src/HOMARDGUI/HOMARDGUI.cxx index b4050976..ca1d082e 100644 --- a/src/HOMARDGUI/HOMARDGUI.cxx +++ b/src/HOMARDGUI/HOMARDGUI.cxx @@ -21,7 +21,6 @@ // Author : Paul RASCLE, EDF // Module : HOMARD -using namespace std; #include "HOMARDGUI.h" // SALOME Includes @@ -80,6 +79,8 @@ using namespace std; #include "SALOMEDS_Study.hxx" #include "HOMARDGUI_Utils.h" +using namespace std; + static CORBA::ORB_var _orb; //======================================================================= @@ -395,7 +396,7 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID) if (obj) { // Suppression d'une frontiere - if ( HOMARD_UTILS::isBoundaryDi(obj) or HOMARD_UTILS::isBoundaryAn(obj) ) + if ( HOMARD_UTILS::isBoundaryDi(obj) || HOMARD_UTILS::isBoundaryAn(obj) ) { try { homardGen->DeleteBoundary(_ObjectName.toStdString().c_str()); } @@ -489,7 +490,7 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID) { MESSAGE("command " << theCommandID << " activated avec objet " << _ObjectName.toStdString().c_str() ); _PTR(SObject) obj = chercheMonObjet(); - if ( (obj) and ( HOMARD_UTILS::isFileType(obj,QString("log")) or HOMARD_UTILS::isFileType(obj,QString("Summary")) or HOMARD_UTILS::isFileType(obj,QString("xml")) ) ) + if ( (obj) && ( HOMARD_UTILS::isFileType(obj,QString("log")) || HOMARD_UTILS::isFileType(obj,QString("Summary")) || HOMARD_UTILS::isFileType(obj,QString("xml")) ) ) { MonEditFile *aDlg = new MonEditFile( 0, true, HOMARD::HOMARD_Gen::_duplicate(homardGen), _ObjectName, 0 ) ; if ( aDlg->_codret == 0 ) { aDlg->show(); } @@ -679,7 +680,7 @@ void HOMARDGUI::contextMenuPopup( const QString& client, QMenu* menu, QString& t EditObject = true ; DeleteObject = true ; } - else if ( HOMARD_UTILS::isFileType(obj,QString("log")) or HOMARD_UTILS::isFileType(obj,QString("Summary")) or HOMARD_UTILS::isFileType(obj,QString("xml")) ) + else if ( HOMARD_UTILS::isFileType(obj,QString("log")) || HOMARD_UTILS::isFileType(obj,QString("Summary")) || HOMARD_UTILS::isFileType(obj,QString("xml")) ) { pix = resMgr->loadPixmap( "HOMARD", "texte.png" ); menu->addAction(QIcon(pix), tr(QString("HOM_MEN_EDIT_MESS_FILE").toLatin1().data()), this, SLOT(EditAsciiFile())); diff --git a/src/HOMARDGUI/HOMARDGUI.h b/src/HOMARDGUI/HOMARDGUI.h index dd7954b6..c00798cb 100644 --- a/src/HOMARDGUI/HOMARDGUI.h +++ b/src/HOMARDGUI/HOMARDGUI.h @@ -23,6 +23,8 @@ #ifndef _HOMARDGUI_H_ #define _HOMARDGUI_H_ +#include "HOMARDGUI_Exports.hxx" + #include #include "SalomeApp_Study.h" @@ -36,7 +38,7 @@ class SalomeApp_Application; -class HOMARDGUI: public SalomeApp_Module +class HOMARD_EXPORT HOMARDGUI: public SalomeApp_Module { Q_OBJECT diff --git a/src/HOMARDGUI/HOMARDGUI_Exports.hxx b/src/HOMARDGUI/HOMARDGUI_Exports.hxx new file mode 100755 index 00000000..c1458427 --- /dev/null +++ b/src/HOMARDGUI/HOMARDGUI_Exports.hxx @@ -0,0 +1,35 @@ +// Copyright (C) 2011-2013 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#ifndef _HOMARDGUI_EXPORTS_H_ +#define _HOMARDGUI_EXPORTS_H_ + +#ifdef WIN32 + #if defined HOMARD_EXPORTS || defined Homadr_EXPORTS + #define HOMARD_EXPORT __declspec( dllexport ) + #else + #define HOMARD_EXPORT __declspec( dllimport ) + #endif +#else + #define HOMARD_EXPORT +#endif + + +#endif //_HOMARDGUI_EXPORTS_H_ + diff --git a/src/HOMARDGUI/HOMARDGUI_Utils.cxx b/src/HOMARDGUI/HOMARDGUI_Utils.cxx index 647b84a1..47f4fa6b 100644 --- a/src/HOMARDGUI/HOMARDGUI_Utils.cxx +++ b/src/HOMARDGUI/HOMARDGUI_Utils.cxx @@ -43,7 +43,9 @@ #include #include #include +#ifndef WIN32 #include +#endif SALOME_ListIO HOMARD_UTILS::mySelected; diff --git a/src/HOMARDGUI/HOMARDGUI_Utils.h b/src/HOMARDGUI/HOMARDGUI_Utils.h index ed50d74b..5a70575c 100644 --- a/src/HOMARDGUI/HOMARDGUI_Utils.h +++ b/src/HOMARDGUI/HOMARDGUI_Utils.h @@ -20,6 +20,7 @@ #ifndef HOMARD_H_UTILS #define HOMARD_H_UTILS +#include "HOMARDGUI_Exports.hxx" #include @@ -52,37 +53,39 @@ class LightApp_SelectionMgr; namespace HOMARD_UTILS { + HOMARD_EXPORT _PTR(Study) GetCStudy(const SalomeApp_Study* theStudy); - SUIT_Study* GetActiveStudy(); - _PTR(Study) GetActiveStudyDocument(); - void updateObjBrowser(); + HOMARD_EXPORT SUIT_Study* GetActiveStudy(); + HOMARD_EXPORT _PTR(Study) GetActiveStudyDocument(); - const SALOME_ListIO& selectedIO(); // Function returns a list of SALOME_InteractiveObject's from + HOMARD_EXPORT void updateObjBrowser(); + + HOMARD_EXPORT const SALOME_ListIO& selectedIO(); // Function returns a list of SALOME_InteractiveObject's from // selection manager in GUI - int IObjectCount() ; // Function returns the number of selected objects + HOMARD_EXPORT int IObjectCount() ; // Function returns the number of selected objects - Handle(SALOME_InteractiveObject) firstIObject() ; + HOMARD_EXPORT Handle(SALOME_InteractiveObject) firstIObject() ; // Function returns the first selected object in the list // of selected objects - Handle(SALOME_InteractiveObject) lastIObject() ; + HOMARD_EXPORT Handle(SALOME_InteractiveObject) lastIObject() ; // Function returns the last selected object in the list // of selected objects - bool isBoundaryAn(_PTR(SObject) MonObj); - bool isBoundaryDi(_PTR(SObject) MonObj); - bool isCase(_PTR(SObject) MonObj); - bool isHypo(_PTR(SObject) MonObj); - bool isIter(_PTR(SObject) MonObj); - bool isYACS(_PTR(SObject) MonObj); - bool isZone(_PTR(SObject) MonObj); - bool isFileType(_PTR(SObject) MonObj, QString TypeFile); - bool isObject(_PTR(SObject) MonObj, QString TypeObject, int option ); - - void PushOnHelp(QString monFichierAide, QString contexte, QString LanguageShort); + HOMARD_EXPORT bool isBoundaryAn(_PTR(SObject) MonObj); + HOMARD_EXPORT bool isBoundaryDi(_PTR(SObject) MonObj); + HOMARD_EXPORT bool isCase(_PTR(SObject) MonObj); + HOMARD_EXPORT bool isHypo(_PTR(SObject) MonObj); + HOMARD_EXPORT bool isIter(_PTR(SObject) MonObj); + HOMARD_EXPORT bool isYACS(_PTR(SObject) MonObj); + HOMARD_EXPORT bool isZone(_PTR(SObject) MonObj); + HOMARD_EXPORT bool isFileType(_PTR(SObject) MonObj, QString TypeFile); + HOMARD_EXPORT bool isObject(_PTR(SObject) MonObj, QString TypeObject, int option ); + + HOMARD_EXPORT void PushOnHelp(QString monFichierAide, QString contexte, QString LanguageShort); extern SALOME_ListIO mySelected; } diff --git a/src/HOMARDGUI/HomardQtCommun.cxx b/src/HOMARDGUI/HomardQtCommun.cxx index 4d8214ef..e7f9070a 100644 --- a/src/HOMARDGUI/HomardQtCommun.cxx +++ b/src/HOMARDGUI/HomardQtCommun.cxx @@ -27,7 +27,9 @@ #include #include #include +#ifndef WIN32 #include +#endif #include diff --git a/src/HOMARDGUI/HomardQtCommun.h b/src/HOMARDGUI/HomardQtCommun.h index 44cec4cd..83d5417c 100644 --- a/src/HOMARDGUI/HomardQtCommun.h +++ b/src/HOMARDGUI/HomardQtCommun.h @@ -20,6 +20,7 @@ #ifndef HOMARDQTCOMMUN_H #define HOMARDQTCOMMUN_H +#include "HOMARDGUI_Exports.hxx" #include #include "SALOME_Selection.h" @@ -38,17 +39,17 @@ class QComboBox; namespace HOMARD_QT_COMMUN { - QString PushNomFichier(bool avertir=true); - QString LireNomMaillage(int Medidt,int MeshId); - QString LireNomMaillage(QString aFile); + HOMARD_EXPORT QString PushNomFichier(bool avertir=true); + HOMARD_EXPORT QString LireNomMaillage(int Medidt,int MeshId); + HOMARD_EXPORT QString LireNomMaillage(QString aFile); - int OuvrirFichier(QString aFile); + HOMARD_EXPORT int OuvrirFichier(QString aFile); - std::list GetListeChamps(QString aFile); - std::list GetListeComposants(QString aFile, QString aChamp); + HOMARD_EXPORT std::list GetListeChamps(QString aFile); + HOMARD_EXPORT std::list GetListeComposants(QString aFile, QString aChamp); - QString SelectionArbreEtude(QString commentaire, int grave ); - QString SelectionCasEtude(); + HOMARD_EXPORT QString SelectionArbreEtude(QString commentaire, int grave ); + HOMARD_EXPORT QString SelectionCasEtude(); }; diff --git a/src/HOMARDGUI/MonCreateBoundaryAn.cxx b/src/HOMARDGUI/MonCreateBoundaryAn.cxx index 4c6b4fa1..91537d20 100644 --- a/src/HOMARDGUI/MonCreateBoundaryAn.cxx +++ b/src/HOMARDGUI/MonCreateBoundaryAn.cxx @@ -17,8 +17,6 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -using namespace std; - #include "MonCreateBoundaryAn.h" #include "MonCreateCase.h" @@ -38,6 +36,8 @@ using namespace std; #include "math.h" #define PI 3.141592653589793 + +using namespace std; // ------------------------------------------------------------------------------------------------------------------------ MonCreateBoundaryAn::MonCreateBoundaryAn(MonCreateCase* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen0, @@ -280,12 +280,12 @@ bool MonCreateBoundaryAn::PushOnApply() { case 1 : // il s agit d un cylindre { - if ((_BoundaryAnXcentre != SpinBox_Xcent->value()) or - (_BoundaryAnYcentre != SpinBox_Ycent->value()) or - (_BoundaryAnZcentre != SpinBox_Zcent->value()) or - (_BoundaryAnRayon != SpinBox_Radius->value()) or - (_BoundaryAnXaxis != SpinBox_Xaxis->value()) or - (_BoundaryAnYaxis != SpinBox_Yaxis->value()) or + if ((_BoundaryAnXcentre != SpinBox_Xcent->value()) || + (_BoundaryAnYcentre != SpinBox_Ycent->value()) || + (_BoundaryAnZcentre != SpinBox_Zcent->value()) || + (_BoundaryAnRayon != SpinBox_Radius->value()) || + (_BoundaryAnXaxis != SpinBox_Xaxis->value()) || + (_BoundaryAnYaxis != SpinBox_Yaxis->value()) || (_BoundaryAnZaxis != SpinBox_Zaxis->value()) ) { Chgt = true; @@ -302,9 +302,9 @@ bool MonCreateBoundaryAn::PushOnApply() case 2 : // il s agit d une sphere { - if ((_BoundaryAnXcentre != SpinBox_Xcentre->value()) or - (_BoundaryAnYcentre != SpinBox_Ycentre->value()) or - (_BoundaryAnZcentre != SpinBox_Zcentre->value()) or + if ((_BoundaryAnXcentre != SpinBox_Xcentre->value()) || + (_BoundaryAnYcentre != SpinBox_Ycentre->value()) || + (_BoundaryAnZcentre != SpinBox_Zcentre->value()) || (_BoundaryAnRayon != SpinBox_Rayon->value()) ) { Chgt = true; @@ -318,12 +318,12 @@ bool MonCreateBoundaryAn::PushOnApply() case 3 : // il s agit d un cone defini par un axe et un angle { - if ((_BoundaryAnXaxisCone != SpinBox_Cone_X1->value()) or - (_BoundaryAnYaxisCone != SpinBox_Cone_Y1->value()) or - (_BoundaryAnZaxisCone != SpinBox_Cone_Z1->value()) or - (_BoundaryAnXorigCone != SpinBox_Cone_X2->value()) or - (_BoundaryAnYorigCone != SpinBox_Cone_Y2->value()) or - (_BoundaryAnZorigCone != SpinBox_Cone_Z2->value()) or + if ((_BoundaryAnXaxisCone != SpinBox_Cone_X1->value()) || + (_BoundaryAnYaxisCone != SpinBox_Cone_Y1->value()) || + (_BoundaryAnZaxisCone != SpinBox_Cone_Z1->value()) || + (_BoundaryAnXorigCone != SpinBox_Cone_X2->value()) || + (_BoundaryAnYorigCone != SpinBox_Cone_Y2->value()) || + (_BoundaryAnZorigCone != SpinBox_Cone_Z2->value()) || (_BoundaryAngle != SpinBox_Cone_V1->value()) ) { Chgt = true; @@ -340,13 +340,13 @@ bool MonCreateBoundaryAn::PushOnApply() case 4 : // il s agit d un cone defini par les 2 rayons { - if ((_BoundaryAnXcone1 != SpinBox_Cone_X1->value()) or - (_BoundaryAnYcone1 != SpinBox_Cone_Y1->value()) or - (_BoundaryAnZcone1 != SpinBox_Cone_Z1->value()) or - (_BoundaryAnRayon1 != SpinBox_Cone_V1->value()) or - (_BoundaryAnXcone2 != SpinBox_Cone_X2->value()) or - (_BoundaryAnYcone2 != SpinBox_Cone_Y2->value()) or - (_BoundaryAnZcone2 != SpinBox_Cone_Z2->value()) or + if ((_BoundaryAnXcone1 != SpinBox_Cone_X1->value()) || + (_BoundaryAnYcone1 != SpinBox_Cone_Y1->value()) || + (_BoundaryAnZcone1 != SpinBox_Cone_Z1->value()) || + (_BoundaryAnRayon1 != SpinBox_Cone_V1->value()) || + (_BoundaryAnXcone2 != SpinBox_Cone_X2->value()) || + (_BoundaryAnYcone2 != SpinBox_Cone_Y2->value()) || + (_BoundaryAnZcone2 != SpinBox_Cone_Z2->value()) || (_BoundaryAnRayon2 != SpinBox_Cone_V2->value()) ) { Chgt = true; @@ -514,12 +514,12 @@ void MonCreateBoundaryAn::SetConeR() MESSAGE("Debut de SetConeR") // // Stockage et conversion des valeurs si elles ont change - if ((_BoundaryAnXaxisCone != SpinBox_Cone_X1->value()) or - (_BoundaryAnYaxisCone != SpinBox_Cone_Y1->value()) or - (_BoundaryAnZaxisCone != SpinBox_Cone_Z1->value()) or - (_BoundaryAnXorigCone != SpinBox_Cone_X2->value()) or - (_BoundaryAnYorigCone != SpinBox_Cone_Y2->value()) or - (_BoundaryAnZorigCone != SpinBox_Cone_Z2->value()) or + if ((_BoundaryAnXaxisCone != SpinBox_Cone_X1->value()) || + (_BoundaryAnYaxisCone != SpinBox_Cone_Y1->value()) || + (_BoundaryAnZaxisCone != SpinBox_Cone_Z1->value()) || + (_BoundaryAnXorigCone != SpinBox_Cone_X2->value()) || + (_BoundaryAnYorigCone != SpinBox_Cone_Y2->value()) || + (_BoundaryAnZorigCone != SpinBox_Cone_Z2->value()) || (_BoundaryAngle != SpinBox_Cone_V1->value()) ) { MESSAGE("Stockage et conversion") @@ -567,13 +567,13 @@ void MonCreateBoundaryAn::SetConeA() { MESSAGE("Debut de SetConeA") // Stockage et conversion des valeurs si elles ont change - if ((_BoundaryAnXcone1 != SpinBox_Cone_X1->value()) or - (_BoundaryAnYcone1 != SpinBox_Cone_Y1->value()) or - (_BoundaryAnZcone1 != SpinBox_Cone_Z1->value()) or - (_BoundaryAnRayon1 != SpinBox_Cone_V1->value()) or - (_BoundaryAnXcone2 != SpinBox_Cone_X2->value()) or - (_BoundaryAnYcone2 != SpinBox_Cone_Y2->value()) or - (_BoundaryAnZcone2 != SpinBox_Cone_Z2->value()) or + if ((_BoundaryAnXcone1 != SpinBox_Cone_X1->value()) || + (_BoundaryAnYcone1 != SpinBox_Cone_Y1->value()) || + (_BoundaryAnZcone1 != SpinBox_Cone_Z1->value()) || + (_BoundaryAnRayon1 != SpinBox_Cone_V1->value()) || + (_BoundaryAnXcone2 != SpinBox_Cone_X2->value()) || + (_BoundaryAnYcone2 != SpinBox_Cone_Y2->value()) || + (_BoundaryAnZcone2 != SpinBox_Cone_Z2->value()) || (_BoundaryAnRayon2 != SpinBox_Cone_V2->value()) ) { MESSAGE("Stockage et conversion") diff --git a/src/HOMARDGUI/MonCreateBoundaryAn.h b/src/HOMARDGUI/MonCreateBoundaryAn.h index b1bb77a0..e7476f28 100644 --- a/src/HOMARDGUI/MonCreateBoundaryAn.h +++ b/src/HOMARDGUI/MonCreateBoundaryAn.h @@ -20,6 +20,7 @@ #ifndef MON_CREATEBOUNDARYAN_H #define MON_CREATEBOUNDARYAN_H +#include "HOMARDGUI_Exports.hxx" #include #include @@ -32,7 +33,7 @@ #include class MonCreateCase; -class MonCreateBoundaryAn : public QDialog, public Ui_CreateBoundaryAn +class HOMARD_EXPORT MonCreateBoundaryAn : public QDialog, public Ui_CreateBoundaryAn { Q_OBJECT diff --git a/src/HOMARDGUI/MonCreateBoundaryDi.cxx b/src/HOMARDGUI/MonCreateBoundaryDi.cxx index 1d3541a6..18aaa246 100644 --- a/src/HOMARDGUI/MonCreateBoundaryDi.cxx +++ b/src/HOMARDGUI/MonCreateBoundaryDi.cxx @@ -17,8 +17,6 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -using namespace std; - #include "MonCreateBoundaryDi.h" #include "MonCreateListGroup.h" #include "MonCreateCase.h" @@ -31,6 +29,8 @@ using namespace std; #include "HomardQtCommun.h" #include +using namespace std; + // ------------------------------------------------------------------------------- MonCreateBoundaryDi::MonCreateBoundaryDi(MonCreateCase* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen0, diff --git a/src/HOMARDGUI/MonCreateBoundaryDi.h b/src/HOMARDGUI/MonCreateBoundaryDi.h index a2e5f316..1c227968 100644 --- a/src/HOMARDGUI/MonCreateBoundaryDi.h +++ b/src/HOMARDGUI/MonCreateBoundaryDi.h @@ -20,6 +20,7 @@ #ifndef MON_CREATEBOUNDARYDI_H #define MON_CREATEBOUNDARYDI_H +#include "HOMARDGUI_Exports.hxx" #include #include @@ -32,7 +33,7 @@ #include class MonCreateCase; -class MonCreateBoundaryDi : public QDialog, public Ui_CreateBoundaryDi +class HOMARD_EXPORT MonCreateBoundaryDi : public QDialog, public Ui_CreateBoundaryDi { Q_OBJECT diff --git a/src/HOMARDGUI/MonCreateCase.cxx b/src/HOMARDGUI/MonCreateCase.cxx index 619edf0b..a38e9d85 100644 --- a/src/HOMARDGUI/MonCreateCase.cxx +++ b/src/HOMARDGUI/MonCreateCase.cxx @@ -17,8 +17,6 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -using namespace std; - #include "MonCreateCase.h" #include "MonCreateBoundaryAn.h" #include "MonEditBoundaryAn.h" @@ -33,6 +31,11 @@ using namespace std; #include "HomardQtCommun.h" #include +#ifdef WIN32 +#include +#endif + +using namespace std; // ----------------------------------------------------------------------------------------- /* Constructs a MonCreateCase @@ -166,7 +169,11 @@ bool MonCreateCase::PushOnApply() return false; } } +#ifndef WIN32 if (chdir(aDirName.toStdString().c_str()) != 0) +#else + if (_chdir(aDirName.toStdString().c_str()) != 0) +#endif { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), QObject::tr("HOM_CASE_DIRECTORY_3") ); diff --git a/src/HOMARDGUI/MonCreateCase.h b/src/HOMARDGUI/MonCreateCase.h index 6fbbfb01..7f3d173c 100644 --- a/src/HOMARDGUI/MonCreateCase.h +++ b/src/HOMARDGUI/MonCreateCase.h @@ -20,6 +20,8 @@ #ifndef MON_CREATECASE_H #define MON_CREATECASE_H +#include "HOMARDGUI_Exports.hxx" + #include #include @@ -30,7 +32,7 @@ #include #include -class MonCreateCase : public QDialog, public Ui_CreateCase +class HOMARD_EXPORT MonCreateCase : public QDialog, public Ui_CreateCase { Q_OBJECT diff --git a/src/HOMARDGUI/MonCreateHypothesis.cxx b/src/HOMARDGUI/MonCreateHypothesis.cxx index 24ad732b..fcbfc518 100644 --- a/src/HOMARDGUI/MonCreateHypothesis.cxx +++ b/src/HOMARDGUI/MonCreateHypothesis.cxx @@ -17,8 +17,6 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -using namespace std; - #include "MonCreateHypothesis.h" #include "MonCreateListGroup.h" #include "MonCreateIteration.h" @@ -33,6 +31,8 @@ using namespace std; #include "HomardQtCommun.h" #include +using namespace std; + // ------------------------------------------------------------------------------- MonCreateHypothesis::MonCreateHypothesis(MonCreateIteration* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen0, @@ -304,7 +304,7 @@ void MonCreateHypothesis::PushZoneEdit() MESSAGE("Debut de MonCreateHypothesis::PushZoneEdit") int colonne = TWZone->currentColumn(); QTableWidgetItem * monItem = TWZone->currentItem(); - if (colonne !=2 or monItem == NULL) + if (colonne !=2 || monItem == NULL) { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), QObject::tr("HOM_HYPO_ZONE_1") ); @@ -400,7 +400,7 @@ QStringList MonCreateHypothesis::GetZonesChecked() int Pbm = 0 ; for ( int row=0; row< TWZone->rowCount(); row++) { - if ( ( TWZone->item( row, 0 )->checkState() == Qt::Checked ) and ( TWZone->item( row, 1 )->checkState() == Qt::Checked ) ) + if ( ( TWZone->item( row, 0 )->checkState() == Qt::Checked ) && ( TWZone->item( row, 1 )->checkState() == Qt::Checked ) ) { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), QObject::tr("HOM_HYPO_ZONE_3") ); @@ -502,7 +502,7 @@ void MonCreateHypothesis::SetFieldName() { MESSAGE("Debut de SetFieldName"); _aFieldName=CBFieldName->currentText(); - if (QString(_aFieldFile) == QString("") or QString(_aFieldName) == QString("") ) { return; } + if (QString(_aFieldFile) == QString("") || QString(_aFieldName) == QString("") ) { return; } int nbrow= TWCMP->rowCount() ; for ( int row=0; row < nbrow ; row++) diff --git a/src/HOMARDGUI/MonCreateHypothesis.h b/src/HOMARDGUI/MonCreateHypothesis.h index f9acdeb0..2e9ee24e 100644 --- a/src/HOMARDGUI/MonCreateHypothesis.h +++ b/src/HOMARDGUI/MonCreateHypothesis.h @@ -20,6 +20,7 @@ #ifndef MON_CREATEHYPOTHESIS_H #define MON_CREATEHYPOTHESIS_H +#include "HOMARDGUI_Exports.hxx" #include #include @@ -32,7 +33,7 @@ #include class MonCreateIteration; -class MonCreateHypothesis : public QDialog, public Ui_CreateHypothesis +class HOMARD_EXPORT MonCreateHypothesis : public QDialog, public Ui_CreateHypothesis { Q_OBJECT diff --git a/src/HOMARDGUI/MonCreateIteration.cxx b/src/HOMARDGUI/MonCreateIteration.cxx index ee962aee..5314ccc7 100644 --- a/src/HOMARDGUI/MonCreateIteration.cxx +++ b/src/HOMARDGUI/MonCreateIteration.cxx @@ -17,8 +17,6 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -using namespace std; - #include "MonCreateIteration.h" #include "MonCreateHypothesis.h" #include "MonEditHypothesis.h" @@ -31,6 +29,8 @@ using namespace std; #include "HomardQtCommun.h" #include +using namespace std; + // ----------------------------------------------------------------------------------------------------- MonCreateIteration::MonCreateIteration(QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen0, QString IterParentName ): @@ -130,7 +130,7 @@ bool MonCreateIteration::PushOnApply() HOMARD::HOMARD_Hypothesis_var _myHypothesis = myHomardGen->GetHypothesis(monHypoName.toStdString().c_str()); HOMARD::listeTypes_var ListTypes (_myHypothesis->GetAdapRefinUnRef()); int TypeAdap = ListTypes[0]; - if ( TypeAdap == 1 and LEFieldFile->text().trimmed() == QString("") ) + if ( TypeAdap == 1 && LEFieldFile->text().trimmed() == QString("") ) { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), QObject::tr("HOM_ITER_FIELD_FILE") ); diff --git a/src/HOMARDGUI/MonCreateIteration.h b/src/HOMARDGUI/MonCreateIteration.h index ce4238f8..88083ced 100644 --- a/src/HOMARDGUI/MonCreateIteration.h +++ b/src/HOMARDGUI/MonCreateIteration.h @@ -20,6 +20,7 @@ #ifndef MON_CREATEITERATION_H #define MON_CREATEITERATION_H +#include "HOMARDGUI_Exports.hxx" #include #include @@ -32,7 +33,7 @@ #include #include -class MonCreateIteration : public QDialog, public Ui_CreateIteration +class HOMARD_EXPORT MonCreateIteration : public QDialog, public Ui_CreateIteration { Q_OBJECT diff --git a/src/HOMARDGUI/MonCreateListGroup.cxx b/src/HOMARDGUI/MonCreateListGroup.cxx index 5e092b98..d7442211 100644 --- a/src/HOMARDGUI/MonCreateListGroup.cxx +++ b/src/HOMARDGUI/MonCreateListGroup.cxx @@ -17,8 +17,6 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -using namespace std; - #include "MonCreateListGroup.h" #include "MonCreateHypothesis.h" #include "MonCreateBoundaryDi.h" @@ -36,6 +34,8 @@ using namespace std; #include #include +using namespace std; + // -------------------------------------------------------------------------------------------------------------- MonCreateListGroup::MonCreateListGroup(MonCreateHypothesis* parentHyp, MonCreateBoundaryDi* parentBound, bool modal, HOMARD::HOMARD_Gen_var myHomardGen0, QString aCaseName, QStringList listeGroupesHypo) : diff --git a/src/HOMARDGUI/MonCreateListGroup.h b/src/HOMARDGUI/MonCreateListGroup.h index dd5bb3ab..0941e387 100644 --- a/src/HOMARDGUI/MonCreateListGroup.h +++ b/src/HOMARDGUI/MonCreateListGroup.h @@ -20,6 +20,7 @@ #ifndef MON_CREATELISTGROUP_H #define MON_CREATELISTGROUP_H +#include "HOMARDGUI_Exports.hxx" #include #include @@ -32,7 +33,7 @@ class MonCreateHypothesis; class MonCreateBoundaryDi; -class MonCreateListGroup : public QDialog, public Ui_CreateListGroup +class HOMARD_EXPORT MonCreateListGroup : public QDialog, public Ui_CreateListGroup { Q_OBJECT diff --git a/src/HOMARDGUI/MonCreateYACS.cxx b/src/HOMARDGUI/MonCreateYACS.cxx index 032f04f6..11cdc461 100644 --- a/src/HOMARDGUI/MonCreateYACS.cxx +++ b/src/HOMARDGUI/MonCreateYACS.cxx @@ -17,8 +17,6 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -using namespace std; - #include "MonCreateYACS.h" #include @@ -29,6 +27,10 @@ using namespace std; #include "HomardQtCommun.h" #include +#ifdef WIN32 +#include +#endif +using namespace std; // ---------------------------------------------------------------------- MonCreateYACS::MonCreateYACS (bool modal, HOMARD::HOMARD_Gen_var myHomardGen0, QString CaseName ): @@ -138,7 +140,11 @@ bool MonCreateYACS::PushOnApply() return false; } } +#ifndef WIN32 if (chdir(aDirName.toStdString().c_str()) != 0) +#else + if (_chdir(aDirName.toStdString().c_str()) != 0) +#endif { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), QObject::tr("HOM_CASE_DIRECTORY_3") ); diff --git a/src/HOMARDGUI/MonCreateYACS.h b/src/HOMARDGUI/MonCreateYACS.h index c7930682..fc84cd60 100644 --- a/src/HOMARDGUI/MonCreateYACS.h +++ b/src/HOMARDGUI/MonCreateYACS.h @@ -20,6 +20,8 @@ #ifndef MON_CREATEYACS_H #define MON_CREATEYACS_H +#include "HOMARDGUI_Exports.hxx" + #include #include @@ -30,7 +32,7 @@ #include #include -class MonCreateYACS : public QDialog, public Ui_CreateYACS +class HOMARD_EXPORT MonCreateYACS : public QDialog, public Ui_CreateYACS { Q_OBJECT diff --git a/src/HOMARDGUI/MonCreateZone.cxx b/src/HOMARDGUI/MonCreateZone.cxx index e44b3a68..1b153118 100644 --- a/src/HOMARDGUI/MonCreateZone.cxx +++ b/src/HOMARDGUI/MonCreateZone.cxx @@ -17,8 +17,6 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -using namespace std; - #include "MonCreateZone.h" #include "MonCreateHypothesis.h" @@ -36,6 +34,8 @@ using namespace std; #include #include +using namespace std; + // ---------------------------------------------------------------------- MonCreateZone::MonCreateZone(MonCreateHypothesis* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen0, @@ -344,11 +344,11 @@ bool MonCreateZone::PushOnApply() { } case 2 : // il s agit d un parallelipipede rectangle { - if ( (_ZoneXmin != SpinBox_Xmini->value()) or - (_ZoneXmax != SpinBox_Xmaxi->value()) or - (_ZoneYmin != SpinBox_Ymini->value()) or - (_ZoneYmax != SpinBox_Ymaxi->value()) or - (_ZoneZmin != SpinBox_Zmini->value()) or + if ( (_ZoneXmin != SpinBox_Xmini->value()) || + (_ZoneXmax != SpinBox_Xmaxi->value()) || + (_ZoneYmin != SpinBox_Ymini->value()) || + (_ZoneYmax != SpinBox_Ymaxi->value()) || + (_ZoneZmin != SpinBox_Zmini->value()) || (_ZoneZmax != SpinBox_Zmaxi->value()) ) { Chgt = true; @@ -360,9 +360,9 @@ bool MonCreateZone::PushOnApply() } case 4 : // il s agit d une sphere { - if ( (_ZoneXcentre != SpinBox_Xcentre->value()) or - (_ZoneYcentre != SpinBox_Ycentre->value()) or - (_ZoneZcentre != SpinBox_Zbase->value()) or + if ( (_ZoneXcentre != SpinBox_Xcentre->value()) || + (_ZoneYcentre != SpinBox_Ycentre->value()) || + (_ZoneZcentre != SpinBox_Zbase->value()) || (_ZoneRayon != SpinBox_Rayon->value()) ) { Chgt = true; @@ -381,13 +381,13 @@ bool MonCreateZone::PushOnApply() { } case 5 : // il s agit d un cylindre { - if ( (_ZoneXcentre != SpinBox_Xbase->value()) or - (_ZoneYcentre != SpinBox_Ybase->value()) or - (_ZoneZcentre != SpinBox_Zbase->value()) or - (_ZoneRayon != SpinBox_Radius->value()) or - (_ZoneHaut != SpinBox_Haut->value()) or - (_ZoneXaxis != SpinBox_Xaxis->value()) or - (_ZoneYaxis != SpinBox_Yaxis->value()) or + if ( (_ZoneXcentre != SpinBox_Xbase->value()) || + (_ZoneYcentre != SpinBox_Ybase->value()) || + (_ZoneZcentre != SpinBox_Zbase->value()) || + (_ZoneRayon != SpinBox_Radius->value()) || + (_ZoneHaut != SpinBox_Haut->value()) || + (_ZoneXaxis != SpinBox_Xaxis->value()) || + (_ZoneYaxis != SpinBox_Yaxis->value()) || (_ZoneZaxis != SpinBox_Zaxis->value()) ) { Chgt = true; @@ -410,14 +410,14 @@ bool MonCreateZone::PushOnApply() { } case 7 : // il s agit d un tuyau { - if ( (_ZoneXcentre != SpinBox_Xbase_p->value()) or - (_ZoneYcentre != SpinBox_Ybase_p->value()) or - (_ZoneZcentre != SpinBox_Zbase_p->value()) or - (_ZoneRayonInt != SpinBox_Radius_int->value()) or - (_ZoneRayon != SpinBox_Radius_ext->value()) or - (_ZoneHaut != SpinBox_Haut_p->value()) or - (_ZoneXaxis != SpinBox_Xaxis_p->value()) or - (_ZoneYaxis != SpinBox_Yaxis_p->value()) or + if ( (_ZoneXcentre != SpinBox_Xbase_p->value()) || + (_ZoneYcentre != SpinBox_Ybase_p->value()) || + (_ZoneZcentre != SpinBox_Zbase_p->value()) || + (_ZoneRayonInt != SpinBox_Radius_int->value()) || + (_ZoneRayon != SpinBox_Radius_ext->value()) || + (_ZoneHaut != SpinBox_Haut_p->value()) || + (_ZoneXaxis != SpinBox_Xaxis_p->value()) || + (_ZoneYaxis != SpinBox_Yaxis_p->value()) || (_ZoneZaxis != SpinBox_Zaxis_p->value()) ) { Chgt = true; @@ -437,25 +437,25 @@ bool MonCreateZone::PushOnApply() // Controles // Pour un rectangle ou un parallelepipede : - if ( ( _Type >= 11 and _Type <= 13 ) or _Type == 2 ) + if ( ( _Type >= 11 && _Type <= 13 ) || _Type == 2 ) { - if ((_ZoneXmin >= _ZoneXmax) and (_Xincr > 0)) { + if ((_ZoneXmin >= _ZoneXmax) && (_Xincr > 0)) { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), QObject::tr("HOM_ZONE_LIMIT").arg("X") ) ; return false; } - if ((_ZoneYmin >= _ZoneYmax) and (_Yincr > 0)) { + if ((_ZoneYmin >= _ZoneYmax) && (_Yincr > 0)) { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), QObject::tr("HOM_ZONE_LIMIT").arg("Y") ) ; return false; } - if ((_ZoneZmin >= _ZoneZmax) and (_Zincr > 0)) { + if ((_ZoneZmin >= _ZoneZmax) && (_Zincr > 0)) { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), QObject::tr("HOM_ZONE_LIMIT").arg("Z") ) ; return false; } } // L'axe pour un cylindre ou un tuyau : - if ( _Type == 5 or _Type == 7 ) + if ( _Type == 5 || _Type == 7 ) { double daux = _ZoneXaxis*_ZoneXaxis + _ZoneYaxis*_ZoneYaxis + _ZoneZaxis*_ZoneZaxis ; if ( daux < 0.0000001 ) @@ -466,7 +466,7 @@ bool MonCreateZone::PushOnApply() } } // Rayons pour disque avec trou ou un tuyau : - if ( ( _Type >= 61 and _Type <= 63 ) or _Type == 7 ) + if ( ( _Type >= 61 && _Type <= 63 ) || _Type == 7 ) { if ( _ZoneRayonInt >= _ZoneRayon ) { diff --git a/src/HOMARDGUI/MonCreateZone.h b/src/HOMARDGUI/MonCreateZone.h index 0d0419cf..16868369 100644 --- a/src/HOMARDGUI/MonCreateZone.h +++ b/src/HOMARDGUI/MonCreateZone.h @@ -20,6 +20,7 @@ #ifndef MON_CREATEZONE_H #define MON_CREATEZONE_H +#include "HOMARDGUI_Exports.hxx" #include #include @@ -31,7 +32,7 @@ #include class MonCreateHypothesis; -class MonCreateZone : public QDialog, public Ui_CreateZone +class HOMARD_EXPORT MonCreateZone : public QDialog, public Ui_CreateZone { Q_OBJECT diff --git a/src/HOMARDGUI/MonEditBoundaryAn.cxx b/src/HOMARDGUI/MonEditBoundaryAn.cxx index 12450634..1557d9a0 100644 --- a/src/HOMARDGUI/MonEditBoundaryAn.cxx +++ b/src/HOMARDGUI/MonEditBoundaryAn.cxx @@ -17,14 +17,13 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -using namespace std; - #include "MonEditBoundaryAn.h" #include "SalomeApp_Tools.h" #include "HOMARDGUI_Utils.h" #include +using namespace std; // ------------------------------------------------------------------------ MonEditBoundaryAn::MonEditBoundaryAn( MonCreateCase* parent, bool modal, diff --git a/src/HOMARDGUI/MonEditBoundaryAn.h b/src/HOMARDGUI/MonEditBoundaryAn.h index 1dfe0251..532c4940 100644 --- a/src/HOMARDGUI/MonEditBoundaryAn.h +++ b/src/HOMARDGUI/MonEditBoundaryAn.h @@ -20,6 +20,8 @@ #ifndef MON_EDITBOUNDARYAN_H #define MON_EDITBOUNDARYAN_H +#include "HOMARDGUI_Exports.hxx" + #include #include @@ -28,7 +30,7 @@ #include -class MonEditBoundaryAn : public MonCreateBoundaryAn +class HOMARD_EXPORT MonEditBoundaryAn : public MonCreateBoundaryAn { Q_OBJECT public: diff --git a/src/HOMARDGUI/MonEditBoundaryDi.cxx b/src/HOMARDGUI/MonEditBoundaryDi.cxx index 7f0c3451..b50c4c76 100644 --- a/src/HOMARDGUI/MonEditBoundaryDi.cxx +++ b/src/HOMARDGUI/MonEditBoundaryDi.cxx @@ -17,8 +17,6 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -using namespace std; - #include "MonEditBoundaryDi.h" #include "MonEditListGroup.h" @@ -29,6 +27,7 @@ using namespace std; #include "HomardQtCommun.h" #include +using namespace std; // ------------------------------------------------------------------------------------------------------------------------------------- MonEditBoundaryDi::MonEditBoundaryDi( MonCreateCase* parent, bool modal, diff --git a/src/HOMARDGUI/MonEditBoundaryDi.h b/src/HOMARDGUI/MonEditBoundaryDi.h index 6069b556..597d6b61 100644 --- a/src/HOMARDGUI/MonEditBoundaryDi.h +++ b/src/HOMARDGUI/MonEditBoundaryDi.h @@ -20,6 +20,8 @@ #ifndef MON_EDITBOUNDARYDI_H #define MON_EDITBOUNDARYDI_H +#include "HOMARDGUI_Exports.hxx" + #include #include @@ -28,7 +30,7 @@ #include -class MonEditBoundaryDi : public MonCreateBoundaryDi +class HOMARD_EXPORT MonEditBoundaryDi : public MonCreateBoundaryDi { Q_OBJECT public: diff --git a/src/HOMARDGUI/MonEditCase.cxx b/src/HOMARDGUI/MonEditCase.cxx index 1c1af9ae..eec45f6f 100644 --- a/src/HOMARDGUI/MonEditCase.cxx +++ b/src/HOMARDGUI/MonEditCase.cxx @@ -17,8 +17,6 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -using namespace std; - #include "MonEditCase.h" #include "SalomeApp_Tools.h" @@ -26,6 +24,7 @@ using namespace std; #include "HomardQtCommun.h" #include +using namespace std; // ------------------------------------------------------------- /* Constructs a MonEditCase diff --git a/src/HOMARDGUI/MonEditCase.h b/src/HOMARDGUI/MonEditCase.h index 2fcd0baf..7a0549f6 100644 --- a/src/HOMARDGUI/MonEditCase.h +++ b/src/HOMARDGUI/MonEditCase.h @@ -20,6 +20,8 @@ #ifndef MON_EDITCASE_H #define MON_EDITCASE_H +#include "HOMARDGUI_Exports.hxx" + #include #include @@ -28,7 +30,7 @@ #include -class MonEditCase : public MonCreateCase +class HOMARD_EXPORT MonEditCase : public MonCreateCase { Q_OBJECT public: diff --git a/src/HOMARDGUI/MonEditFile.cxx b/src/HOMARDGUI/MonEditFile.cxx index 8a8a8aad..25f7ef0d 100644 --- a/src/HOMARDGUI/MonEditFile.cxx +++ b/src/HOMARDGUI/MonEditFile.cxx @@ -17,8 +17,6 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -using namespace std; - #include "MonEditFile.h" #include @@ -30,6 +28,8 @@ using namespace std; #include "HomardQtCommun.h" #include +using namespace std; + /* --------------------------------------------------------- * MonEditFile classe derivee de EditFile * elle meme generee par uic diff --git a/src/HOMARDGUI/MonEditFile.h b/src/HOMARDGUI/MonEditFile.h index ebb2b5df..4517a78b 100644 --- a/src/HOMARDGUI/MonEditFile.h +++ b/src/HOMARDGUI/MonEditFile.h @@ -20,6 +20,7 @@ #ifndef MON_EDITFILE_H #define MON_EDITFILE_H +#include "HOMARDGUI_Exports.hxx" #include #include "SALOME_Selection.h" @@ -35,7 +36,7 @@ class QListBox; class QDialog; -class MonEditFile : public QWidget, public Ui_EditFile +class HOMARD_EXPORT MonEditFile : public QWidget, public Ui_EditFile { Q_OBJECT diff --git a/src/HOMARDGUI/MonEditHypothesis.cxx b/src/HOMARDGUI/MonEditHypothesis.cxx index 19478b3d..6f28eab4 100644 --- a/src/HOMARDGUI/MonEditHypothesis.cxx +++ b/src/HOMARDGUI/MonEditHypothesis.cxx @@ -17,8 +17,6 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -using namespace std; - #include "MonEditHypothesis.h" #include "MonEditListGroup.h" @@ -27,6 +25,9 @@ using namespace std; #include "HomardQtCommun.h" #include "HOMARD.hxx" #include + +using namespace std; + // ---------------------------------------------------------------------------- MonEditHypothesis::MonEditHypothesis( MonCreateIteration* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen, @@ -83,7 +84,7 @@ void MonEditHypothesis::InitValEdit() InitFieldInterp(); - if (_aTypeAdap == 1 or _TypeFieldInterp >= 1 ) + if (_aTypeAdap == 1 || _TypeFieldInterp >= 1 ) { if (_aFieldFile == QString("")) { GBFieldFile->setVisible(0); } else @@ -103,7 +104,7 @@ void MonEditHypothesis::InitValEdit() double DiamMin = aHypothesis->GetDiamMin(); int AdapInit = aHypothesis->GetAdapInit(); int LevelOutput = aHypothesis->GetLevelOutput(); - if ( NivMax > 0 or DiamMin > 0 or AdapInit != 0 or LevelOutput != 0 ) + if ( NivMax > 0 || DiamMin > 0 || AdapInit != 0 || LevelOutput != 0 ) { GBAdvancedOptions->setVisible(1); if ( NivMax > 0 ) { spinBoxNivMax->setValue(NivMax); diff --git a/src/HOMARDGUI/MonEditHypothesis.h b/src/HOMARDGUI/MonEditHypothesis.h index ffde02b9..a94a1766 100644 --- a/src/HOMARDGUI/MonEditHypothesis.h +++ b/src/HOMARDGUI/MonEditHypothesis.h @@ -20,6 +20,8 @@ #ifndef MON_EDITHYPOTHESIS_H #define MON_EDITHYPOTHESIS_H +#include "HOMARDGUI_Exports.hxx" + #include #include @@ -28,7 +30,7 @@ #include -class MonEditHypothesis : public MonCreateHypothesis +class HOMARD_EXPORT MonEditHypothesis : public MonCreateHypothesis { Q_OBJECT public: diff --git a/src/HOMARDGUI/MonEditIteration.cxx b/src/HOMARDGUI/MonEditIteration.cxx index d8f1a99b..ca231f98 100644 --- a/src/HOMARDGUI/MonEditIteration.cxx +++ b/src/HOMARDGUI/MonEditIteration.cxx @@ -17,8 +17,6 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -using namespace std; - #include "MonEditIteration.h" #include "SalomeApp_Tools.h" @@ -26,6 +24,7 @@ using namespace std; #include "HomardQtCommun.h" #include +using namespace std; // ------------------------------------------------------------------------------------------------------------------------------------- MonEditIteration::MonEditIteration ( QWidget* parent, bool modal, @@ -168,8 +167,8 @@ bool MonEditIteration::PushOnApply() if ( _aTypeAdap == 1) { // Pour du raffinement selon un champ, les instants ont-ils change ? - if ( (_FieldFile != LEFieldFile->text().trimmed()) or - ( _rank != SpinBox_Rank->value()) or + if ( (_FieldFile != LEFieldFile->text().trimmed()) || + ( _rank != SpinBox_Rank->value()) || ( _step != SpinBox_TimeStep->value())) { _FieldFile = LEFieldFile->text().trimmed(); diff --git a/src/HOMARDGUI/MonEditIteration.h b/src/HOMARDGUI/MonEditIteration.h index 2b9137ac..916422c7 100644 --- a/src/HOMARDGUI/MonEditIteration.h +++ b/src/HOMARDGUI/MonEditIteration.h @@ -20,6 +20,8 @@ #ifndef MON_EDITITERATION_H #define MON_EDITITERATION_H +#include "HOMARDGUI_Exports.hxx" + #include #include @@ -28,7 +30,7 @@ #include -class MonEditIteration : public MonCreateIteration +class HOMARD_EXPORT MonEditIteration : public MonCreateIteration { Q_OBJECT public: diff --git a/src/HOMARDGUI/MonEditListGroup.cxx b/src/HOMARDGUI/MonEditListGroup.cxx index 5ead18f1..fb72b9c3 100644 --- a/src/HOMARDGUI/MonEditListGroup.cxx +++ b/src/HOMARDGUI/MonEditListGroup.cxx @@ -17,11 +17,10 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -using namespace std; - #include "MonEditListGroup.h" #include +using namespace std; //--------------------------------------------------------------------- MonEditListGroup::MonEditListGroup( MonCreateHypothesis* parentHyp, MonCreateBoundaryDi* parentBound, diff --git a/src/HOMARDGUI/MonEditListGroup.h b/src/HOMARDGUI/MonEditListGroup.h index 3e8b099f..09286abb 100644 --- a/src/HOMARDGUI/MonEditListGroup.h +++ b/src/HOMARDGUI/MonEditListGroup.h @@ -20,6 +20,7 @@ #ifndef MON_EDITLISTGROUP_H #define MON_EDITLISTGROUP_H +#include "HOMARDGUI_Exports.hxx" #include #include @@ -31,7 +32,7 @@ class MonCreateHypothesis; class MonCreateBoundaryDi; -class MonEditListGroup : public MonCreateListGroup +class HOMARD_EXPORT MonEditListGroup : public MonCreateListGroup { Q_OBJECT diff --git a/src/HOMARDGUI/MonEditYACS.cxx b/src/HOMARDGUI/MonEditYACS.cxx index b168f2a2..9d2aa831 100644 --- a/src/HOMARDGUI/MonEditYACS.cxx +++ b/src/HOMARDGUI/MonEditYACS.cxx @@ -17,8 +17,6 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -using namespace std; - #include "MonEditYACS.h" #include "SalomeApp_Tools.h" @@ -26,6 +24,7 @@ using namespace std; #include "HomardQtCommun.h" #include +using namespace std; // ------------------------------------------------------------- /* Constructs a MonEditYACS diff --git a/src/HOMARDGUI/MonEditYACS.h b/src/HOMARDGUI/MonEditYACS.h index 3b9d5f4a..4905a696 100644 --- a/src/HOMARDGUI/MonEditYACS.h +++ b/src/HOMARDGUI/MonEditYACS.h @@ -20,6 +20,8 @@ #ifndef MON_EDITYACS_H #define MON_EDITYACS_H +#include "HOMARDGUI_Exports.hxx" + #include #include @@ -28,7 +30,7 @@ #include -class MonEditYACS : public MonCreateYACS +class HOMARD_EXPORT MonEditYACS : public MonCreateYACS { Q_OBJECT public: diff --git a/src/HOMARDGUI/MonEditZone.cxx b/src/HOMARDGUI/MonEditZone.cxx index d40ca5f3..50905a89 100644 --- a/src/HOMARDGUI/MonEditZone.cxx +++ b/src/HOMARDGUI/MonEditZone.cxx @@ -17,8 +17,6 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -using namespace std; - #include "MonEditZone.h" #include "SalomeApp_Tools.h" @@ -30,6 +28,7 @@ using namespace std; #include #include +using namespace std; // ------------------------------------------------------------------------ MonEditZone::MonEditZone( MonCreateHypothesis* parent, bool modal, diff --git a/src/HOMARDGUI/MonEditZone.h b/src/HOMARDGUI/MonEditZone.h index 90ef39ee..4ae5308c 100644 --- a/src/HOMARDGUI/MonEditZone.h +++ b/src/HOMARDGUI/MonEditZone.h @@ -20,6 +20,8 @@ #ifndef MON_EDITZONE_H #define MON_EDITZONE_H +#include "HOMARDGUI_Exports.hxx" + #include #include @@ -28,7 +30,7 @@ #include -class MonEditZone : public MonCreateZone +class HOMARD_EXPORT MonEditZone : public MonCreateZone { Q_OBJECT public: diff --git a/src/HOMARDGUI/MonIterInfo.cxx b/src/HOMARDGUI/MonIterInfo.cxx index c3dbe3ba..f2c4ce3e 100644 --- a/src/HOMARDGUI/MonIterInfo.cxx +++ b/src/HOMARDGUI/MonIterInfo.cxx @@ -17,8 +17,6 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -using namespace std; - #include "MonIterInfo.h" #include @@ -32,6 +30,7 @@ using namespace std; #include "MonEditFile.h" #include +using namespace std; // ----------------------------------------------------------------------------------------- MonIterInfo::MonIterInfo(QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen0, QString IterName) @@ -89,7 +88,7 @@ bool MonIterInfo::PushOnApply() MESSAGE("PushOnApply"); // Au moins une option a ete choisie - if ( ( _Quality == 0 ) and ( _Diametre == 0 ) and ( _Connection == 0 ) and ( _BlockSize == 0 ) and ( _Entanglement == 0 ) ) + if ( ( _Quality == 0 ) && ( _Diametre == 0 ) && ( _Connection == 0 ) && ( _BlockSize == 0 ) && ( _Entanglement == 0 ) ) { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), QObject::tr("HOM_MESH_INFO_1") ); diff --git a/src/HOMARDGUI/MonIterInfo.h b/src/HOMARDGUI/MonIterInfo.h index a86ed50d..caebd213 100644 --- a/src/HOMARDGUI/MonIterInfo.h +++ b/src/HOMARDGUI/MonIterInfo.h @@ -20,6 +20,8 @@ #ifndef MON_ITERINFO_H #define MON_ITERINFO_H +#include "HOMARDGUI_Exports.hxx" + #include #include @@ -34,7 +36,7 @@ class QListBox; -class MonIterInfo : public QDialog, public Ui_IterInfo +class HOMARD_EXPORT MonIterInfo : public QDialog, public Ui_IterInfo { Q_OBJECT diff --git a/src/HOMARDGUI/MonMeshInfo.cxx b/src/HOMARDGUI/MonMeshInfo.cxx index ab6b5b10..62e891f4 100644 --- a/src/HOMARDGUI/MonMeshInfo.cxx +++ b/src/HOMARDGUI/MonMeshInfo.cxx @@ -17,8 +17,6 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -using namespace std; - #include "MonMeshInfo.h" #include @@ -30,6 +28,11 @@ using namespace std; #include "MonEditFile.h" #include +#ifdef WIN32 +#include +#endif + +using namespace std; // ----------------------------------------------------------------------------------------- MonMeshInfo::MonMeshInfo(QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen0) @@ -112,7 +115,11 @@ bool MonMeshInfo::PushOnApply() return false; } } +#ifndef WIN32 if (chdir(aDirName.toStdString().c_str()) != 0) +#else + if (_chdir(aDirName.toStdString().c_str()) != 0) +#endif { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), QObject::tr("HOM_CASE_DIRECTORY_3") ); @@ -134,7 +141,7 @@ bool MonMeshInfo::PushOnApply() QObject::tr("HOM_MED_FILE_2") ); return false; } - if ( ( _Quality == 0 ) and ( _Diametre == 0 ) and ( _Connection == 0 ) and ( _BlockSize == 0 ) and ( _Entanglement == 0 ) ) + if ( ( _Quality == 0 ) && ( _Diametre == 0 ) && ( _Connection == 0 ) && ( _BlockSize == 0 ) && ( _Entanglement == 0 ) ) { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), QObject::tr("HOM_MESH_INFO") ); diff --git a/src/HOMARDGUI/MonMeshInfo.h b/src/HOMARDGUI/MonMeshInfo.h index 36db9be0..0058d056 100644 --- a/src/HOMARDGUI/MonMeshInfo.h +++ b/src/HOMARDGUI/MonMeshInfo.h @@ -20,6 +20,8 @@ #ifndef MON_MESHINFO_H #define MON_MESHINFO_H +#include "HOMARDGUI_Exports.hxx" + #include #include @@ -30,7 +32,7 @@ #include #include -class MonMeshInfo : public QDialog, public Ui_MeshInfo +class HOMARD_EXPORT MonMeshInfo : public QDialog, public Ui_MeshInfo { Q_OBJECT diff --git a/src/HOMARDGUI/MonPursueIteration.cxx b/src/HOMARDGUI/MonPursueIteration.cxx index 7235710f..feb96985 100644 --- a/src/HOMARDGUI/MonPursueIteration.cxx +++ b/src/HOMARDGUI/MonPursueIteration.cxx @@ -17,8 +17,6 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -using namespace std; - #include "MonPursueIteration.h" #include @@ -29,6 +27,11 @@ using namespace std; #include "HomardQtCommun.h" #include +#ifdef WIN32 +#include +#endif + +using namespace std; // ----------------------------------------------------------------------------------------- /* Constructs a MonPursueIteration @@ -105,7 +108,11 @@ bool MonPursueIteration::PushOnApply() return false; } } +#ifndef WIN32 if (chdir(aDirName.toStdString().c_str()) != 0) +#else + if (_chdir(aDirName.toStdString().c_str()) != 0) +#endif { QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), QObject::tr("HOM_CASE_DIRECTORY_3") ); diff --git a/src/HOMARDGUI/MonPursueIteration.h b/src/HOMARDGUI/MonPursueIteration.h index 03c126c3..37480de2 100644 --- a/src/HOMARDGUI/MonPursueIteration.h +++ b/src/HOMARDGUI/MonPursueIteration.h @@ -20,6 +20,8 @@ #ifndef MON_PURSUEITERATION_H #define MON_PURSUEITERATION_H +#include "HOMARDGUI_Exports.hxx" + #include #include @@ -30,7 +32,7 @@ #include #include -class MonPursueIteration : public QDialog, public Ui_PursueIteration +class HOMARD_EXPORT MonPursueIteration : public QDialog, public Ui_PursueIteration { Q_OBJECT diff --git a/src/HOMARD_I/CMakeLists.txt b/src/HOMARD_I/CMakeLists.txt index 95b3af9d..d720c9ee 100644 --- a/src/HOMARD_I/CMakeLists.txt +++ b/src/HOMARD_I/CMakeLists.txt @@ -32,6 +32,10 @@ INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/src/HOMARD ${PROJECT_SOURCE_DIR}/src/HOMARDGUI ) +# additional preprocessor / compiler flags +ADD_DEFINITIONS( + ${OMNIORB_DEFINITIONS} +) # libraries to link to SET(_link_LIBRARIES @@ -60,6 +64,7 @@ SET(HOMARDEngine_HEADERS HOMARD_Boundary_i.hxx HOMARD_YACS_i.hxx HomardMedCommun.h + HOMARD_i.hxx ) # --- sources --- diff --git a/src/HOMARD_I/HOMARD_Boundary_i.hxx b/src/HOMARD_I/HOMARD_Boundary_i.hxx index d08dd5d4..791e586e 100644 --- a/src/HOMARD_I/HOMARD_Boundary_i.hxx +++ b/src/HOMARD_I/HOMARD_Boundary_i.hxx @@ -33,6 +33,7 @@ #include CORBA_SERVER_HEADER(HOMARD_Gen) #include CORBA_SERVER_HEADER(HOMARD_Boundary) +#include "HOMARD_i.hxx" #include "SALOME_Component_i.hxx" #include "SALOME_NamingService.hxx" #include "Utils_CorbaException.hxx" @@ -41,7 +42,7 @@ class HOMARD_Boundary; -class HOMARD_Boundary_i: +class HOMARDENGINE_EXPORT HOMARD_Boundary_i: public virtual Engines_Component_i, public virtual POA_HOMARD::HOMARD_Boundary, public virtual PortableServer::ServantBase diff --git a/src/HOMARD_I/HOMARD_Cas_i.cxx b/src/HOMARD_I/HOMARD_Cas_i.cxx index 0ba88c2b..6515972f 100755 --- a/src/HOMARD_I/HOMARD_Cas_i.cxx +++ b/src/HOMARD_I/HOMARD_Cas_i.cxx @@ -36,6 +36,10 @@ #include #include +#ifdef WIN32 +#include +#endif + //============================================================================= /*! * standard constructor @@ -161,7 +165,11 @@ void HOMARD_Cas_i::SetDirName( const char* NomDir ) // D.3. Creation du futur repertoire local pour l'iteration de depart std::string nomDirIterTotal ; nomDirIterTotal = std::string(NomDir) + "/" + std::string(nomDirIter) ; +#ifndef WIN32 if (mkdir(nomDirIterTotal.c_str(), S_IRWXU|S_IRGRP|S_IXGRP) != 0) +#else + if (_mkdir(nomDirIterTotal.c_str()) != 0) +#endif { MESSAGE ( "nomDirIterTotal : " << nomDirIterTotal ) ; SALOME::ExceptionStruct es; diff --git a/src/HOMARD_I/HOMARD_Cas_i.hxx b/src/HOMARD_I/HOMARD_Cas_i.hxx index 7da9eba2..a3f032a0 100644 --- a/src/HOMARD_I/HOMARD_Cas_i.hxx +++ b/src/HOMARD_I/HOMARD_Cas_i.hxx @@ -33,6 +33,7 @@ #include CORBA_SERVER_HEADER(HOMARD_Gen) #include CORBA_SERVER_HEADER(HOMARD_Cas) +#include "HOMARD_i.hxx" #include "SALOME_Component_i.hxx" #include "SALOME_NamingService.hxx" #include "Utils_CorbaException.hxx" @@ -41,7 +42,7 @@ class HOMARD_Cas; -class HOMARD_Cas_i: +class HOMARDENGINE_EXPORT HOMARD_Cas_i: public virtual Engines_Component_i, public virtual POA_HOMARD::HOMARD_Cas, public virtual PortableServer::ServantBase diff --git a/src/HOMARD_I/HOMARD_Gen_i.cxx b/src/HOMARD_I/HOMARD_Gen_i.cxx index 344bf2ae..d38628bb 100755 --- a/src/HOMARD_I/HOMARD_Gen_i.cxx +++ b/src/HOMARD_I/HOMARD_Gen_i.cxx @@ -44,7 +44,9 @@ #include #include #include +#ifndef WIN32 #include +#endif #include #include #include @@ -54,6 +56,10 @@ #include #include +#ifdef WIN32 +#include +#endif + using namespace std; //============================================================================= @@ -379,7 +385,7 @@ CORBA::Long HOMARD_Gen_i::DeleteIterationOption(const char* nomIter, CORBA::Long int numero = myIteration->GetNumber(); MESSAGE ( "DeleteIterationOption : numero = " << numero ); - if ( numero == 0 and Option1 == 1 ) + if ( numero == 0 && Option1 == 1 ) { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; @@ -684,7 +690,7 @@ void HOMARD_Gen_i::InvalideIterInfo(const char* nomIter) SALOMEDS::AttributeComment_var aCommentAttr = SALOMEDS::AttributeComment::_narrow(anAttr); std::string value (aCommentAttr->Value()); /* MESSAGE("... value = " << value);*/ - if( (value == std::string("logInfo")) or ( value == std::string("SummaryInfo")) ) + if( (value == std::string("logInfo")) || ( value == std::string("SummaryInfo")) ) { SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder(); aStudyBuilder->RemoveObject(so); @@ -1200,7 +1206,11 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromIteration(const char* nomCas, // A. Decodage du point de reprise // A.1. Controle du repertoire de depart de l'iteration +#ifndef WIN32 codret = chdir(DirNameStart) ; +#else + codret = _chdir(DirNameStart) ; +#endif if ( codret != 0 ) { SALOME::ExceptionStruct es; @@ -1213,6 +1223,7 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromIteration(const char* nomCas, std::string file_configuration = "" ; std::string file_maillage_homard = "" ; int bilan ; +#ifndef WIN32 DIR *dp; struct dirent *dirp; dp = opendir(DirNameStart); @@ -1230,10 +1241,30 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromIteration(const char* nomCas, } } closedir(dp); +#else + HANDLE hFind = INVALID_HANDLE_VALUE; + WIN32_FIND_DATA ffd; + hFind = FindFirstFile(DirNameStart, &ffd); + if (INVALID_HANDLE_VALUE != hFind) { + while (FindNextFile(hFind, &ffd) != 0) { + if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) continue; //skip directories + std::string file_name(ffd.cFileName); + bilan = file_name.find("HOMARD.Configuration.") ; + if ( bilan != string::npos ) { file_configuration = file_name ; } + bilan = file_name.find("maill.") ; + if ( bilan != string::npos ) + { + bilan = file_name.find(".hom.med") ; + if ( bilan != string::npos ) { file_maillage_homard = file_name ; } + } + } + FindClose(hFind); + } +#endif MESSAGE ( "==> file_configuration : " << file_configuration ) ; MESSAGE ( "==> file_maillage_homard : " << file_maillage_homard ) ; // A.3. Controle - if ( ( file_configuration == "" ) or ( file_maillage_homard == "" ) ) + if ( ( file_configuration == "" ) || ( file_maillage_homard == "" ) ) { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; @@ -1272,7 +1303,7 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromIteration(const char* nomCas, NumeIter += 1 ; } // B.3. Des valeurs caracteres brutes : le second bloc de la ligne est la valeur - else if ( ( mot_cle == "TypeConf" ) or ( mot_cle == "TypeElem" ) ) + else if ( ( mot_cle == "TypeConf" ) || ( mot_cle == "TypeElem" ) ) { ligne_bis >> argument ; @@ -1291,7 +1322,7 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromIteration(const char* nomCas, } // B.4. Des valeurs caracteres : le deuxieme bloc de la ligne peut etre encadre par des quotes : // il faut les supprimer - else if ( ( mot_cle == "CCNoMNP1" ) or ( mot_cle == "CCMaiNP1" ) ) + else if ( ( mot_cle == "CCNoMNP1" ) || ( mot_cle == "CCMaiNP1" ) ) { ligne_bis >> argument ; if ( argument[0] == '"' ) { decalage = 1 ; } @@ -1348,7 +1379,11 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromIteration(const char* nomCas, Iter->SetDirNameLoc(nomDirIter); std::string nomDirIterTotal ; nomDirIterTotal = std::string(nomDirCase) + "/" + std::string(nomDirIter) ; +#ifndef WIN32 if (mkdir(nomDirIterTotal.c_str(), S_IRWXU|S_IRGRP|S_IXGRP) != 0) +#else + if (_mkdir(nomDirIterTotal.c_str()) != 0) +#endif { MESSAGE ( "nomDirIterTotal : " << nomDirIterTotal ) ; SALOME::ExceptionStruct es; @@ -1358,7 +1393,11 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromIteration(const char* nomCas, throw SALOME::SALOME_Exception(es); } // E.3. Copie du maillage HOMARD au format MED +#ifndef WIN32 codret = chdir(DirNameStart) ; +#else + codret = _chdir(DirNameStart) ; +#endif std::string commande = "cp " + file_maillage_homard + " " + nomDirIterTotal ; MESSAGE ( "commande : " << commande ) ; codret = system(commande.c_str()) ; @@ -1377,8 +1416,11 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCaseFromIteration(const char* nomCas, delete[] MeshName ; delete[] MeshFile ; +#ifndef WIN32 chdir(nomDirWork.c_str()); - +#else + _chdir(nomDirWork.c_str()); +#endif return HOMARD::HOMARD_Cas::_duplicate(myCase); } //============================================================================= @@ -1437,7 +1479,11 @@ std::string HOMARD_Gen_i::CreateCase1(const char* DirNameStart, CORBA::Long Numb int NumeIterMax = -1 ; // A.1. Controle du repertoire de depart du cas +#ifndef WIN32 codret = chdir(DirNameStart) ; +#else + codret = _chdir(DirNameStart) ; +#endif if ( codret != 0 ) { SALOME::ExceptionStruct es; @@ -1448,29 +1494,58 @@ std::string HOMARD_Gen_i::CreateCase1(const char* DirNameStart, CORBA::Long Numb }; // A.2. Reperage des sous-repertoire du repertoire de reprise bool existe = false ; +#ifndef WIN32 DIR *dp; struct dirent *dirp; dp = opendir(DirNameStart); - while ( (dirp = readdir(dp)) != NULL ) - { + while ( (dirp = readdir(dp)) != NULL ) { std::string DirName_1(dirp->d_name); - if ( ( DirName_1 != "." ) and ( DirName_1 != ".." ) ) +#else + HANDLE hFind = INVALID_HANDLE_VALUE; + WIN32_FIND_DATA ffd; + hFind = FindFirstFile(DirNameStart, &ffd); + if (INVALID_HANDLE_VALUE != hFind) { + while (FindNextFile(hFind, &ffd) != 0) { + std::string DirName_1 = ""; + if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { + DirName_1 = std::string(ffd.cFileName); + } +#endif + if ( ( DirName_1 != "." ) && ( DirName_1 != ".." ) ) { +#ifndef WIN32 if ( chdir(DirName_1.c_str()) == 0 ) { - // On cherche le fichier de configuration dans ce sous-repertoire - codret = chdir(DirNameStart) ; +// On cherche le fichier de configuration dans ce sous-repertoire + codret = chdir(DirNameStart); DIR *dp_1; struct dirent *dirp_1; dp_1 = opendir(DirName_1.c_str()) ; while ( (dirp_1 = readdir(dp_1)) != NULL ) { std::string file_name_1(dirp_1->d_name); +#else + if ( _chdir(DirName_1.c_str()) == 0 ) + { + codret = _chdir(DirNameStart); + HANDLE hFind1 = INVALID_HANDLE_VALUE; + WIN32_FIND_DATA ffd1; + hFind1 = FindFirstFile(DirName_1.c_str(), &ffd1); + while (FindNextFile(hFind1, &ffd1) != 0) + { + if (ffd1.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) continue; //skip directories + std::string file_name_1(ffd1.cFileName); +#endif int bilan = file_name_1.find("HOMARD.Configuration.") ; if ( bilan != string::npos ) { // Decodage du fichier pour trouver le numero d'iteration +#ifndef WIN32 chdir(DirName_1.c_str()) ; +#else + _chdir(DirName_1.c_str()) ; +#endif + std::ifstream fichier( file_name_1.c_str() ); if ( fichier ) // ce test échoue si le fichier n'est pas ouvert { @@ -1516,20 +1591,33 @@ std::string HOMARD_Gen_i::CreateCase1(const char* DirNameStart, CORBA::Long Numb es.text = CORBA::string_dup(text.c_str()); throw SALOME::SALOME_Exception(es); } +#ifndef WIN32 chdir(DirNameStart) ; +#else + _chdir(DirNameStart) ; +#endif } if ( existe ) { break ; } } +#ifndef WIN32 closedir(dp_1); +#else + FindClose(hFind1); +#endif if ( existe ) { break ; } - } + } } } +#ifndef WIN32 closedir(dp); + chdir(nomDirWork.c_str()); +#else + FindClose(hFind); + } + _chdir(nomDirWork.c_str()); +#endif - chdir(nomDirWork.c_str()); - - if ( ( Number >= 0 and ( not existe ) ) or ( Number < 0 and ( NumeIterMax == -1 ) ) ) + if ( ( Number >= 0 && ( !existe ) ) || ( Number < 0 && ( NumeIterMax == -1 ) ) ) { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; @@ -1577,7 +1665,7 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCase0(const char* nomCas, const char* { existeMeshFile = MEDFileExist ( MeshFile ) ; MESSAGE ( "CreateCase0 : existeMeshFile = " << existeMeshFile ); - if ( ( existeMeshFile == 0 ) and ( MeshOption == 0 ) ) + if ( ( existeMeshFile == 0 ) && ( MeshOption == 0 ) ) { SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; @@ -1892,7 +1980,7 @@ HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundaryConeA(const char* Bounda // SALOME::ExceptionStruct es; int error = 0 ; - if ( Angle <= 0.0 or Angle >= 90.0 ) + if ( Angle <= 0.0 || Angle >= 90.0 ) { es.text = "The angle must be included higher than 0 degree and lower than 90 degrees." ; error = 1 ; } double daux = fabs(Xaxe) + fabs(Yaxe) + fabs(Zaxe) ; @@ -1920,7 +2008,7 @@ HOMARD::HOMARD_Boundary_ptr HOMARD_Gen_i::CreateBoundaryConeR(const char* Bounda // SALOME::ExceptionStruct es; int error = 0 ; - if ( Rayon1 < 0.0 or Rayon2 < 0.0 ) + if ( Rayon1 < 0.0 || Rayon2 < 0.0 ) { es.text = "The radius must be positive." ; error = 1 ; } double daux = fabs(Rayon2-Rayon1) ; @@ -2066,7 +2154,7 @@ HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZonePipe(const char* ZoneName, // SALOME::ExceptionStruct es; int error = 0 ; - if ( Rayon <= 0.0 or Rayonint <= 0.0 ) + if ( Rayon <= 0.0 || Rayonint <= 0.0 ) { es.text = "The radius must be positive." ; error = 1 ; } double daux = fabs(Xaxe) + fabs(Yaxe) + fabs(Zaxe) ; @@ -2110,7 +2198,7 @@ HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneBox2D(const char* ZoneName, if ( Vmini > Vmaxi ) { es.text = "The second coordinates are not coherent." ; error = 2 ; } - if ( Orient < 1 or Orient > 3 ) + if ( Orient < 1 || Orient > 3 ) { es.text = "The orientation must be 1, 2 or 3." ; error = 3 ; } if ( error != 0 ) @@ -2144,7 +2232,7 @@ HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneBox2D(const char* ZoneName, Ymaxi = 0. ; Zmini = Umini ; Zmaxi = Umaxi ; } - else { VERIFICATION( (Orient>=1) and (Orient<=3) ) ; } + else { VERIFICATION( (Orient>=1) && (Orient<=3) ) ; } HOMARD::HOMARD_Zone_var myZone = CreateZone(ZoneName, 10+Orient) ; myZone->SetBox ( Xmini, Xmaxi, Ymini, Ymaxi, Zmini, Zmaxi) ; @@ -2164,7 +2252,7 @@ HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneDisk(const char* ZoneName, if ( Rayon <= 0.0 ) { es.text = "The radius must be positive." ; error = 1 ; } - if ( Orient < 1 or Orient > 3 ) + if ( Orient < 1 || Orient > 3 ) { es.text = "The orientation must be 1, 2 or 3." ; error = 3 ; } if ( error != 0 ) @@ -2189,7 +2277,7 @@ HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneDisk(const char* ZoneName, { Xcentre = Vcentre ; Ycentre = 0. ; Zcentre = Ucentre ; } - else { VERIFICATION( (Orient>=1) and (Orient<=3) ) ; } + else { VERIFICATION( (Orient>=1) && (Orient<=3) ) ; } HOMARD::HOMARD_Zone_var myZone = CreateZone(ZoneName, 30+Orient) ; myZone->SetCylinder( Xcentre, Ycentre, Zcentre, 0., 0., 1., Rayon, 1. ) ; @@ -2206,10 +2294,10 @@ HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneDiskWithHole(const char* ZoneNam // SALOME::ExceptionStruct es; int error = 0 ; - if ( Rayon <= 0.0 or Rayonint <= 0.0 ) + if ( Rayon <= 0.0 || Rayonint <= 0.0 ) { es.text = "The radius must be positive." ; error = 1 ; } - if ( Orient < 1 or Orient > 3 ) + if ( Orient < 1 || Orient > 3 ) { es.text = "The orientation must be 1, 2 or 3." ; error = 3 ; } if ( Rayon <= Rayonint ) @@ -2237,7 +2325,7 @@ HOMARD::HOMARD_Zone_ptr HOMARD_Gen_i::CreateZoneDiskWithHole(const char* ZoneNam { Xcentre = Vcentre ; Ycentre = 0. ; Zcentre = Ucentre ; } - else { VERIFICATION( (Orient>=1) and (Orient<=3) ) ; } + else { VERIFICATION( (Orient>=1) && (Orient<=3) ) ; } HOMARD::HOMARD_Zone_var myZone = CreateZone(ZoneName, 60+Orient) ; myZone->SetPipe( Xcentre, Ycentre, Zcentre, 0., 0., 1., Rayon, 1., Rayonint ) ; @@ -2331,7 +2419,11 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena // D. On passe dans le repertoire de l'iteration a calculer MESSAGE ( ". On passe dans DirCompute = " << DirCompute ); - chdir(DirCompute) ; +#ifndef WIN32 + chdir(DirCompute); +#else + _chdir(DirCompute); +#endif // E. Les donnees de l'execution HOMARD // E.1. L'objet du texte du fichier de configuration @@ -2462,7 +2554,12 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena { delete myDriver; MESSAGE ( ". On retourne dans nomDirWork = " << nomDirWork ); + +#ifndef WIN32 chdir(nomDirWork.c_str()); +#else + _chdir(nomDirWork.c_str()); +#endif } return codretexec ; @@ -2641,8 +2738,12 @@ CORBA::Long HOMARD_Gen_i::ComputeAdap(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOM char* HOMARD_Gen_i::CreateDirNameIter(const char* nomrep, CORBA::Long num ) { MESSAGE ( "CreateDirNameIter : nomrep ="<< nomrep << ", num = "<d_name); +#else + HANDLE hFind = INVALID_HANDLE_VALUE; + WIN32_FIND_DATA ffd; + hFind = FindFirstFile(nomrep, &ffd); + if (INVALID_HANDLE_VALUE != hFind) { + while (FindNextFile(hFind, &ffd) != 0) { + if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) continue; //skip directories + std::string file_name(ffd.cFileName); +#endif if ( file_name == DirNameA.str() ) { existe = true ; } } +#ifndef WIN32 closedir(dp); - if ( not existe ) +#else + } + FindClose(hFind); +#endif + if ( !existe ) { DirName = DirNameA.str() ; a_chercher = false ; @@ -2696,8 +2822,11 @@ char* HOMARD_Gen_i::CreateDirNameIter(const char* nomrep, CORBA::Long num ) MESSAGE ( "==> DirName = " << DirName); MESSAGE ( ". On retourne dans nomDirActuel = " << nomDirActuel ); +#ifndef WIN32 chdir(nomDirActuel.c_str()); - +#else + _chdir(nomDirActuel.c_str()); +#endif return CORBA::string_dup( DirName.c_str() ); } //============================================================================= @@ -2724,11 +2853,19 @@ char* HOMARD_Gen_i::ComputeDirManagement(HOMARD::HOMARD_Cas_var myCase, HOMARD:: MESSAGE (". DirCompute = " << DirCompute.str() ); // B.3.3. Si le sous-repertoire n'existe pas, on le cree +#ifndef WIN32 if (chdir(DirCompute.str().c_str()) != 0) { // Creation du repertoire car il n'existe pas : if (mkdir(DirCompute.str().c_str(), S_IRWXU|S_IRGRP|S_IXGRP) != 0) { +#else + if (_chdir(DirCompute.str().c_str()) != 0) + { +// Creation du repertoire car il n'existe pas : + if (_mkdir(DirCompute.str().c_str()) != 0) + { +#endif // GERALD -- QMESSAGE BOX std::cerr << "Pb Creation du repertoire DirCompute = " << DirCompute.str() << std::endl; VERIFICATION("Pb a la creation du repertoire" == 0); @@ -2755,6 +2892,7 @@ char* HOMARD_Gen_i::ComputeDirManagement(HOMARD::HOMARD_Cas_var myCase, HOMARD:: { if (etatMenage == 0) { +#ifndef WIN32 DIR *dp; struct dirent *dirp; dp = opendir(DirCompute.str().c_str()); @@ -2765,6 +2903,20 @@ char* HOMARD_Gen_i::ComputeDirManagement(HOMARD::HOMARD_Cas_var myCase, HOMARD:: result = file_name.empty() || file_name == "." || file_name == ".."; //if any file - break and return false } closedir(dp); +#else + HANDLE hFind = INVALID_HANDLE_VALUE; + WIN32_FIND_DATA ffd; + hFind = FindFirstFile(DirCompute.str().c_str(), &ffd); + bool result = true; + if (INVALID_HANDLE_VALUE != hFind) { + while (FindNextFile(hFind, &ffd) != 0) { + if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) continue; //skip directories + std::string file_name(ffd.cFileName); + result = file_name.empty() || file_name == "." || file_name == ".."; //if any file - break and return false + } + } + FindClose(hFind); +#endif if ( result == false) { SALOME::ExceptionStruct es; @@ -2825,13 +2977,13 @@ void HOMARD_Gen_i::DriverTexteZone(HOMARD::HOMARD_Hypothesis_var myHypo, HomardD MESSAGE ( "... ZoneType = " << ZoneType << ", TypeUse = "<GetCoords(); - if ( ZoneType == 2 or ( ZoneType>=11 and ZoneType <=13 ) ) // Cas d un parallelepipede ou d'un rectangle + if ( ZoneType == 2 || ( ZoneType>=11 && ZoneType <=13 ) ) // Cas d un parallelepipede ou d'un rectangle { myDriver->TexteZone(NumZone, ZoneType, TypeUse, (*zone)[0], (*zone)[1], (*zone)[2], (*zone)[3], (*zone)[4], (*zone)[5], 0., 0., 0.); } else if ( ZoneType == 4 ) // Cas d une sphere { myDriver->TexteZone(NumZone, ZoneType, TypeUse, (*zone)[0], (*zone)[1], (*zone)[2], (*zone)[3], 0., 0., 0., 0., 0.); } - else if ( ZoneType == 5 or ( ZoneType>=31 and ZoneType <=33 ) ) // Cas d un cylindre ou d'un disque + else if ( ZoneType == 5 || ( ZoneType>=31 && ZoneType <=33 ) ) // Cas d un cylindre ou d'un disque { myDriver->TexteZone(NumZone, ZoneType, TypeUse, (*zone)[0], (*zone)[1], (*zone)[2], (*zone)[3], (*zone)[4], (*zone)[5], (*zone)[6], (*zone)[7], 0.); } - else if ( ZoneType == 7 or ( ZoneType>=61 and ZoneType <=63 ) ) // Cas d un tuyau ou disque perce + else if ( ZoneType == 7 || ( ZoneType>=61 && ZoneType <=63 ) ) // Cas d un tuyau ou disque perce { myDriver->TexteZone(NumZone, ZoneType, TypeUse, (*zone)[0], (*zone)[1], (*zone)[2], (*zone)[3], (*zone)[4], (*zone)[5], (*zone)[6], (*zone)[7], (*zone)[8]); } else { VERIFICATION("ZoneType est incorrect." == 0) ; } iaux += 1 ; @@ -3116,7 +3268,7 @@ SALOMEDS::SObject_ptr HOMARD_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy, addInStudy(theStudy); // Controle de la non publication d'un objet de meme nom - if ( (!aBoundary->_is_nil()) or (!aHypo->_is_nil()) or (!aYACS->_is_nil()) or (!aZone->_is_nil()) ) + if ( (!aBoundary->_is_nil()) || (!aHypo->_is_nil()) || (!aYACS->_is_nil()) || (!aZone->_is_nil()) ) { SALOMEDS::Study::ListOfSObject_var listSO = theStudy->FindObjectByName(theName, ComponentDataType()); if (listSO->length() >= 1) @@ -4741,6 +4893,7 @@ char* HOMARD_Gen_i::GetLanguageShort() //============================================================================= extern "C" { + HOMARDENGINE_EXPORT PortableServer::ObjectId* HOMARDEngine_factory(CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, PortableServer::ObjectId* contId, diff --git a/src/HOMARD_I/HOMARD_Gen_i.hxx b/src/HOMARD_I/HOMARD_Gen_i.hxx index edfd2e9c..0800863c 100644 --- a/src/HOMARD_I/HOMARD_Gen_i.hxx +++ b/src/HOMARD_I/HOMARD_Gen_i.hxx @@ -31,6 +31,7 @@ #include CORBA_CLIENT_HEADER(SALOMEDS) #include CORBA_CLIENT_HEADER(SALOMEDS_Attributes) +#include "HOMARD_i.hxx" #include "HOMARD_Gen.hxx" #include "HomardDriver.hxx" #include "YACSDriver.hxx" @@ -42,7 +43,7 @@ #include #include -class HOMARD_Gen_i: +class HOMARDENGINE_EXPORT HOMARD_Gen_i: public virtual Engines_Component_i, public virtual POA_HOMARD::HOMARD_Gen { diff --git a/src/HOMARD_I/HOMARD_Hypothesis_i.hxx b/src/HOMARD_I/HOMARD_Hypothesis_i.hxx index cfbfe66a..e60fe1f7 100644 --- a/src/HOMARD_I/HOMARD_Hypothesis_i.hxx +++ b/src/HOMARD_I/HOMARD_Hypothesis_i.hxx @@ -33,6 +33,7 @@ #include CORBA_SERVER_HEADER(HOMARD_Gen) #include CORBA_SERVER_HEADER(HOMARD_Hypothesis) +#include "HOMARD_i.hxx" #include "SALOME_Component_i.hxx" #include "SALOME_NamingService.hxx" #include "Utils_CorbaException.hxx" @@ -41,7 +42,7 @@ class HOMARD_Hypothesis; -class HOMARD_Hypothesis_i: +class HOMARDENGINE_EXPORT HOMARD_Hypothesis_i: public virtual Engines_Component_i, public virtual POA_HOMARD::HOMARD_Hypothesis, public virtual PortableServer::ServantBase diff --git a/src/HOMARD_I/HOMARD_Iteration_i.hxx b/src/HOMARD_I/HOMARD_Iteration_i.hxx index 15802f6a..7eecccf2 100644 --- a/src/HOMARD_I/HOMARD_Iteration_i.hxx +++ b/src/HOMARD_I/HOMARD_Iteration_i.hxx @@ -33,6 +33,7 @@ #include CORBA_SERVER_HEADER(HOMARD_Gen) #include CORBA_SERVER_HEADER(HOMARD_Iteration) +#include "HOMARD_i.hxx" #include "SALOME_Component_i.hxx" #include "SALOME_NamingService.hxx" #include "Utils_CorbaException.hxx" @@ -41,7 +42,7 @@ class HOMARD_Iteration; -class HOMARD_Iteration_i: +class HOMARDENGINE_EXPORT HOMARD_Iteration_i: public virtual Engines_Component_i, public virtual POA_HOMARD::HOMARD_Iteration, public virtual PortableServer::ServantBase diff --git a/src/HOMARD_I/HOMARD_YACS_i.hxx b/src/HOMARD_I/HOMARD_YACS_i.hxx index f3c2fc4a..c67cfab7 100644 --- a/src/HOMARD_I/HOMARD_YACS_i.hxx +++ b/src/HOMARD_I/HOMARD_YACS_i.hxx @@ -33,6 +33,7 @@ #include CORBA_SERVER_HEADER(HOMARD_Gen) #include CORBA_SERVER_HEADER(HOMARD_YACS) +#include "HOMARD_i.hxx" #include "SALOME_Component_i.hxx" #include "SALOME_NamingService.hxx" #include "Utils_CorbaException.hxx" @@ -41,7 +42,7 @@ class HOMARD_YACS; -class HOMARD_YACS_i: +class HOMARDENGINE_EXPORT HOMARD_YACS_i: public virtual Engines_Component_i, public virtual POA_HOMARD::HOMARD_YACS, public virtual PortableServer::ServantBase diff --git a/src/HOMARD_I/HOMARD_Zone_i.hxx b/src/HOMARD_I/HOMARD_Zone_i.hxx index 6b760fad..6f5abdf7 100644 --- a/src/HOMARD_I/HOMARD_Zone_i.hxx +++ b/src/HOMARD_I/HOMARD_Zone_i.hxx @@ -33,6 +33,7 @@ #include CORBA_SERVER_HEADER(HOMARD_Gen) #include CORBA_SERVER_HEADER(HOMARD_Zone) +#include "HOMARD_i.hxx" #include "SALOME_Component_i.hxx" #include "SALOME_NamingService.hxx" #include "Utils_CorbaException.hxx" @@ -41,7 +42,7 @@ class HOMARD_Zone; -class HOMARD_Zone_i: +class HOMARDENGINE_EXPORT HOMARD_Zone_i: public virtual Engines_Component_i, public virtual POA_HOMARD::HOMARD_Zone, public virtual PortableServer::ServantBase diff --git a/src/HOMARD_I/HOMARD_i.hxx b/src/HOMARD_I/HOMARD_i.hxx new file mode 100755 index 00000000..a2cfcfc6 --- /dev/null +++ b/src/HOMARD_I/HOMARD_i.hxx @@ -0,0 +1,35 @@ +// Copyright (C) 2011-2013 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#ifndef _HOMARD_I_HXX_ +#define _HOMARD_I_HXX_ + +#ifdef WIN32 + #if defined HOMARDENGINE_EXPORTS || defined HOMARDEngine_EXPORTS + #define HOMARDENGINE_EXPORT __declspec( dllexport ) + #else + #define HOMARDENGINE_EXPORT __declspec( dllimport ) + #endif +#else + #define HOMARDENGINE_EXPORT +#endif + +#endif //_HOMARD_I_HXX_ + + diff --git a/src/HOMARD_I/HomardMedCommun.h b/src/HOMARD_I/HomardMedCommun.h index 5502f080..09aea6ec 100644 --- a/src/HOMARD_I/HomardMedCommun.h +++ b/src/HOMARD_I/HomardMedCommun.h @@ -20,12 +20,13 @@ #ifndef HOMARDMEDCOMMUN_H #define HOMARDMEDCOMMUN_H +#include "HOMARD_i.hxx" #include #include #include -int MEDFileExist( const char * aFile ); -std::vector GetBoundingBoxInMedFile( const char * aFile); -std::set GetListeGroupesInMedFile(const char * aFile); +HOMARDENGINE_EXPORT int MEDFileExist( const char * aFile ); +HOMARDENGINE_EXPORT std::vector GetBoundingBoxInMedFile( const char * aFile); +HOMARDENGINE_EXPORT std::set GetListeGroupesInMedFile(const char * aFile); #endif // HOMARD%MEDCOMMUN_H -- 2.39.2