From: abd Date: Mon, 17 Apr 2006 14:07:09 +0000 (+0000) Subject: First executable version X-Git-Tag: LAST_STABLE_VERSION_21_09_2006_ON_3_2_0~44 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4a90225df0a681cf66b78dc7e0500f702e5e3843;p=modules%2Fsmesh.git First executable version --- diff --git a/src/Controls/SMESH_ControlsDef.hxx b/src/Controls/SMESH_ControlsDef.hxx index 576b1e8e0..9fd86a033 100644 --- a/src/Controls/SMESH_ControlsDef.hxx +++ b/src/Controls/SMESH_ControlsDef.hxx @@ -35,6 +35,16 @@ #include "SMESH_Controls.hxx" +#ifdef WNT + #if defined SMESHCONTROLS_EXPORTS + #define SMESHCONTROLS_EXPORT __declspec( dllexport ) + #else + #define SMESHCONTROLS_EXPORT __declspec( dllimport ) + #endif +#else + #define SMESHCONTROLS_EXPORT +#endif + class SMDS_MeshElement; class SMDS_MeshFace; class SMDS_MeshNode; @@ -46,11 +56,10 @@ class SMESHDS_SubMesh; class gp_Pnt; class TopoDS_Shape; - namespace SMESH{ namespace Controls{ - class TSequenceOfXYZ: public std::vector + class SMESHCONTROLS_EXPORT TSequenceOfXYZ: public std::vector { public: typedef std::vector TSuperClass; @@ -97,7 +106,7 @@ namespace SMESH{ Class : Functor Description : Root of all Functors */ - class Functor + class SMESHCONTROLS_EXPORT Functor { public: ~Functor(){} @@ -109,7 +118,7 @@ namespace SMESH{ Class : NumericalFunctor Description : Root of all Functors returning numeric value */ - class NumericalFunctor: public virtual Functor{ + class SMESHCONTROLS_EXPORT NumericalFunctor: public virtual Functor{ public: NumericalFunctor(); virtual void SetMesh( const SMDS_Mesh* theMesh ); @@ -134,7 +143,7 @@ namespace SMESH{ Class : Volume Description : Functor calculating volume of 3D mesh element */ - class Volume: public virtual NumericalFunctor{ + class SMESHCONTROLS_EXPORT Volume: public virtual NumericalFunctor{ public: virtual double GetValue( long theElementId ); //virtual double GetValue( const TSequenceOfXYZ& thePoints ); @@ -147,7 +156,7 @@ namespace SMESH{ Class : SMESH_MinimumAngle Description : Functor for calculation of minimum angle */ - class MinimumAngle: public virtual NumericalFunctor{ + class SMESHCONTROLS_EXPORT MinimumAngle: public virtual NumericalFunctor{ public: virtual double GetValue( const TSequenceOfXYZ& thePoints ); virtual double GetBadRate( double Value, int nbNodes ) const; @@ -159,7 +168,7 @@ namespace SMESH{ Class : AspectRatio Description : Functor for calculating aspect ratio */ - class AspectRatio: public virtual NumericalFunctor{ + class SMESHCONTROLS_EXPORT AspectRatio: public virtual NumericalFunctor{ public: virtual double GetValue( const TSequenceOfXYZ& thePoints ); virtual double GetBadRate( double Value, int nbNodes ) const; @@ -171,7 +180,7 @@ namespace SMESH{ Class : AspectRatio3D Description : Functor for calculating aspect ratio of 3D elems. */ - class AspectRatio3D: public virtual NumericalFunctor{ + class SMESHCONTROLS_EXPORT AspectRatio3D: public virtual NumericalFunctor{ public: virtual double GetValue( const TSequenceOfXYZ& thePoints ); virtual double GetBadRate( double Value, int nbNodes ) const; @@ -183,7 +192,7 @@ namespace SMESH{ Class : Warping Description : Functor for calculating warping */ - class Warping: public virtual NumericalFunctor{ + class SMESHCONTROLS_EXPORT Warping: public virtual NumericalFunctor{ public: virtual double GetValue( const TSequenceOfXYZ& thePoints ); virtual double GetBadRate( double Value, int nbNodes ) const; @@ -198,7 +207,7 @@ namespace SMESH{ Class : Taper Description : Functor for calculating taper */ - class Taper: public virtual NumericalFunctor{ + class SMESHCONTROLS_EXPORT Taper: public virtual NumericalFunctor{ public: virtual double GetValue( const TSequenceOfXYZ& thePoints ); virtual double GetBadRate( double Value, int nbNodes ) const; @@ -210,7 +219,7 @@ namespace SMESH{ Class : Skew Description : Functor for calculating skew in degrees */ - class Skew: public virtual NumericalFunctor{ + class SMESHCONTROLS_EXPORT Skew: public virtual NumericalFunctor{ public: virtual double GetValue( const TSequenceOfXYZ& thePoints ); virtual double GetBadRate( double Value, int nbNodes ) const; @@ -222,7 +231,7 @@ namespace SMESH{ Class : Area Description : Functor for calculating area */ - class Area: public virtual NumericalFunctor{ + class SMESHCONTROLS_EXPORT Area: public virtual NumericalFunctor{ public: virtual double GetValue( const TSequenceOfXYZ& thePoints ); virtual double GetBadRate( double Value, int nbNodes ) const; @@ -234,7 +243,7 @@ namespace SMESH{ Class : Length Description : Functor for calculating length of edge */ - class Length: public virtual NumericalFunctor{ + class SMESHCONTROLS_EXPORT Length: public virtual NumericalFunctor{ public: virtual double GetValue( const TSequenceOfXYZ& thePoints ); virtual double GetBadRate( double Value, int nbNodes ) const; @@ -245,7 +254,7 @@ namespace SMESH{ Class : Length2D Description : Functor for calculating length of edge */ - class Length2D: public virtual NumericalFunctor{ + class SMESHCONTROLS_EXPORT Length2D: public virtual NumericalFunctor{ public: virtual double GetValue( long theElementId ); virtual double GetBadRate( double Value, int nbNodes ) const; @@ -266,7 +275,7 @@ namespace SMESH{ Class : MultiConnection Description : Functor for calculating number of faces conneted to the edge */ - class MultiConnection: public virtual NumericalFunctor{ + class SMESHCONTROLS_EXPORT MultiConnection: public virtual NumericalFunctor{ public: virtual double GetValue( long theElementId ); virtual double GetValue( const TSequenceOfXYZ& thePoints ); @@ -278,7 +287,7 @@ namespace SMESH{ Class : MultiConnection2D Description : Functor for calculating number of faces conneted to the edge */ - class MultiConnection2D: public virtual NumericalFunctor{ + class SMESHCONTROLS_EXPORT MultiConnection2D: public virtual NumericalFunctor{ public: virtual double GetValue( long theElementId ); virtual double GetValue( const TSequenceOfXYZ& thePoints ); @@ -301,7 +310,7 @@ namespace SMESH{ Class : Predicate Description : Base class for all predicates */ - class Predicate: public virtual Functor{ + class SMESHCONTROLS_EXPORT Predicate: public virtual Functor{ public: virtual bool IsSatisfy( long theElementId ) = 0; virtual SMDSAbs_ElementType GetType() const = 0; @@ -313,7 +322,7 @@ namespace SMESH{ Class : FreeBorders Description : Predicate for free borders */ - class FreeBorders: public virtual Predicate{ + class SMESHCONTROLS_EXPORT FreeBorders: public virtual Predicate{ public: FreeBorders(); virtual void SetMesh( const SMDS_Mesh* theMesh ); @@ -329,7 +338,7 @@ namespace SMESH{ Class : BadOrientedVolume Description : Predicate bad oriented volumes */ - class BadOrientedVolume: public virtual Predicate{ + class SMESHCONTROLS_EXPORT BadOrientedVolume: public virtual Predicate{ public: BadOrientedVolume(); virtual void SetMesh( const SMDS_Mesh* theMesh ); @@ -345,7 +354,7 @@ namespace SMESH{ Class : FreeEdges Description : Predicate for free Edges */ - class FreeEdges: public virtual Predicate{ + class SMESHCONTROLS_EXPORT FreeEdges: public virtual Predicate{ public: FreeEdges(); virtual void SetMesh( const SMDS_Mesh* theMesh ); @@ -376,7 +385,7 @@ namespace SMESH{ 2. With SetRangeStr method. Parameter of this method is a string like as "1,2,3,50-60,63,67,70-" */ - class RangeOfIds: public virtual Predicate + class SMESHCONTROLS_EXPORT RangeOfIds: public virtual Predicate { public: RangeOfIds(); @@ -406,7 +415,7 @@ namespace SMESH{ Class : Comparator Description : Base class for comparators */ - class Comparator: public virtual Predicate{ + class SMESHCONTROLS_EXPORT Comparator: public virtual Predicate{ public: Comparator(); virtual ~Comparator(); @@ -428,7 +437,7 @@ namespace SMESH{ Class : LessThan Description : Comparator "<" */ - class LessThan: public virtual Comparator{ + class SMESHCONTROLS_EXPORT LessThan: public virtual Comparator{ public: virtual bool IsSatisfy( long theElementId ); }; @@ -438,7 +447,7 @@ namespace SMESH{ Class : MoreThan Description : Comparator ">" */ - class MoreThan: public virtual Comparator{ + class SMESHCONTROLS_EXPORT MoreThan: public virtual Comparator{ public: virtual bool IsSatisfy( long theElementId ); }; @@ -448,7 +457,7 @@ namespace SMESH{ Class : EqualTo Description : Comparator "=" */ - class EqualTo: public virtual Comparator{ + class SMESHCONTROLS_EXPORT EqualTo: public virtual Comparator{ public: EqualTo(); virtual bool IsSatisfy( long theElementId ); @@ -465,7 +474,7 @@ namespace SMESH{ Class : LogicalNOT Description : Logical NOT predicate */ - class LogicalNOT: public virtual Predicate{ + class SMESHCONTROLS_EXPORT LogicalNOT: public virtual Predicate{ public: LogicalNOT(); virtual ~LogicalNOT(); @@ -484,7 +493,7 @@ namespace SMESH{ Class : LogicalBinary Description : Base class for binary logical predicate */ - class LogicalBinary: public virtual Predicate{ + class SMESHCONTROLS_EXPORT LogicalBinary: public virtual Predicate{ public: LogicalBinary(); virtual ~LogicalBinary(); @@ -504,7 +513,7 @@ namespace SMESH{ Class : LogicalAND Description : Logical AND */ - class LogicalAND: public virtual LogicalBinary{ + class SMESHCONTROLS_EXPORT LogicalAND: public virtual LogicalBinary{ public: virtual bool IsSatisfy( long theElementId ); }; @@ -514,7 +523,7 @@ namespace SMESH{ Class : LogicalOR Description : Logical OR */ - class LogicalOR: public virtual LogicalBinary{ + class SMESHCONTROLS_EXPORT LogicalOR: public virtual LogicalBinary{ public: virtual bool IsSatisfy( long theElementId ); }; @@ -524,7 +533,7 @@ namespace SMESH{ Class : ManifoldPart Description : Predicate for manifold part of mesh */ - class ManifoldPart: public virtual Predicate{ + class SMESHCONTROLS_EXPORT ManifoldPart: public virtual Predicate{ public: /* internal class for algorithm uses */ @@ -599,7 +608,7 @@ namespace SMESH{ Description : Predicate elements that lying on indicated surface (plane or cylinder) */ - class ElementsOnSurface : public virtual Predicate { + class SMESHCONTROLS_EXPORT ElementsOnSurface : public virtual Predicate { public: ElementsOnSurface(); ~ElementsOnSurface(); @@ -631,7 +640,7 @@ namespace SMESH{ /* FILTER */ - class Filter{ + class SMESHCONTROLS_EXPORT Filter{ public: Filter(); virtual ~Filter(); diff --git a/src/Driver/Driver_Document.h b/src/Driver/Driver_Document.h index 8d4ff5a68..17a4236bc 100644 --- a/src/Driver/Driver_Document.h +++ b/src/Driver/Driver_Document.h @@ -20,11 +20,13 @@ #ifndef _INCLUDE_DRIVER_DOCUMENT #define _INCLUDE_DRIVER_DOCUMENT +#include "Driver_Mesh.h" + #include class SMESHDS_Document; -class Driver_Document +class MESHDRIVER_EXPORT Driver_Document { public: Driver_Document(); diff --git a/src/Driver/Driver_Mesh.h b/src/Driver/Driver_Mesh.h index 14ca22fd1..94415434a 100644 --- a/src/Driver/Driver_Mesh.h +++ b/src/Driver/Driver_Mesh.h @@ -29,13 +29,17 @@ #include -#if defined WNT && defined WIN32 && defined DRIVER_EXPORTS -#define DRIVER_WNT_EXPORT __declspec( dllexport ) +#ifdef WNT + #if defined MESHDRIVER_EXPORTS + #define MESHDRIVER_EXPORT __declspec( dllexport ) + #else + #define MESHDRIVER_EXPORT __declspec( dllimport ) + #endif #else -#define DRIVER_WNT_EXPORT + #define MESHDRIVER_EXPORT #endif -class DRIVER_WNT_EXPORT Driver_Mesh +class MESHDRIVER_EXPORT Driver_Mesh { public: Driver_Mesh(); diff --git a/src/Driver/Driver_SMDS_Mesh.h b/src/Driver/Driver_SMDS_Mesh.h index 1ea37562d..6a2be120d 100644 --- a/src/Driver/Driver_SMDS_Mesh.h +++ b/src/Driver/Driver_SMDS_Mesh.h @@ -24,7 +24,7 @@ class SMDS_Mesh; -class Driver_SMDS_Mesh: public Driver_Mesh +class MESHDRIVER_EXPORT Driver_SMDS_Mesh: public Driver_Mesh { public: Driver_SMDS_Mesh(); diff --git a/src/Driver/Driver_SMESHDS_Mesh.h b/src/Driver/Driver_SMESHDS_Mesh.h index 30e059522..6504e044c 100644 --- a/src/Driver/Driver_SMESHDS_Mesh.h +++ b/src/Driver/Driver_SMESHDS_Mesh.h @@ -24,13 +24,7 @@ class SMESHDS_Mesh; -#if defined WNT && defined WIN32 && defined DRIVER_EXPORTS -#define DRIVER_WNT_EXPORT __declspec( dllexport ) -#else -#define DRIVER_WNT_EXPORT -#endif - -class DRIVER_WNT_EXPORT Driver_SMESHDS_Mesh: public Driver_Mesh +class MESHDRIVER_EXPORT Driver_SMESHDS_Mesh: public Driver_Mesh { public: Driver_SMESHDS_Mesh(); @@ -38,7 +32,6 @@ class DRIVER_WNT_EXPORT Driver_SMESHDS_Mesh: public Driver_Mesh protected: SMESHDS_Mesh *myMesh; - }; #endif diff --git a/src/DriverDAT/DriverDAT_R_SMDS_Mesh.h b/src/DriverDAT/DriverDAT_R_SMDS_Mesh.h index d955cf7b7..3fb011078 100644 --- a/src/DriverDAT/DriverDAT_R_SMDS_Mesh.h +++ b/src/DriverDAT/DriverDAT_R_SMDS_Mesh.h @@ -20,9 +20,11 @@ #ifndef _INCLUDE_DRIVERDAT_R_SMDS_MESH #define _INCLUDE_DRIVERDAT_R_SMDS_MESH +#include "SMESH_DriverDAT.hxx" + #include "Driver_SMDS_Mesh.h" -class DriverDAT_R_SMDS_Mesh: public Driver_SMDS_Mesh +class MESHDRIVERDAT_EXPORT DriverDAT_R_SMDS_Mesh: public Driver_SMDS_Mesh { public: virtual Status Perform(); diff --git a/src/DriverDAT/DriverDAT_R_SMESHDS_Document.h b/src/DriverDAT/DriverDAT_R_SMESHDS_Document.h index 3d63ced6a..6e5508684 100644 --- a/src/DriverDAT/DriverDAT_R_SMESHDS_Document.h +++ b/src/DriverDAT/DriverDAT_R_SMESHDS_Document.h @@ -20,9 +20,11 @@ #ifndef _INCLUDE_DRIVERDAT_R_SMESHDS_DOCUMENT #define _INCLUDE_DRIVERDAT_R_SMESHDS_DOCUMENT +#include "SMESH_DriverDAT.hxx" + #include "Driver_Document.h" -class DriverDAT_R_SMESHDS_Document : public Driver_Document +class MESHDRIVERDAT_EXPORT DriverDAT_R_SMESHDS_Document : public Driver_Document {}; #endif diff --git a/src/DriverDAT/DriverDAT_R_SMESHDS_Mesh.h b/src/DriverDAT/DriverDAT_R_SMESHDS_Mesh.h index e74967581..64fd36a1b 100644 --- a/src/DriverDAT/DriverDAT_R_SMESHDS_Mesh.h +++ b/src/DriverDAT/DriverDAT_R_SMESHDS_Mesh.h @@ -20,9 +20,11 @@ #ifndef _INCLUDE_DRIVERDAT_R_SMESHDS_MESH #define _INCLUDE_DRIVERDAT_R_SMESHDS_MESH +#include "SMESH_DriverDAT.hxx" + #include "Driver_SMESHDS_Mesh.h" -class DriverDAT_R_SMESHDS_Mesh: public Driver_SMESHDS_Mesh +class MESHDRIVERDAT_EXPORT DriverDAT_R_SMESHDS_Mesh: public Driver_SMESHDS_Mesh {}; #endif diff --git a/src/DriverDAT/DriverDAT_W_SMDS_Mesh.h b/src/DriverDAT/DriverDAT_W_SMDS_Mesh.h index ebd3d642e..43f13a9df 100644 --- a/src/DriverDAT/DriverDAT_W_SMDS_Mesh.h +++ b/src/DriverDAT/DriverDAT_W_SMDS_Mesh.h @@ -27,9 +27,11 @@ #ifndef _INCLUDE_DRIVERDAT_W_SMDS_MESH #define _INCLUDE_DRIVERDAT_W_SMDS_MESH +#include "SMESH_DriverDAT.hxx" + #include "Driver_SMDS_Mesh.h" -class DriverDAT_W_SMDS_Mesh: public Driver_SMDS_Mesh +class MESHDRIVERDAT_EXPORT DriverDAT_W_SMDS_Mesh: public Driver_SMDS_Mesh { public: virtual Status Perform(); diff --git a/src/DriverDAT/DriverDAT_W_SMESHDS_Document.h b/src/DriverDAT/DriverDAT_W_SMESHDS_Document.h index 6b2bad5a0..f9118f0e3 100644 --- a/src/DriverDAT/DriverDAT_W_SMESHDS_Document.h +++ b/src/DriverDAT/DriverDAT_W_SMESHDS_Document.h @@ -20,9 +20,11 @@ #ifndef _INCLUDE_DRIVERDAT_W_SMESHDS_DOCUMENT #define _INCLUDE_DRIVERDAT_W_SMESHDS_DOCUMENT +#include "SMESH_DriverDAT.hxx" + #include "Driver_Document.h" -class DriverDAT_W_SMESHDS_Document: public Driver_Document +class MESHDRIVERDAT_EXPORT DriverDAT_W_SMESHDS_Document: public Driver_Document {}; #endif diff --git a/src/DriverDAT/DriverDAT_W_SMESHDS_Mesh.h b/src/DriverDAT/DriverDAT_W_SMESHDS_Mesh.h index b9b9130c2..35edc2b62 100644 --- a/src/DriverDAT/DriverDAT_W_SMESHDS_Mesh.h +++ b/src/DriverDAT/DriverDAT_W_SMESHDS_Mesh.h @@ -27,9 +27,11 @@ #ifndef _INCLUDE_DRIVERDAT_W_SMESHDS_MESH #define _INCLUDE_DRIVERDAT_W_SMESHDS_MESH +#include "SMESH_DriverDAT.hxx" + #include "Driver_SMESHDS_Mesh.h" -class DriverDAT_W_SMESHDS_Mesh: public Driver_SMESHDS_Mesh +class MESHDRIVERDAT_EXPORT DriverDAT_W_SMESHDS_Mesh: public Driver_SMESHDS_Mesh {}; #endif diff --git a/src/DriverDAT/Makefile.in b/src/DriverDAT/Makefile.in index 43bf623cb..41904009a 100644 --- a/src/DriverDAT/Makefile.in +++ b/src/DriverDAT/Makefile.in @@ -35,7 +35,7 @@ VPATH=.:@srcdir@ @COMMENCE@ # header files -EXPORT_HEADERS= DriverDAT_R_SMDS_Mesh.h DriverDAT_R_SMESHDS_Mesh.h DriverDAT_R_SMESHDS_Document.h DriverDAT_W_SMDS_Mesh.h DriverDAT_W_SMESHDS_Mesh.h DriverDAT_W_SMESHDS_Document.h +EXPORT_HEADERS= DriverDAT_R_SMDS_Mesh.h DriverDAT_R_SMESHDS_Mesh.h DriverDAT_R_SMESHDS_Document.h DriverDAT_W_SMDS_Mesh.h DriverDAT_W_SMESHDS_Mesh.h DriverDAT_W_SMESHDS_Document.h SMESH_DriverDAT.hxx # Libraries targets LIB = libMeshDriverDAT.la diff --git a/src/DriverDAT/SMESH_DriverDAT.hxx b/src/DriverDAT/SMESH_DriverDAT.hxx new file mode 100755 index 000000000..d651ee86b --- /dev/null +++ b/src/DriverDAT/SMESH_DriverDAT.hxx @@ -0,0 +1,39 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SMESH_DriverDAT.hxx +// Author : Alexander A. BORODIN +// Module : SMESH + +#ifndef _SMESH_DriverDAT_HXX_ +#define _SMESH_DriverDAT_HXX_ + +#ifdef WNT + #if defined MESHDRIVERDAT_EXPORTS + #define MESHDRIVERDAT_EXPORT __declspec( dllexport ) + #else + #define MESHDRIVERDAT_EXPORT __declspec( dllimport ) + #endif +#else + #define MESHDRIVERDAT_EXPORT +#endif + +#endif diff --git a/src/DriverMED/DriverMED_Family.h b/src/DriverMED/DriverMED_Family.h index 1632ccb3b..aaab3bd20 100644 --- a/src/DriverMED/DriverMED_Family.h +++ b/src/DriverMED/DriverMED_Family.h @@ -28,6 +28,8 @@ #ifndef _INCLUDE_DRIVERMED_FAMILY #define _INCLUDE_DRIVERMED_FAMILY +#include "SMESH_DriverMED.hxx" + #include "SMDS_Mesh.hxx" #include "SMESHDS_GroupBase.hxx" #include "SMESHDS_SubMesh.hxx" @@ -46,7 +48,7 @@ class DriverMED_Family; typedef boost::shared_ptr DriverMED_FamilyPtr; -class DriverMED_Family +class MESHDRIVERMED_EXPORT DriverMED_Family { public: diff --git a/src/DriverMED/DriverMED_R_SMDS_Mesh.h b/src/DriverMED/DriverMED_R_SMDS_Mesh.h index a6ece3039..29c7dc074 100644 --- a/src/DriverMED/DriverMED_R_SMDS_Mesh.h +++ b/src/DriverMED/DriverMED_R_SMDS_Mesh.h @@ -20,9 +20,11 @@ #ifndef _INCLUDE_DRIVERMED_R_SMDS_MESH #define _INCLUDE_DRIVERMED_R_SMDS_MESH +#include "SMESH_DriverMED.hxx" + #include "Driver_SMDS_Mesh.h" -class DriverMED_R_SMDS_Mesh: public Driver_SMDS_Mesh +class MESHDRIVERMED_EXPORT DriverMED_R_SMDS_Mesh: public Driver_SMDS_Mesh {}; #endif diff --git a/src/DriverMED/DriverMED_R_SMESHDS_Document.h b/src/DriverMED/DriverMED_R_SMESHDS_Document.h index c933e0c4a..137acbb4e 100644 --- a/src/DriverMED/DriverMED_R_SMESHDS_Document.h +++ b/src/DriverMED/DriverMED_R_SMESHDS_Document.h @@ -20,9 +20,11 @@ #ifndef _INCLUDE_DRIVERMED_R_SMESHDS_DOCUMENT #define _INCLUDE_DRIVERMED_R_SMESHDS_DOCUMENT +#include "SMESH_DriverMED.hxx" + #include "Driver_Document.h" -class DriverMED_R_SMESHDS_Document : public Driver_Document +class MESHDRIVERMED_EXPORT DriverMED_R_SMESHDS_Document : public Driver_Document {}; #endif diff --git a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.h b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.h index cb72bccdf..f83ce8ac3 100644 --- a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.h +++ b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.h @@ -27,6 +27,8 @@ #ifndef _INCLUDE_DRIVERMED_R_SMESHDS_MESH #define _INCLUDE_DRIVERMED_R_SMESHDS_MESH +#include "SMESH_DriverMED.hxx" + #include "Driver_SMESHDS_Mesh.h" #include "DriverMED_Family.h" @@ -38,7 +40,7 @@ class SMESHDS_SubMesh; typedef std::pair< std::string, SMDSAbs_ElementType > TNameAndType; -class DriverMED_R_SMESHDS_Mesh: public Driver_SMESHDS_Mesh +class MESHDRIVERMED_EXPORT DriverMED_R_SMESHDS_Mesh: public Driver_SMESHDS_Mesh { public: virtual Status Perform(); diff --git a/src/DriverMED/DriverMED_W_SMDS_Mesh.h b/src/DriverMED/DriverMED_W_SMDS_Mesh.h index 2151ae672..5b348e6b4 100644 --- a/src/DriverMED/DriverMED_W_SMDS_Mesh.h +++ b/src/DriverMED/DriverMED_W_SMDS_Mesh.h @@ -20,9 +20,11 @@ #ifndef _INCLUDE_DRIVERMED_W_SMDS_MESH #define _INCLUDE_DRIVERMED_W_SMDS_MESH +#include "SMESH_DriverMED.hxx" + #include "Driver_SMDS_Mesh.h" -class DriverMED_W_SMDS_Mesh: public Driver_SMDS_Mesh +class MESHDRIVERMED_EXPORT DriverMED_W_SMDS_Mesh: public Driver_SMDS_Mesh {}; #endif diff --git a/src/DriverMED/DriverMED_W_SMESHDS_Document.h b/src/DriverMED/DriverMED_W_SMESHDS_Document.h index 2f0cce3bc..0efe1709b 100644 --- a/src/DriverMED/DriverMED_W_SMESHDS_Document.h +++ b/src/DriverMED/DriverMED_W_SMESHDS_Document.h @@ -20,9 +20,11 @@ #ifndef _INCLUDE_DRIVERMED_W_SMESHDS_DOCUMENT #define _INCLUDE_DRIVERMED_W_SMESHDS_DOCUMENT +#include "SMESH_DriverMED.hxx" + #include "Driver_Document.h" -class DriverMED_W_SMESHDS_Document : public Driver_Document +class MESHDRIVERMED_EXPORT DriverMED_W_SMESHDS_Document : public Driver_Document {}; #endif diff --git a/src/DriverMED/DriverMED_W_SMESHDS_Mesh.h b/src/DriverMED/DriverMED_W_SMESHDS_Mesh.h index 1cc864944..fa1e608da 100644 --- a/src/DriverMED/DriverMED_W_SMESHDS_Mesh.h +++ b/src/DriverMED/DriverMED_W_SMESHDS_Mesh.h @@ -27,6 +27,8 @@ #ifndef _INCLUDE_DRIVERMED_W_SMESHDS_MESH #define _INCLUDE_DRIVERMED_W_SMESHDS_MESH +#include "SMESH_DriverMED.hxx" + #include "Driver_SMESHDS_Mesh.h" #include "MED_Factory.hxx" @@ -38,7 +40,7 @@ class SMESHDS_Mesh; class SMESHDS_GroupBase; class SMESHDS_SubMesh; -class DriverMED_W_SMESHDS_Mesh: public Driver_SMESHDS_Mesh +class MESHDRIVERMED_EXPORT DriverMED_W_SMESHDS_Mesh: public Driver_SMESHDS_Mesh { public: diff --git a/src/DriverMED/Makefile.in b/src/DriverMED/Makefile.in index 8c9e441e7..a90815654 100644 --- a/src/DriverMED/Makefile.in +++ b/src/DriverMED/Makefile.in @@ -38,7 +38,7 @@ VPATH=.:@srcdir@ EXPORT_HEADERS = \ DriverMED_R_SMDS_Mesh.h DriverMED_R_SMESHDS_Mesh.h DriverMED_R_SMESHDS_Document.h \ DriverMED_W_SMDS_Mesh.h DriverMED_W_SMESHDS_Mesh.h DriverMED_W_SMESHDS_Document.h \ - DriverMED_Family.h + DriverMED_Family.h SMESH_DriverMED.hxx # Libraries targets LIB = libMeshDriverMED.la diff --git a/src/DriverMED/SMESH_DriverMED.hxx b/src/DriverMED/SMESH_DriverMED.hxx new file mode 100755 index 000000000..50eb79bc4 --- /dev/null +++ b/src/DriverMED/SMESH_DriverMED.hxx @@ -0,0 +1,39 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SMESH_DriverMED.hxx +// Author : Alexander A. BORODIN +// Module : SMESH + +#ifndef _SMESH_DriverMED_HXX_ +#define _SMESH_DriverMED_HXX_ + +#ifdef WNT + #if defined MESHDRIVERMED_EXPORTS + #define MESHDRIVERMED_EXPORT __declspec( dllexport ) + #else + #define MESHDRIVERMED_EXPORT __declspec( dllimport ) + #endif +#else + #define MESHDRIVERMED_EXPORT +#endif + +#endif diff --git a/src/DriverSTL/DriverSTL_R_SMDS_Mesh.h b/src/DriverSTL/DriverSTL_R_SMDS_Mesh.h index 14afd3c21..078e88e18 100644 --- a/src/DriverSTL/DriverSTL_R_SMDS_Mesh.h +++ b/src/DriverSTL/DriverSTL_R_SMDS_Mesh.h @@ -20,11 +20,13 @@ #ifndef _INCLUDE_DRIVERSTL_R_SMDS_MESH #define _INCLUDE_DRIVERSTL_R_SMDS_MESH +#include "SMESH_DriverSTL.hxx" + #include "Driver_SMDS_Mesh.h" #include -class DriverSTL_R_SMDS_Mesh: public Driver_SMDS_Mesh +class MESHDRIVERSTL_EXPORT DriverSTL_R_SMDS_Mesh: public Driver_SMDS_Mesh { public: DriverSTL_R_SMDS_Mesh(); diff --git a/src/DriverSTL/DriverSTL_W_SMDS_Mesh.h b/src/DriverSTL/DriverSTL_W_SMDS_Mesh.h index 49d752083..30fb26ec6 100644 --- a/src/DriverSTL/DriverSTL_W_SMDS_Mesh.h +++ b/src/DriverSTL/DriverSTL_W_SMDS_Mesh.h @@ -27,10 +27,12 @@ #ifndef _INCLUDE_DRIVERSTL_W_SMDS_MESH #define _INCLUDE_DRIVERSTL_W_SMDS_MESH +#include "SMESH_DriverSTL.hxx" + #include "Driver_SMDS_Mesh.h" #include -class DriverSTL_W_SMDS_Mesh: public Driver_SMDS_Mesh +class MESHDRIVERSTL_EXPORT DriverSTL_W_SMDS_Mesh: public Driver_SMDS_Mesh { public: diff --git a/src/DriverSTL/Makefile.in b/src/DriverSTL/Makefile.in index ef7833be9..558ae2d31 100644 --- a/src/DriverSTL/Makefile.in +++ b/src/DriverSTL/Makefile.in @@ -35,7 +35,7 @@ VPATH=.:@srcdir@ @COMMENCE@ # header files -EXPORT_HEADERS= DriverSTL_R_SMDS_Mesh.h DriverSTL_W_SMDS_Mesh.h +EXPORT_HEADERS= DriverSTL_R_SMDS_Mesh.h DriverSTL_W_SMDS_Mesh.h SMESH_DriverSTL.hxx # Libraries targets LIB = libMeshDriverSTL.la diff --git a/src/DriverSTL/SMESH_DriverSTL.hxx b/src/DriverSTL/SMESH_DriverSTL.hxx new file mode 100755 index 000000000..2204a4a05 --- /dev/null +++ b/src/DriverSTL/SMESH_DriverSTL.hxx @@ -0,0 +1,39 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SMESH_DriverSTL.hxx +// Author : Alexander A. BORODIN +// Module : SMESH + +#ifndef _SMESH_DriverSTL_HXX_ +#define _SMESH_DriverSTL_HXX_ + +#ifdef WNT + #if defined MESHDRIVERSTL_EXPORTS + #define MESHDRIVERSTL_EXPORT __declspec( dllexport ) + #else + #define MESHDRIVERSTL_EXPORT __declspec( dllimport ) + #endif +#else + #define MESHDRIVERSTL_EXPORT +#endif + +#endif diff --git a/src/DriverUNV/DriverUNV_R_SMDS_Mesh.h b/src/DriverUNV/DriverUNV_R_SMDS_Mesh.h index 46c6ad347..bdcdfc31f 100644 --- a/src/DriverUNV/DriverUNV_R_SMDS_Mesh.h +++ b/src/DriverUNV/DriverUNV_R_SMDS_Mesh.h @@ -20,11 +20,13 @@ #ifndef _INCLUDE_DRIVERUNV_R_SMDS_MESH #define _INCLUDE_DRIVERUNV_R_SMDS_MESH +#include "SMESH_DriverUNV.hxx" + #include "Driver_SMDS_Mesh.h" class SMDS_Mesh; -class DriverUNV_R_SMDS_Mesh: public Driver_SMDS_Mesh +class MESHDRIVERUNV_EXPORT DriverUNV_R_SMDS_Mesh: public Driver_SMDS_Mesh { public: virtual Status Perform(); diff --git a/src/DriverUNV/DriverUNV_R_SMESHDS_Document.h b/src/DriverUNV/DriverUNV_R_SMESHDS_Document.h index 4d38a67c3..79de1b838 100644 --- a/src/DriverUNV/DriverUNV_R_SMESHDS_Document.h +++ b/src/DriverUNV/DriverUNV_R_SMESHDS_Document.h @@ -20,9 +20,11 @@ #ifndef _INCLUDE_DRIVERUNV_R_SMESHDS_DOCUMENT #define _INCLUDE_DRIVERUNV_R_SMESHDS_DOCUMENT +#include "SMESH_DriverUNV.hxx" + #include "Driver_Document.h" -class DriverUNV_R_SMESHDS_Document: public Driver_Document +class MESHDRIVERUNV_EXPORT DriverUNV_R_SMESHDS_Document: public Driver_Document {}; #endif diff --git a/src/DriverUNV/DriverUNV_R_SMESHDS_Mesh.h b/src/DriverUNV/DriverUNV_R_SMESHDS_Mesh.h index fce4b66bd..ef1ceede4 100644 --- a/src/DriverUNV/DriverUNV_R_SMESHDS_Mesh.h +++ b/src/DriverUNV/DriverUNV_R_SMESHDS_Mesh.h @@ -20,9 +20,11 @@ #ifndef _INCLUDE_DRIVERUNV_R_SMESHDS_MESH #define _INCLUDE_DRIVERUNV_R_SMESHDS_MESH +#include "SMESH_DriverUNV.hxx" + #include "Driver_SMESHDS_Mesh.h" -class DriverUNV_R_SMESHDS_Mesh: public Driver_SMESHDS_Mesh +class MESHDRIVERUNV_EXPORT DriverUNV_R_SMESHDS_Mesh: public Driver_SMESHDS_Mesh {}; #endif diff --git a/src/DriverUNV/DriverUNV_W_SMDS_Mesh.h b/src/DriverUNV/DriverUNV_W_SMDS_Mesh.h index 88ff5e83c..e40be1564 100644 --- a/src/DriverUNV/DriverUNV_W_SMDS_Mesh.h +++ b/src/DriverUNV/DriverUNV_W_SMDS_Mesh.h @@ -20,9 +20,11 @@ #ifndef _INCLUDE_DRIVERUNV_W_SMDS_MESH #define _INCLUDE_DRIVERUNV_W_SMDS_MESH +#include "SMESH_DriverUNV.hxx" + #include "Driver_SMDS_Mesh.h" -class DriverUNV_W_SMDS_Mesh: public Driver_SMDS_Mesh +class MESHDRIVERUNV_EXPORT DriverUNV_W_SMDS_Mesh: public Driver_SMDS_Mesh { public: virtual Status Perform(); diff --git a/src/DriverUNV/DriverUNV_W_SMESHDS_Document.h b/src/DriverUNV/DriverUNV_W_SMESHDS_Document.h index 77feb0ede..d16410172 100644 --- a/src/DriverUNV/DriverUNV_W_SMESHDS_Document.h +++ b/src/DriverUNV/DriverUNV_W_SMESHDS_Document.h @@ -20,9 +20,11 @@ #ifndef _INCLUDE_DRIVERUNV_W_SMESHDS_DOCUMENT #define _INCLUDE_DRIVERUNV_W_SMESHDS_DOCUMENT +#include "SMESH_DriverUNV.hxx" + #include "Driver_Document.h" -class DriverUNV_W_SMESHDS_Document : public Driver_Document +class MESHDRIVERUNV_EXPORT DriverUNV_W_SMESHDS_Document : public Driver_Document {}; #endif diff --git a/src/DriverUNV/DriverUNV_W_SMESHDS_Mesh.h b/src/DriverUNV/DriverUNV_W_SMESHDS_Mesh.h index 8bc728451..8d9263d00 100644 --- a/src/DriverUNV/DriverUNV_W_SMESHDS_Mesh.h +++ b/src/DriverUNV/DriverUNV_W_SMESHDS_Mesh.h @@ -20,9 +20,11 @@ #ifndef _INCLUDE_DRIVERUNV_W_SMESHDS_MESH #define _INCLUDE_DRIVERUNV_W_SMESHDS_MESH +#include "SMESH_DriverUNV.hxx" + #include "Driver_SMESHDS_Mesh.h" -class DriverUNV_W_SMESHDS_Mesh: public Driver_SMESHDS_Mesh +class MESHDRIVERUNV_EXPORT DriverUNV_W_SMESHDS_Mesh: public Driver_SMESHDS_Mesh {}; #endif diff --git a/src/DriverUNV/Makefile.in b/src/DriverUNV/Makefile.in index 346769401..debe7da04 100644 --- a/src/DriverUNV/Makefile.in +++ b/src/DriverUNV/Makefile.in @@ -51,7 +51,7 @@ LIB_SRC = \ DriverUNV_W_SMESHDS_Document.cxx \ DriverUNV_W_SMDS_Mesh.cxx \ DriverUNV_W_SMESHDS_Mesh.cxx \ - UNV_Utilities.cxx UNV2411_Structure.cxx UNV2412_Structure.cxx + UNV_Utilities.cxx UNV2411_Structure.cxx UNV2412_Structure.cxx SMESH_DriverUNV.hxx # Executables targets BIN = UNV_Test diff --git a/src/DriverUNV/SMESH_DriverUNV.hxx b/src/DriverUNV/SMESH_DriverUNV.hxx new file mode 100755 index 000000000..32f04a12d --- /dev/null +++ b/src/DriverUNV/SMESH_DriverUNV.hxx @@ -0,0 +1,39 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SMESH_DriverUNV.hxx +// Author : Alexander A. BORODIN +// Module : SMESH + +#ifndef _SMESH_DriverUNV_HXX_ +#define _SMESH_DriverUNV_HXX_ + +#ifdef WNT + #if defined MESHDRIVERUNV_EXPORTS + #define MESHDRIVERUNV_EXPORT __declspec( dllexport ) + #else + #define MESHDRIVERUNV_EXPORT __declspec( dllimport ) + #endif +#else + #define MESHDRIVERUNV_EXPORT +#endif + +#endif diff --git a/src/DriverUNV/UNV2411_Structure.hxx b/src/DriverUNV/UNV2411_Structure.hxx index 4f6a39317..ee4134251 100644 --- a/src/DriverUNV/UNV2411_Structure.hxx +++ b/src/DriverUNV/UNV2411_Structure.hxx @@ -20,12 +20,14 @@ #ifndef UNV2411_Structure_HeaderFile #define UNV2411_Structure_HeaderFile +#include "SMESH_DriverUNV.hxx" + #include #include namespace UNV2411{ - struct TRecord{ + struct MESHDRIVERUNV_EXPORT TRecord{ TRecord(); int exp_coord_sys_num; // export coordinate system number int disp_coord_sys_num; // displacement coordinate system number @@ -36,9 +38,11 @@ namespace UNV2411{ typedef int TNodeLab; // type of node label typedef std::map TDataSet; - void Read(std::ifstream& in_stream, TDataSet& theDataSet); + MESHDRIVERUNV_EXPORT void + Read(std::ifstream& in_stream, TDataSet& theDataSet); - void Write(std::ofstream& out_stream, const TDataSet& theDataSet); + MESHDRIVERUNV_EXPORT void + Write(std::ofstream& out_stream, const TDataSet& theDataSet); }; diff --git a/src/DriverUNV/UNV2412_Structure.hxx b/src/DriverUNV/UNV2412_Structure.hxx index 0892c5f85..8c4003d37 100644 --- a/src/DriverUNV/UNV2412_Structure.hxx +++ b/src/DriverUNV/UNV2412_Structure.hxx @@ -20,6 +20,8 @@ #ifndef UNV2412_Structure_HeaderFile #define UNV2412_Structure_HeaderFile +#include "SMESH_DriverUNV.hxx" + #include #include #include @@ -29,7 +31,7 @@ namespace UNV2412{ typedef std::vector TNodeLabels; // Nodal connectivities - struct TRecord{ + struct MESHDRIVERUNV_EXPORT TRecord{ TRecord(); int fe_descriptor_id; // FE descriptor id @@ -47,13 +49,18 @@ namespace UNV2412{ typedef int TElementLab; // type of element label typedef std::map TDataSet; - void Read(std::ifstream& in_stream, TDataSet& theDataSet); + MESHDRIVERUNV_EXPORT void + Read(std::ifstream& in_stream, TDataSet& theDataSet); - void Write(std::ofstream& out_stream, const TDataSet& theDataSet); + MESHDRIVERUNV_EXPORT void + Write(std::ofstream& out_stream, const TDataSet& theDataSet); - bool IsBeam(int theFeDescriptorId); - bool IsFace(int theFeDescriptorId); - bool IsVolume(int theFeDescriptorId); + MESHDRIVERUNV_EXPORT bool + IsBeam(int theFeDescriptorId); + MESHDRIVERUNV_EXPORT bool + IsFace(int theFeDescriptorId); + MESHDRIVERUNV_EXPORT bool + IsVolume(int theFeDescriptorId); }; diff --git a/src/DriverUNV/UNV_Utilities.hxx b/src/DriverUNV/UNV_Utilities.hxx index bf7b8d40a..f87837ace 100644 --- a/src/DriverUNV/UNV_Utilities.hxx +++ b/src/DriverUNV/UNV_Utilities.hxx @@ -9,6 +9,8 @@ #ifndef MED_Utilities_HeaderFile #define MED_Utilities_HeaderFile +#include "SMESH_DriverUNV.hxx" + #include #include #include @@ -18,7 +20,7 @@ namespace UNV{ using namespace std; - class PrefixPrinter{ + class MESHDRIVERUNV_EXPORT PrefixPrinter{ static int myCounter; public: PrefixPrinter(); diff --git a/src/MEFISTO2/aptrte.cxx b/src/MEFISTO2/aptrte.cxx index 40c090523..3464c8f7e 100755 --- a/src/MEFISTO2/aptrte.cxx +++ b/src/MEFISTO2/aptrte.cxx @@ -25,9 +25,11 @@ #include "Rn.h" #include "aptrte.h" +#ifndef WIN32 #include "utilities.h" using namespace std; +#endif extern "C" { @@ -48,7 +50,7 @@ void tempscpu_( double & tempsec ) //Retourne le temps CPU utilise en secondes { tempsec = ( (double) clock() ) / CLOCKS_PER_SEC; - //MESSAGE( "temps cpu=" << tempsec ); + // MESSAGEE( "temps cpu=" << tempsec ); } @@ -58,7 +60,7 @@ void deltacpu_( R & dtcpu ) tempscpu_( cpunew ); dtcpu = R( cpunew - cpuold ); cpuold = cpunew; - //MESSAGE( "delta temps cpu=" << dtcpu ); + // MESSAGEE( "delta temps cpu=" << dtcpu ); return; } @@ -162,8 +164,8 @@ void aptrte( Z nutysu, R aretmx, // majoration empirique du nombre de sommets de la triangulation i = 4*nbarfr/10; mxsomm = Max( 20000, 64*nbpti+i*i ); - MESSAGE( "APTRTE: Depart de la triangulation avec " ); - MESSAGE( "nutysu=" << nutysu << " aretmx=" << aretmx << " mxsomm=" << mxsomm ); + // MESSAGEE( "APTRTE: Depart de la triangulation avec " ); + // MESSAGEE( "nutysu=" << nutysu << " aretmx=" << aretmx << " mxsomm=" << mxsomm ); NEWDEPART: //mnpxyd( 3, mxsomm ) les coordonnees UV des sommets et la taille d'arete aux sommets @@ -309,8 +311,8 @@ void aptrte( Z nutysu, R aretmx, aremax = sqrt( aremax ); //longueur maximale d'une arete aretmx = Min( aretmx, aremax ); //pour homogeneiser - MESSAGE("nutysu=" << nutysu << " aretmx=" << aretmx - << " arete min=" << aremin << " arete max=" << aremax); + // MESSAGEE("nutysu=" << nutysu << " aretmx=" << aretmx + // << " arete min=" << aremin << " arete max=" << aremax); //chainage des aretes frontalieres : la derniere arete frontaliere mnsoar[ mosoar * noar - mosoar + 5 ] = 0; @@ -350,7 +352,7 @@ void aptrte( Z nutysu, R aretmx, mxtree = 2 * mxsomm; NEWTREE: //en cas de saturation de l'un des tableaux, on boucle - MESSAGE( "Debut triangulation avec mxsomm=" << mxsomm ); + // MESSAGEE( "Debut triangulation avec mxsomm=" << mxsomm ); if( mntree != NULL ) delete [] mntree; nbsomm = nbarpi; mntree = new Z[motree*(1+mxtree)]; @@ -366,13 +368,13 @@ void aptrte( Z nutysu, R aretmx, //saturation de letree => sa taille est augmentee et relance mxtree = mxtree * 2; ierr = 0; - MESSAGE( "Nouvelle valeur de mxtree=" << mxtree ); + // MESSAGEE( "Nouvelle valeur de mxtree=" << mxtree ); goto NEWTREE; } deltacpu_( d ); tcpu += d; - MESSAGE( "Temps de l'ajout arbre-4 des Triangles Equilateraux=" << d << " secondes" ); + // MESSAGEE( "Temps de l'ajout arbre-4 des Triangles Equilateraux=" << d << " secondes" ); if( ierr != 0 ) goto ERREUR; //ici le tableau mnpxyd contient les sommets des te et les points frontaliers et internes @@ -392,8 +394,8 @@ void aptrte( Z nutysu, R aretmx, deltacpu_( d ); tcpu += d; - MESSAGE("Temps de l'adaptation et l'homogeneisation de l'arbre-4 des TE=" - << d << " secondes"); + // MESSAGEE("Temps de l'adaptation et l'homogeneisation de l'arbre-4 des TE=" + // << d << " secondes"); if( ierr != 0 ) { //destruction du tableau auxiliaire et de l'arbre @@ -401,7 +403,7 @@ void aptrte( Z nutysu, R aretmx, { //letree sature mxtree = mxtree * 2; - MESSAGE( "Redemarrage avec la valeur de mxtree=" << mxtree ); + // MESSAGEE( "Redemarrage avec la valeur de mxtree=" << mxtree ); ierr = 0; goto NEWTREE; } @@ -424,7 +426,7 @@ void aptrte( Z nutysu, R aretmx, //Temps calcul deltacpu_( d ); tcpu += d; - MESSAGE( "Temps de la triangulation des TE=" << d << " secondes" ); + // MESSAGEE( "Temps de la triangulation des TE=" << d << " secondes" ); // ierr =0 si pas d'erreur // =1 si le tableau mnsoar est sature @@ -446,11 +448,11 @@ void aptrte( Z nutysu, R aretmx, mosoar, mxsoar, n1soar, mnsoar, na, moartr, mxartr, n1artr, mnartr, n ); - MESSAGE( "Nombre d'echanges des diagonales de 2 triangles=" << n ); + // MESSAGEE( "Nombre d'echanges des diagonales de 2 triangles=" << n ); deltacpu_( d ); tcpu += d; - MESSAGE("Temps de la triangulation Delaunay par echange des diagonales=" - << d << " secondes"); + // MESSAGEE("Temps de la triangulation Delaunay par echange des diagonales=" + // << d << " secondes"); //qualites de la triangulation actuelle qualitetrte( mnpxyd, mosoar, mxsoar, mnsoar, moartr, mxartr, mnartr, @@ -479,11 +481,11 @@ void aptrte( Z nutysu, R aretmx, mxarcf, mn1arcf, mnarcf, mnarcf1, mnarcf2, n, ierr ); - MESSAGE( "Restauration de " << n << " aretes perdues de la frontiere" ); + // MESSAGEE( "Restauration de " << n << " aretes perdues de la frontiere" ); deltacpu_( d ); tcpu += d; - MESSAGE("Temps de la recuperation des aretes perdues de la frontiere=" - << d << " secondes"); + // MESSAGEE("Temps de la recuperation des aretes perdues de la frontiere=" + // << d << " secondes"); if( ierr != 0 ) goto ERREUR; @@ -525,7 +527,7 @@ void aptrte( Z nutysu, R aretmx, deltacpu_( d ); tcpu += d; - MESSAGE( "Temps de la suppression des triangles externes=" << d ); + // MESSAGEE( "Temps de la suppression des triangles externes=" << d ); if( ierr != 0 ) goto ERREUR; //qualites de la triangulation actuelle @@ -556,7 +558,7 @@ void aptrte( Z nutysu, R aretmx, deltacpu_( d ); tcpu += d; - MESSAGE( "Temps de l'amelioration de la qualite de la triangulation=" << d ); + // MESSAGEE( "Temps de l'amelioration de la qualite de la triangulation=" << d ); if( ierr != 0 ) goto ERREUR; //qualites de la triangulation finale @@ -649,12 +651,12 @@ void aptrte( Z nutysu, R aretmx, } } nbt /= 4; //le nombre final de triangles de la surface - MESSAGE("Nombre de sommets=" << nbst - << " Nombre de triangles=" << nbt); + // MESSAGEE("Nombre de sommets=" << nbst + // << " Nombre de triangles=" << nbt); deltacpu_( d ); tcpu += d; - MESSAGE( "Temps total de la triangulation=" << tcpu << " secondes" ); + // MESSAGEE( "Temps total de la triangulation=" << tcpu << " secondes" ); // destruction des tableaux auxiliaires // ------------------------------------ @@ -686,7 +688,7 @@ void aptrte( Z nutysu, R aretmx, } else { - MESSAGE( "Triangulation non realisee " << ierr ); + // MESSAGEE( "Triangulation non realisee " << ierr ); if( ierr == 0 ) ierr=1; goto NETTOYAGE; } @@ -763,9 +765,9 @@ void qualitetrte( R3 *mnpxyd, { //un triangle d'aire negative de plus nbtrianeg++; - MESSAGE("ATTENTION: le triangle " << nt << " de sommets:" - << nosotr[0] << " " << nosotr[1] << " " << nosotr[2] - << " a une aire " << d <<"<=0"); + // MESSAGEE("ATTENTION: le triangle " << nt << " de sommets:" + // << nosotr[0] << " " << nosotr[1] << " " << nosotr[2] + // << " a une aire " << d <<"<=0"); } //aire des triangles actuels @@ -775,12 +777,12 @@ void qualitetrte( R3 *mnpxyd, //les affichages quamoy /= nbtria; - MESSAGE("Qualite moyenne=" << quamoy - << " Qualite minimale=" << quamin - << " des " << nbtria << " triangles de surface totale=" - << aire); + // MESSAGEE("Qualite moyenne=" << quamoy + // << " Qualite minimale=" << quamin + // << " des " << nbtria << " triangles de surface totale=" + // << aire); - if( nbtrianeg>0 ) - MESSAGE( "ATTENTION: nombre de triangles d'aire negative=" << nbtrianeg ); + //if( nbtrianeg>0 ) + // MESSAGE( "ATTENTION: nombre de triangles d'aire negative=" << nbtrianeg ); return; } diff --git a/src/MEFISTO2/aptrte.h b/src/MEFISTO2/aptrte.h index 531087700..8d664a10a 100755 --- a/src/MEFISTO2/aptrte.h +++ b/src/MEFISTO2/aptrte.h @@ -28,10 +28,14 @@ #define aptrte__h #include // limites min max int long real ... +#ifndef WIN32 #include // gethostname, ... +#endif #include +#ifndef WIN32 #include // pour cout cin ... #include // pour le format des io setw, stx, setfill, ... +#endif #include // pour les fonctions sur les chaines de caracteres #include #include @@ -39,9 +43,21 @@ #include #include +#ifndef WIN32 #include +#endif + +#ifdef WNT + #if defined MEFISTO2D_EXPORTS + #define MEFISTO2D_EXPORT __declspec( dllexport ) + #else + #define MEFISTO2D_EXPORT __declspec( dllimport ) + #endif +#else + #define MEFISTO2D_EXPORT +#endif -void qualitetrte( R3 *mnpxyd, + void qualitetrte( R3 *mnpxyd, Z & mosoar, Z & mxsoar, Z *mnsoar, Z & moartr, Z & mxartr, Z *mnartr, Z & nbtria, R & quamoy, R & quamin ); @@ -75,7 +91,8 @@ void qualitetrte( R3 *mnpxyd, // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -void aptrte( Z nutysu, R aretmx, +MEFISTO2D_EXPORT + void aptrte( Z nutysu, R aretmx, Z nblf, Z *nudslf, R2 *uvslf, Z nbpti, R2 *uvpti, Z & nbst, R2 * & uvst, Z & nbt, Z * & nust, diff --git a/src/OBJECT/SMESH_Actor.h b/src/OBJECT/SMESH_Actor.h index 7319914d7..8114f529b 100644 --- a/src/OBJECT/SMESH_Actor.h +++ b/src/OBJECT/SMESH_Actor.h @@ -39,7 +39,7 @@ class vtkScalarBarActor; class vtkPlane; class vtkImplicitBoolean; -class SMESH_Actor: public SALOME_Actor +class SMESHOBJECT_EXPORT SMESH_Actor: public SALOME_Actor { static SMESH_Actor* New() { return NULL;} diff --git a/src/OBJECT/SMESH_ActorDef.h b/src/OBJECT/SMESH_ActorDef.h index 7ed5149f1..5df608124 100644 --- a/src/OBJECT/SMESH_ActorDef.h +++ b/src/OBJECT/SMESH_ActorDef.h @@ -79,7 +79,7 @@ class vtkTimeStamp; class SMESH_DeviceActor; -class SMESH_ActorDef : public SMESH_Actor{ +class SMESHOBJECT_EXPORT SMESH_ActorDef : public SMESH_Actor{ friend class SMESH_VisualObj; friend class SMESH_Actor; diff --git a/src/OBJECT/SMESH_ActorUtils.h b/src/OBJECT/SMESH_ActorUtils.h index f28e8d6c9..32a27fa33 100644 --- a/src/OBJECT/SMESH_ActorUtils.h +++ b/src/OBJECT/SMESH_ActorUtils.h @@ -20,6 +20,8 @@ #ifndef SMESH_ACTORUTILS_H #define SMESH_ACTORUTILS_H +#include "SMESH_Object.h" + #include #include @@ -27,12 +29,12 @@ class vtkUnstructuredGrid; namespace SMESH{ - float GetFloat( const QString& theValue, float theDefault = 0 ); - float GetFloat( const QString& theName, const QString& theSection, float theDefault = 0 ); + float SMESHOBJECT_EXPORT GetFloat( const QString& theValue, float theDefault = 0 ); + float SMESHOBJECT_EXPORT GetFloat( const QString& theName, const QString& theSection, float theDefault = 0 ); - QColor GetColor( const QString& theSect, const QString& theName, const QColor&t = QColor() ); - void GetColor( const QString& theSect, const QString& theName, int&, int&, int&, const QColor&t = QColor() ); - void GetColor( const QString& theSect, const QString& theName, float&, float&, float&, const QColor&t = QColor() ); + QColor SMESHOBJECT_EXPORT GetColor( const QString& theSect, const QString& theName, const QColor&t = QColor() ); + void SMESHOBJECT_EXPORT GetColor( const QString& theSect, const QString& theName, int&, int&, int&, const QColor&t = QColor() ); + void SMESHOBJECT_EXPORT GetColor( const QString& theSect, const QString& theName, float&, float&, float&, const QColor&t = QColor() ); void WriteUnstructuredGrid(vtkUnstructuredGrid* theGrid, const char* theFileName); diff --git a/src/OBJECT/SMESH_DeviceActor.h b/src/OBJECT/SMESH_DeviceActor.h index 88da39f94..c6ee8b923 100644 --- a/src/OBJECT/SMESH_DeviceActor.h +++ b/src/OBJECT/SMESH_DeviceActor.h @@ -54,7 +54,7 @@ class VTKViewer_ExtractUnstructuredGrid; class SMESH_ExtractGeometry; -class SMESH_DeviceActor: public vtkLODActor{ +class SMESHOBJECT_EXPORT SMESH_DeviceActor: public vtkLODActor{ friend class SMESH_ActorDef; public: diff --git a/src/OBJECT/SMESH_ExtractGeometry.h b/src/OBJECT/SMESH_ExtractGeometry.h index 794229516..c557718f9 100644 --- a/src/OBJECT/SMESH_ExtractGeometry.h +++ b/src/OBJECT/SMESH_ExtractGeometry.h @@ -20,11 +20,13 @@ #ifndef SALOME_ExtractGeometry_HeaderFile #define SALOME_ExtractGeometry_HeaderFile +#include "SMESH_Object.h" + #include #include -class SMESH_ExtractGeometry : public vtkExtractGeometry{ +class SMESHOBJECT_EXPORT SMESH_ExtractGeometry : public vtkExtractGeometry{ public: vtkTypeMacro(SMESH_ExtractGeometry,vtkExtractGeometry); diff --git a/src/OBJECT/SMESH_Object.cxx b/src/OBJECT/SMESH_Object.cxx index 885ee3de3..93a67a582 100644 --- a/src/OBJECT/SMESH_Object.cxx +++ b/src/OBJECT/SMESH_Object.cxx @@ -719,7 +719,7 @@ bool SMESH_VisualObjDef::GetEdgeNodes( const int theElemId, if ( theEdgeNum < 0 || theEdgeNum > 3 || nbNodes != 3 && nbNodes != 4 || theEdgeNum > nbNodes ) return false; - int anIds[ nbNodes ]; + vector anIds( nbNodes ); SMDS_ElemIteratorPtr anIter = anElem->nodesIterator(); int i = 0; while( anIter->more() ) @@ -834,7 +834,7 @@ void SMESH_MeshObj::Update( int theIsClear ) int nbNodes = anIndexes[i++]; // nodes //ASSERT( nbNodes < 9 ); - const SMDS_MeshNode* aNodes[ nbNodes ]; + const SMDS_MeshNode** aNodes = new const SMDS_MeshNode*[ nbNodes ]; for ( int iNode = 0; iNode < nbNodes; iNode++ ) aNodes[ iNode ] = FindNode( myMesh, anIndexes[i++] ); // change diff --git a/src/OBJECT/SMESH_Object.h b/src/OBJECT/SMESH_Object.h index aea4f778e..5d7a1580a 100644 --- a/src/OBJECT/SMESH_Object.h +++ b/src/OBJECT/SMESH_Object.h @@ -29,6 +29,16 @@ #ifndef SMESH_OBJECT_H #define SMESH_OBJECT_H +#ifdef WNT + #if defined SMESHOBJECT_EXPORTS + #define SMESHOBJECT_EXPORT __declspec( dllexport ) + #else + #define SMESHOBJECT_EXPORT __declspec( dllimport ) + #endif +#else + #define SMESHOBJECT_EXPORT +#endif + #include #include @@ -42,7 +52,7 @@ class vtkUnstructuredGrid; Class : SMESH_VisualObj Description : Base class for all mesh objects to be visuilised */ -class SMESH_VisualObj +class SMESHOBJECT_EXPORT SMESH_VisualObj { public: virtual void Update( int theIsClear = true ) = 0; diff --git a/src/OBJECT/SMESH_ObjectDef.h b/src/OBJECT/SMESH_ObjectDef.h index 134b47b10..fb0ca9771 100644 --- a/src/OBJECT/SMESH_ObjectDef.h +++ b/src/OBJECT/SMESH_ObjectDef.h @@ -51,7 +51,7 @@ class SMDS_MeshElement; Class : SMESH_VisualObj Description : Base class for all mesh objects to be visuilised */ -class SMESH_VisualObjDef: public SMESH_VisualObj +class SMESHOBJECT_EXPORT SMESH_VisualObjDef: public SMESH_VisualObj { public: typedef std::list TEntityList; @@ -104,7 +104,7 @@ private: Description : Class for visualisation of mesh */ -class SMESH_MeshObj: public SMESH_VisualObjDef +class SMESHOBJECT_EXPORT SMESH_MeshObj: public SMESH_VisualObjDef { public: @@ -136,7 +136,7 @@ protected: Description : Base class for visualisation of submeshes and groups */ -class SMESH_SubMeshObj: public SMESH_VisualObjDef +class SMESHOBJECT_EXPORT SMESH_SubMeshObj: public SMESH_VisualObjDef { public: @@ -160,7 +160,7 @@ protected: Description : Class for visualisation of groups */ -class SMESH_GroupObj: public SMESH_SubMeshObj +class SMESHOBJECT_EXPORT SMESH_GroupObj: public SMESH_SubMeshObj { public: SMESH_GroupObj( SMESH::SMESH_GroupBase_ptr, SMESH_MeshObj* ); @@ -181,7 +181,7 @@ private: Description : Class for visualisation of submeshes */ -class SMESH_subMeshObj : public SMESH_SubMeshObj +class SMESHOBJECT_EXPORT SMESH_subMeshObj : public SMESH_SubMeshObj { public: diff --git a/src/SMDS/Makefile.in b/src/SMDS/Makefile.in index e066e25e0..32fc0da59 100644 --- a/src/SMDS/Makefile.in +++ b/src/SMDS/Makefile.in @@ -113,7 +113,8 @@ EXPORT_HEADERS= \ SMDS_FaceOfEdges.hxx \ SMDS_FaceOfNodes.hxx \ SMDS_PolygonalFaceOfNodes.hxx \ - SMDS_VolumeTool.hxx + SMDS_VolumeTool.hxx \ + SMESH_SMDS.hxx # SMDS_Tria3OfNodes.hxx \ # SMDS_HexahedronOfNodes.hxx diff --git a/src/SMDS/SMDS_EdgePosition.hxx b/src/SMDS/SMDS_EdgePosition.hxx index fd297d3ab..a8d85c256 100644 --- a/src/SMDS/SMDS_EdgePosition.hxx +++ b/src/SMDS/SMDS_EdgePosition.hxx @@ -27,21 +27,11 @@ #ifndef _SMDS_EdgePosition_HeaderFile #define _SMDS_EdgePosition_HeaderFile -#include "SMDS_Position.hxx" - -//#ifdef WNT -//#include -//#else -//#define SALOME_WNT_EXPORT -//#endif +#include "SMESH_SMDS.hxx" -#if defined WNT && defined WIN32 && defined SMDS_EXPORTS -#define SMDS_WNT_EXPORT __declspec( dllexport ) -#else -#define SMDS_WNT_EXPORT -#endif +#include "SMDS_Position.hxx" -class SMDS_WNT_EXPORT SMDS_EdgePosition:public SMDS_Position +class SMDS_EXPORT SMDS_EdgePosition:public SMDS_Position { public: diff --git a/src/SMDS/SMDS_FaceOfEdges.hxx b/src/SMDS/SMDS_FaceOfEdges.hxx index cd8e5dd8f..a314697e3 100644 --- a/src/SMDS/SMDS_FaceOfEdges.hxx +++ b/src/SMDS/SMDS_FaceOfEdges.hxx @@ -22,6 +22,8 @@ #ifndef _SMDS_FaceOfEdges_HeaderFile #define _SMDS_FaceOfEdges_HeaderFile +#include "SMESH_SMDS.hxx" + #include "SMDS_MeshFace.hxx" #include "SMDS_MeshEdge.hxx" #include "SMDS_Iterator.hxx" @@ -29,7 +31,7 @@ #include -class SMDS_FaceOfEdges:public SMDS_MeshFace +class SMDS_EXPORT SMDS_FaceOfEdges:public SMDS_MeshFace { public: void Print(std::ostream & OS) const; diff --git a/src/SMDS/SMDS_FaceOfNodes.hxx b/src/SMDS/SMDS_FaceOfNodes.hxx index 290195107..1ce06047c 100644 --- a/src/SMDS/SMDS_FaceOfNodes.hxx +++ b/src/SMDS/SMDS_FaceOfNodes.hxx @@ -22,13 +22,15 @@ #ifndef _SMDS_FaceOfNodes_HeaderFile #define _SMDS_FaceOfNodes_HeaderFile +#include "SMESH_SMDS.hxx" + #include "SMDS_MeshFace.hxx" #include "SMDS_MeshNode.hxx" #include "SMDS_Iterator.hxx" #include -class SMDS_FaceOfNodes:public SMDS_MeshFace +class SMDS_EXPORT SMDS_FaceOfNodes:public SMDS_MeshFace { public: void Print(std::ostream & OS) const; diff --git a/src/SMDS/SMDS_FacePosition.hxx b/src/SMDS/SMDS_FacePosition.hxx index 8ca74130f..7c6a2fa04 100644 --- a/src/SMDS/SMDS_FacePosition.hxx +++ b/src/SMDS/SMDS_FacePosition.hxx @@ -27,21 +27,11 @@ #ifndef _SMDS_FacePosition_HeaderFile #define _SMDS_FacePosition_HeaderFile -#include "SMDS_Position.hxx" - -//#ifdef WNT -//#include -//#else -//#define SALOME_WNT_EXPORT -//#endif +#include "SMESH_SMDS.hxx" -#if defined WNT && defined WIN32 && defined SMDS_EXPORTS -#define SMDS_WNT_EXPORT __declspec( dllexport ) -#else -#define SMDS_WNT_EXPORT -#endif +#include "SMDS_Position.hxx" -class SMDS_WNT_EXPORT SMDS_FacePosition:public SMDS_Position +class SMDS_EXPORT SMDS_FacePosition:public SMDS_Position { public: diff --git a/src/SMDS/SMDS_IteratorOfElements.hxx b/src/SMDS/SMDS_IteratorOfElements.hxx index faf777de9..ba44c1841 100644 --- a/src/SMDS/SMDS_IteratorOfElements.hxx +++ b/src/SMDS/SMDS_IteratorOfElements.hxx @@ -19,12 +19,14 @@ // // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +#include "SMESH_SMDS.hxx" + #include "SMDS_Iterator.hxx" #include "SMDS_MeshElement.hxx" #include -class SMDS_IteratorOfElements:public SMDS_ElemIterator +class SMDS_EXPORT SMDS_IteratorOfElements:public SMDS_ElemIterator { public: ///////////////////////////////////////////////////////////////////////////// diff --git a/src/SMDS/SMDS_Mesh.hxx b/src/SMDS/SMDS_Mesh.hxx index 612082ce4..7225b7162 100644 --- a/src/SMDS/SMDS_Mesh.hxx +++ b/src/SMDS/SMDS_Mesh.hxx @@ -27,6 +27,8 @@ #ifndef _SMDS_Mesh_HeaderFile #define _SMDS_Mesh_HeaderFile +#include "SMESH_SMDS.hxx" + #include "SMDS_MeshNode.hxx" #include "SMDS_MeshEdge.hxx" #include "SMDS_MeshFace.hxx" @@ -35,17 +37,6 @@ #include "SMDS_ElemIterator.hxx" #include -//#ifdef WNT -//#include -//#else -//#define SALOME_WNT_EXPORT -//#endif -#if defined WNT && defined WIN32 && defined SMDS_EXPORTS -#define SMDS_WNT_EXPORT __declspec( dllexport ) -#else -#define SMDS_WNT_EXPORT -#endif - #include #include #include @@ -59,7 +50,7 @@ typedef boost::shared_ptr > SMDS_FaceIterat typedef SMDS_Iterator SMDS_VolumeIterator; typedef boost::shared_ptr > SMDS_VolumeIteratorPtr; -class SMDS_WNT_EXPORT SMDS_Mesh:public SMDS_MeshObject{ +class SMDS_EXPORT SMDS_Mesh:public SMDS_MeshObject{ public: SMDS_Mesh(); diff --git a/src/SMDS/SMDS_MeshEdge.hxx b/src/SMDS/SMDS_MeshEdge.hxx index 290210ca3..c5c5102ed 100644 --- a/src/SMDS/SMDS_MeshEdge.hxx +++ b/src/SMDS/SMDS_MeshEdge.hxx @@ -27,10 +27,12 @@ #ifndef _SMDS_MeshEdge_HeaderFile #define _SMDS_MeshEdge_HeaderFile +#include "SMESH_SMDS.hxx" + #include "SMDS_MeshElement.hxx" #include -class SMDS_MeshEdge:public SMDS_MeshElement +class SMDS_EXPORT SMDS_MeshEdge:public SMDS_MeshElement { public: diff --git a/src/SMDS/SMDS_MeshElement.hxx b/src/SMDS/SMDS_MeshElement.hxx index 73870b707..0b774cda1 100644 --- a/src/SMDS/SMDS_MeshElement.hxx +++ b/src/SMDS/SMDS_MeshElement.hxx @@ -26,24 +26,14 @@ #ifndef _SMDS_MeshElement_HeaderFile #define _SMDS_MeshElement_HeaderFile + +#include "SMESH_SMDS.hxx" #include "SMDSAbs_ElementType.hxx" #include "SMDS_MeshObject.hxx" #include "SMDS_ElemIterator.hxx" #include "SMDS_MeshElementIDFactory.hxx" -//#ifdef WNT -//#include -//#else -//#define SALOME_WNT_EXPORT -//#endif - -#if defined WNT && defined WIN32 && defined SMDS_EXPORTS -#define SMDS_WNT_EXPORT __declspec( dllexport ) -#else -#define SMDS_WNT_EXPORT -#endif - #include #include @@ -54,7 +44,7 @@ class SMDS_MeshFace; /////////////////////////////////////////////////////////////////////////////// /// Base class for elements /////////////////////////////////////////////////////////////////////////////// -class SMDS_WNT_EXPORT SMDS_MeshElement:public SMDS_MeshObject +class SMDS_EXPORT SMDS_MeshElement:public SMDS_MeshObject { public: diff --git a/src/SMDS/SMDS_MeshElementIDFactory.hxx b/src/SMDS/SMDS_MeshElementIDFactory.hxx index 526bcb5a0..02c5309b3 100644 --- a/src/SMDS/SMDS_MeshElementIDFactory.hxx +++ b/src/SMDS/SMDS_MeshElementIDFactory.hxx @@ -27,6 +27,8 @@ #ifndef _SMDS_MeshElementIDFactory_HeaderFile #define _SMDS_MeshElementIDFactory_HeaderFile +#include "SMESH_SMDS.hxx" + #include "SMDS_MeshIDFactory.hxx" #include "SMDS_ElemIterator.hxx" @@ -36,7 +38,7 @@ class SMDS_MeshElement; typedef NCollection_DataMap SMDS_IdElementMap; -class SMDS_MeshElementIDFactory:public SMDS_MeshIDFactory +class SMDS_EXPORT SMDS_MeshElementIDFactory:public SMDS_MeshIDFactory { public: SMDS_MeshElementIDFactory(); diff --git a/src/SMDS/SMDS_MeshFace.hxx b/src/SMDS/SMDS_MeshFace.hxx index 36f2fa542..bd3c3f17a 100644 --- a/src/SMDS/SMDS_MeshFace.hxx +++ b/src/SMDS/SMDS_MeshFace.hxx @@ -27,9 +27,11 @@ #ifndef _SMDS_MeshFace_HeaderFile #define _SMDS_MeshFace_HeaderFile +#include "SMESH_SMDS.hxx" + #include "SMDS_MeshElement.hxx" -class SMDS_MeshFace:public SMDS_MeshElement +class SMDS_EXPORT SMDS_MeshFace:public SMDS_MeshElement { public: SMDSAbs_ElementType GetType() const; diff --git a/src/SMDS/SMDS_MeshGroup.hxx b/src/SMDS/SMDS_MeshGroup.hxx index 37893fab4..c3f3278d1 100644 --- a/src/SMDS/SMDS_MeshGroup.hxx +++ b/src/SMDS/SMDS_MeshGroup.hxx @@ -26,22 +26,12 @@ #ifndef _SMDS_MeshGroup_HeaderFile #define _SMDS_MeshGroup_HeaderFile +#include "SMESH_SMDS.hxx" + #include "SMDS_Mesh.hxx" #include -//#ifdef WNT -//#include -//#else -//#define SALOME_WNT_EXPORT -//#endif - -#if defined WNT && defined WIN32 && defined SMDS_EXPORTS -#define SMDS_WNT_EXPORT __declspec( dllexport ) -#else -#define SMDS_WNT_EXPORT -#endif - -class SMDS_WNT_EXPORT SMDS_MeshGroup:public SMDS_MeshObject +class SMDS_EXPORT SMDS_MeshGroup:public SMDS_MeshObject { public: SMDS_MeshGroup(const SMDS_Mesh * theMesh, diff --git a/src/SMDS/SMDS_MeshIDFactory.hxx b/src/SMDS/SMDS_MeshIDFactory.hxx index 8a6425ac2..ade5a31a0 100644 --- a/src/SMDS/SMDS_MeshIDFactory.hxx +++ b/src/SMDS/SMDS_MeshIDFactory.hxx @@ -27,11 +27,13 @@ #ifndef _SMDS_MeshIDFactory_HeaderFile #define _SMDS_MeshIDFactory_HeaderFile +#include "SMESH_SMDS.hxx" + #include "SMDS_MeshObject.hxx" #include -class SMDS_MeshIDFactory:public SMDS_MeshObject +class SMDS_EXPORT SMDS_MeshIDFactory:public SMDS_MeshObject { public: virtual int GetFreeID(); diff --git a/src/SMDS/SMDS_MeshNode.hxx b/src/SMDS/SMDS_MeshNode.hxx index 042a1734a..1a245b1ef 100644 --- a/src/SMDS/SMDS_MeshNode.hxx +++ b/src/SMDS/SMDS_MeshNode.hxx @@ -27,23 +27,13 @@ #ifndef _SMDS_MeshNode_HeaderFile #define _SMDS_MeshNode_HeaderFile +#include "SMESH_SMDS.hxx" + #include "SMDS_MeshElement.hxx" #include "SMDS_Position.hxx" #include -//#ifdef WNT -//#include -//#else -//#define SALOME_WNT_EXPORT -//#endif - -#if defined WNT && defined WIN32 && defined SMDS_EXPORTS -#define SMDS_WNT_EXPORT __declspec( dllexport ) -#else -#define SMDS_WNT_EXPORT -#endif - -class SMDS_WNT_EXPORT SMDS_MeshNode:public SMDS_MeshElement +class SMDS_EXPORT SMDS_MeshNode:public SMDS_MeshElement { public: diff --git a/src/SMDS/SMDS_MeshObject.hxx b/src/SMDS/SMDS_MeshObject.hxx index f734309cf..da7c92657 100644 --- a/src/SMDS/SMDS_MeshObject.hxx +++ b/src/SMDS/SMDS_MeshObject.hxx @@ -27,20 +27,9 @@ #ifndef _SMDS_MeshObject_HeaderFile #define _SMDS_MeshObject_HeaderFile +#include "SMESH_SMDS.hxx" -//#ifdef WNT -//#include -//#else -//#define SALOME_WNT_EXPORT -//#endif - -#if defined WNT && defined WIN32 && defined SMDS_EXPORTS -#define SMDS_WNT_EXPORT __declspec( dllexport ) -#else -#define SMDS_WNT_EXPORT -#endif - -class SMDS_WNT_EXPORT SMDS_MeshObject +class SMDS_EXPORT SMDS_MeshObject { public: virtual ~SMDS_MeshObject() {} diff --git a/src/SMDS/SMDS_MeshVolume.hxx b/src/SMDS/SMDS_MeshVolume.hxx index c543c3001..d988febe5 100644 --- a/src/SMDS/SMDS_MeshVolume.hxx +++ b/src/SMDS/SMDS_MeshVolume.hxx @@ -27,9 +27,11 @@ #ifndef _SMDS_MeshVolume_HeaderFile #define _SMDS_MeshVolume_HeaderFile +#include "SMESH_SMDS.hxx" + #include "SMDS_MeshElement.hxx" -class SMDS_MeshVolume:public SMDS_MeshElement +class SMDS_EXPORT SMDS_MeshVolume:public SMDS_MeshElement { public: diff --git a/src/SMDS/SMDS_PolygonalFaceOfNodes.hxx b/src/SMDS/SMDS_PolygonalFaceOfNodes.hxx index 567746259..59f204b69 100644 --- a/src/SMDS/SMDS_PolygonalFaceOfNodes.hxx +++ b/src/SMDS/SMDS_PolygonalFaceOfNodes.hxx @@ -22,6 +22,8 @@ #ifndef _SMDS_PolygonalFaceOfNodes_HeaderFile #define _SMDS_PolygonalFaceOfNodes_HeaderFile +#include "SMESH_SMDS.hxx" + #include "SMDS_MeshFace.hxx" //#include "SMDS_FaceOfNodes.hxx" #include "SMDS_MeshNode.hxx" @@ -30,7 +32,7 @@ #include //class SMDS_PolygonalFaceOfNodes:public SMDS_FaceOfNodes -class SMDS_PolygonalFaceOfNodes:public SMDS_MeshFace +class SMDS_EXPORT SMDS_PolygonalFaceOfNodes:public SMDS_MeshFace { public: SMDS_PolygonalFaceOfNodes (std::vector nodes); diff --git a/src/SMDS/SMDS_PolyhedralVolumeOfNodes.hxx b/src/SMDS/SMDS_PolyhedralVolumeOfNodes.hxx index baecaf339..dd6c92712 100644 --- a/src/SMDS/SMDS_PolyhedralVolumeOfNodes.hxx +++ b/src/SMDS/SMDS_PolyhedralVolumeOfNodes.hxx @@ -27,14 +27,11 @@ #ifndef _SMDS_PolyhedralVolumeOfNodes_HeaderFile #define _SMDS_PolyhedralVolumeOfNodes_HeaderFile +#include "SMESH_SMDS.hxx" + #include "SMDS_VolumeOfNodes.hxx" -#if defined WNT && defined WIN32 && defined SMDS_EXPORTS -#define SMDS_WNT_EXPORT __declspec( dllexport ) -#else -#define SMDS_WNT_EXPORT -#endif -class SMDS_WNT_EXPORT SMDS_PolyhedralVolumeOfNodes:public SMDS_VolumeOfNodes +class SMDS_EXPORT SMDS_PolyhedralVolumeOfNodes:public SMDS_VolumeOfNodes { public: SMDS_PolyhedralVolumeOfNodes (std::vector nodes, diff --git a/src/SMDS/SMDS_Position.hxx b/src/SMDS/SMDS_Position.hxx index 9b11dc6f9..034cb85a7 100644 --- a/src/SMDS/SMDS_Position.hxx +++ b/src/SMDS/SMDS_Position.hxx @@ -27,26 +27,15 @@ #ifndef _SMDS_Position_HeaderFile #define _SMDS_Position_HeaderFile +#include "SMESH_SMDS.hxx" + #include "SMDS_TypeOfPosition.hxx" #include -//#ifdef WNT -//#include -//#else -//#define SALOME_WNT_EXPORT -//#endif - -#if defined WNT && defined WIN32 && defined SMDS_EXPORTS -#define SMDS_WNT_EXPORT __declspec( dllexport ) -#else -#define SMDS_WNT_EXPORT -#endif - class SMDS_Position; typedef boost::shared_ptr SMDS_PositionPtr; - -class SMDS_WNT_EXPORT SMDS_Position +class SMDS_EXPORT SMDS_Position { public: diff --git a/src/SMDS/SMDS_SpacePosition.hxx b/src/SMDS/SMDS_SpacePosition.hxx index f4c7bff1a..f0e880b2c 100644 --- a/src/SMDS/SMDS_SpacePosition.hxx +++ b/src/SMDS/SMDS_SpacePosition.hxx @@ -27,21 +27,11 @@ #ifndef _SMDS_SpacePosition_HeaderFile #define _SMDS_SpacePosition_HeaderFile -#include "SMDS_Position.hxx" - -//#ifdef WNT -//#include -//#else -//#define SALOME_WNT_EXPORT -//#endif +#include "SMESH_SMDS.hxx" -#if defined WNT && defined WIN32 && defined SMDS_EXPORTS -#define SMDS_WNT_EXPORT __declspec( dllexport ) -#else -#define SMDS_WNT_EXPORT -#endif +#include "SMDS_Position.hxx" -class SMDS_WNT_EXPORT SMDS_SpacePosition:public SMDS_Position +class SMDS_EXPORT SMDS_SpacePosition:public SMDS_Position { public: diff --git a/src/SMDS/SMDS_VertexPosition.hxx b/src/SMDS/SMDS_VertexPosition.hxx index 68c1e3a58..3abe55197 100644 --- a/src/SMDS/SMDS_VertexPosition.hxx +++ b/src/SMDS/SMDS_VertexPosition.hxx @@ -27,21 +27,11 @@ #ifndef _SMDS_VertexPosition_HeaderFile #define _SMDS_VertexPosition_HeaderFile -#include "SMDS_Position.hxx" - -//#ifdef WNT -//#include -//#else -//#define SALOME_WNT_EXPORT -//#endif +#include "SMESH_SMDS.hxx" -#if defined WNT && defined WIN32 && defined SMDS_EXPORTS -#define SMDS_WNT_EXPORT __declspec( dllexport ) -#else -#define SMDS_WNT_EXPORT -#endif +#include "SMDS_Position.hxx" -class SMDS_WNT_EXPORT SMDS_VertexPosition:public SMDS_Position +class SMDS_EXPORT SMDS_VertexPosition:public SMDS_Position { public: diff --git a/src/SMDS/SMDS_VolumeOfFaces.hxx b/src/SMDS/SMDS_VolumeOfFaces.hxx index ae3b28881..540bc3192 100644 --- a/src/SMDS/SMDS_VolumeOfFaces.hxx +++ b/src/SMDS/SMDS_VolumeOfFaces.hxx @@ -27,13 +27,15 @@ #ifndef _SMDS_VolumeOfFaces_HeaderFile #define _SMDS_VolumeOfFaces_HeaderFile +#include "SMESH_SMDS.hxx" + #include "SMDS_MeshVolume.hxx" #include "SMDS_MeshFace.hxx" #include "SMDS_Iterator.hxx" #include -class SMDS_VolumeOfFaces:public SMDS_MeshVolume +class SMDS_EXPORT SMDS_VolumeOfFaces:public SMDS_MeshVolume { public: diff --git a/src/SMDS/SMDS_VolumeOfNodes.hxx b/src/SMDS/SMDS_VolumeOfNodes.hxx index bb553a03a..bcefccef0 100644 --- a/src/SMDS/SMDS_VolumeOfNodes.hxx +++ b/src/SMDS/SMDS_VolumeOfNodes.hxx @@ -27,10 +27,11 @@ #ifndef _SMDS_VolumeOfNodes_HeaderFile #define _SMDS_VolumeOfNodes_HeaderFile -#include "SMDS_MeshVolume.hxx" +#include "SMESH_SMDS.hxx" +#include "SMDS_MeshVolume.hxx" -class SMDS_VolumeOfNodes:public SMDS_MeshVolume +class SMDS_EXPORT SMDS_VolumeOfNodes:public SMDS_MeshVolume { public: diff --git a/src/SMDS/SMDS_VolumeTool.hxx b/src/SMDS/SMDS_VolumeTool.hxx index beec061b7..357475a81 100644 --- a/src/SMDS/SMDS_VolumeTool.hxx +++ b/src/SMDS/SMDS_VolumeTool.hxx @@ -30,6 +30,8 @@ #ifndef SMDS_VolumeTool_HeaderFile #define SMDS_VolumeTool_HeaderFile +#include "SMESH_SMDS.hxx" + class SMDS_MeshElement; class SMDS_MeshNode; class SMDS_PolyhedralVolumeOfNodes; @@ -37,18 +39,6 @@ class SMDS_PolyhedralVolumeOfNodes; #include #include -//#ifdef WNT -//#include -//#else -//#define SALOME_WNT_EXPORT -//#endif - -#if defined WNT && defined WIN32 && defined SMDS_EXPORTS -#define SMDS_WNT_EXPORT __declspec( dllexport ) -#else -#define SMDS_WNT_EXPORT -#endif - // ========================================================================= // // Class providing topological and other information about SMDS_MeshVolume: @@ -57,7 +47,7 @@ class SMDS_PolyhedralVolumeOfNodes; // // ========================================================================= -class SMDS_WNT_EXPORT SMDS_VolumeTool +class SMDS_EXPORT SMDS_VolumeTool { public: diff --git a/src/SMDS/SMESH_SMDS.hxx b/src/SMDS/SMESH_SMDS.hxx new file mode 100755 index 000000000..207cf7210 --- /dev/null +++ b/src/SMDS/SMESH_SMDS.hxx @@ -0,0 +1,39 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SMESH_SMDS.hxx +// Author : Alexander A. BORODIN +// Module : SMESH + +#ifndef _SMESH_SMDS_HXX_ +#define _SMESH_SMDS_HXX_ + +#ifdef WNT + #if defined SMDS_EXPORTS + #define SMDS_EXPORT __declspec( dllexport ) + #else + #define SMDS_EXPORT __declspec( dllimport ) + #endif +#else + #define SMDS_EXPORT +#endif + +#endif \ No newline at end of file diff --git a/src/SMESH/Makefile.in b/src/SMESH/Makefile.in index a311488eb..383bf2182 100644 --- a/src/SMESH/Makefile.in +++ b/src/SMESH/Makefile.in @@ -50,7 +50,8 @@ EXPORT_HEADERS= \ SMESH_IndexedDataMapOfShapeIndexedMapOfShape.hxx \ SMESH_DataMapOfElemPtrSequenceOfElemPtr.hxx \ SMESH_SequenceOfElemPtr.hxx \ - SMESH_SequenceOfNode.hxx + SMESH_SequenceOfNode.hxx \ + SMESH_SMESH.hxx EXPORT_PYSCRIPTS = diff --git a/src/SMESH/SMESH_1D_Algo.cxx b/src/SMESH/SMESH_1D_Algo.cxx index 37567a536..7a3e9d813 100644 --- a/src/SMESH/SMESH_1D_Algo.cxx +++ b/src/SMESH/SMESH_1D_Algo.cxx @@ -26,11 +26,12 @@ // Module : SMESH // $Header$ -using namespace std; #include "SMESH_1D_Algo.hxx" #include "SMESH_Gen.hxx" #include "SMESH_subMesh.hxx" +using namespace std; + //============================================================================= /*! * diff --git a/src/SMESH/SMESH_1D_Algo.hxx b/src/SMESH/SMESH_1D_Algo.hxx index 378ed7545..653b37c0c 100644 --- a/src/SMESH/SMESH_1D_Algo.hxx +++ b/src/SMESH/SMESH_1D_Algo.hxx @@ -29,9 +29,11 @@ #ifndef _SMESH_1D_ALGO_HXX_ #define _SMESH_1D_ALGO_HXX_ +#include "SMESH_SMESH.hxx" + #include "SMESH_Algo.hxx" -class SMESH_1D_Algo: +class SMESH_EXPORT SMESH_1D_Algo: public SMESH_Algo { public: diff --git a/src/SMESH/SMESH_2D_Algo.cxx b/src/SMESH/SMESH_2D_Algo.cxx index d1084f7d4..1e11fc42a 100644 --- a/src/SMESH/SMESH_2D_Algo.cxx +++ b/src/SMESH/SMESH_2D_Algo.cxx @@ -26,13 +26,14 @@ // Module : SMESH // $Header$ -using namespace std; #include "SMESH_2D_Algo.hxx" #include "SMESH_Gen.hxx" #include "SMESH_subMesh.hxx" #include "utilities.h" +using namespace std; + //============================================================================= /*! * diff --git a/src/SMESH/SMESH_2D_Algo.hxx b/src/SMESH/SMESH_2D_Algo.hxx index 5c904e22e..dce6fbcfd 100644 --- a/src/SMESH/SMESH_2D_Algo.hxx +++ b/src/SMESH/SMESH_2D_Algo.hxx @@ -29,10 +29,12 @@ #ifndef _SMESH_2D_ALGO_HXX_ #define _SMESH_2D_ALGO_HXX_ +#include "SMESH_SMESH.hxx" + #include "SMESH_Algo.hxx" #include -class SMESH_2D_Algo: +class SMESH_EXPORT SMESH_2D_Algo: public SMESH_Algo { public: diff --git a/src/SMESH/SMESH_3D_Algo.cxx b/src/SMESH/SMESH_3D_Algo.cxx index d42680f62..3e1e5a407 100644 --- a/src/SMESH/SMESH_3D_Algo.cxx +++ b/src/SMESH/SMESH_3D_Algo.cxx @@ -26,13 +26,14 @@ // Module : SMESH // $Header$ -using namespace std; #include "SMESH_3D_Algo.hxx" #include "SMESH_Gen.hxx" #include "SMESH_subMesh.hxx" #include "utilities.h" +using namespace std; + //============================================================================= /*! * diff --git a/src/SMESH/SMESH_3D_Algo.hxx b/src/SMESH/SMESH_3D_Algo.hxx index 62621ce3c..cf96d86ad 100644 --- a/src/SMESH/SMESH_3D_Algo.hxx +++ b/src/SMESH/SMESH_3D_Algo.hxx @@ -29,9 +29,11 @@ #ifndef _SMESH_3D_ALGO_HXX_ #define _SMESH_3D_ALGO_HXX_ +#include "SMESH_SMESH.hxx" + #include "SMESH_Algo.hxx" -class SMESH_3D_Algo: +class SMESH_EXPORT SMESH_3D_Algo: public SMESH_Algo { public: diff --git a/src/SMESH/SMESH_Algo.cxx b/src/SMESH/SMESH_Algo.cxx index 3cddc41e7..f468b926c 100644 --- a/src/SMESH/SMESH_Algo.cxx +++ b/src/SMESH/SMESH_Algo.cxx @@ -26,7 +26,6 @@ // Module : SMESH // $Header$ -using namespace std; #include "SMESH_Algo.hxx" #include "SMESH_Gen.hxx" #include "SMESH_Mesh.hxx" @@ -55,6 +54,8 @@ using namespace std; #include +using namespace std; + //============================================================================= /*! * diff --git a/src/SMESH/SMESH_Algo.hxx b/src/SMESH/SMESH_Algo.hxx index c92b5893f..9bdb7d09a 100644 --- a/src/SMESH/SMESH_Algo.hxx +++ b/src/SMESH/SMESH_Algo.hxx @@ -29,6 +29,8 @@ #ifndef _SMESH_ALGO_HXX_ #define _SMESH_ALGO_HXX_ +#include "SMESH_SMESH.hxx" + #include "SMESH_Hypothesis.hxx" #include @@ -44,7 +46,7 @@ class TopoDS_Face; class TopoDS_Shape; class SMESHDS_Mesh; -class SMESH_Algo:public SMESH_Hypothesis +class SMESH_EXPORT SMESH_Algo:public SMESH_Hypothesis { public: SMESH_Algo(int hypId, int studyId, SMESH_Gen * gen); diff --git a/src/SMESH/SMESH_Block.hxx b/src/SMESH/SMESH_Block.hxx index 155104866..f641ba64c 100644 --- a/src/SMESH/SMESH_Block.hxx +++ b/src/SMESH/SMESH_Block.hxx @@ -25,6 +25,8 @@ #ifndef SMESH_Block_HeaderFile #define SMESH_Block_HeaderFile +#include "SMESH_SMESH.hxx" + #include #include #include @@ -52,7 +54,7 @@ class SMDS_MeshNode; // parameters inside the block and vice versa // ========================================================= -class SMESH_Block: public math_FunctionSetWithDerivatives +class SMESH_EXPORT SMESH_Block: public math_FunctionSetWithDerivatives { public: enum TShapeID { // ids of the block sub-shapes diff --git a/src/SMESH/SMESH_DataMapOfElemPtrSequenceOfElemPtr.hxx b/src/SMESH/SMESH_DataMapOfElemPtrSequenceOfElemPtr.hxx index a1c4dded3..4cec8043f 100644 --- a/src/SMESH/SMESH_DataMapOfElemPtrSequenceOfElemPtr.hxx +++ b/src/SMESH/SMESH_DataMapOfElemPtrSequenceOfElemPtr.hxx @@ -26,10 +26,13 @@ #ifndef SMESH_DataMapOfElemPtrSequenceOfElemPtr_HeaderFile #define SMESH_DataMapOfElemPtrSequenceOfElemPtr_HeaderFile +#include "SMESH_SMESH.hxx" + #include #include +SMESH_EXPORT inline Standard_Integer HashCode(SMDS_MeshElementPtr theElem, const Standard_Integer theUpper) { @@ -37,6 +40,7 @@ inline Standard_Integer HashCode(SMDS_MeshElementPtr theElem, return HashCode(anElem,theUpper); } +SMESH_EXPORT inline Standard_Boolean IsEqual(SMDS_MeshElementPtr theOne, SMDS_MeshElementPtr theTwo) { diff --git a/src/SMESH/SMESH_Gen.hxx b/src/SMESH/SMESH_Gen.hxx index 5364065ef..04b1bcb34 100644 --- a/src/SMESH/SMESH_Gen.hxx +++ b/src/SMESH/SMESH_Gen.hxx @@ -29,6 +29,8 @@ #ifndef _SMESH_GEN_HXX_ #define _SMESH_GEN_HXX_ +#include "SMESH_SMESH.hxx" + #include "Utils_SALOME_Exception.hxx" #include "SMESH_Hypothesis.hxx" @@ -52,7 +54,7 @@ typedef struct studyContextStruct SMESHDS_Document * myDocument; } StudyContextStruct; -class SMESH_Gen +class SMESH_EXPORT SMESH_Gen { public: SMESH_Gen(); diff --git a/src/SMESH/SMESH_Group.hxx b/src/SMESH/SMESH_Group.hxx index 26493e4e0..604d55f20 100644 --- a/src/SMESH/SMESH_Group.hxx +++ b/src/SMESH/SMESH_Group.hxx @@ -28,6 +28,8 @@ #ifndef _SMESH_Group_HeaderFile #define _SMESH_Group_HeaderFile +#include "SMESH_SMESH.hxx" + #include #include #include @@ -36,7 +38,7 @@ class SMESHDS_GroupBase; class SMESH_Mesh; -class SMESH_Group +class SMESH_EXPORT SMESH_Group { public: diff --git a/src/SMESH/SMESH_HypoFilter.hxx b/src/SMESH/SMESH_HypoFilter.hxx index 6bc34bf53..24ece73b4 100644 --- a/src/SMESH/SMESH_HypoFilter.hxx +++ b/src/SMESH/SMESH_HypoFilter.hxx @@ -29,6 +29,8 @@ #ifndef SMESH_HypoFilter_HeaderFile #define SMESH_HypoFilter_HeaderFile +#include "SMESH_SMESH.hxx" + // =========================== // Filter of SMESH_Hypothesis // =========================== @@ -40,7 +42,7 @@ class SMESH_HypoFilter; class SMESH_Hypothesis; -class SMESH_HypoPredicate { +class SMESH_EXPORT SMESH_HypoPredicate { public: virtual bool IsOk(const SMESH_Hypothesis* aHyp, const TopoDS_Shape& aShape) const = 0; diff --git a/src/SMESH/SMESH_Hypothesis.cxx b/src/SMESH/SMESH_Hypothesis.cxx index 0107c3e36..6cad0b0fd 100644 --- a/src/SMESH/SMESH_Hypothesis.cxx +++ b/src/SMESH/SMESH_Hypothesis.cxx @@ -26,13 +26,13 @@ // Module : SMESH // $Header$ -using namespace std; -using namespace std; #include "SMESH_Hypothesis.hxx" #include "SMESH_Gen.hxx" #include "SMESH_subMesh.hxx" #include "utilities.h" +using namespace std; + //============================================================================= /*! * diff --git a/src/SMESH/SMESH_Hypothesis.hxx b/src/SMESH/SMESH_Hypothesis.hxx index 2edcd141a..79e439ef1 100644 --- a/src/SMESH/SMESH_Hypothesis.hxx +++ b/src/SMESH/SMESH_Hypothesis.hxx @@ -29,13 +29,15 @@ #ifndef _SMESH_HYPOTHESIS_HXX_ #define _SMESH_HYPOTHESIS_HXX_ +#include "SMESH_SMESH.hxx" + #include "SMESHDS_Hypothesis.hxx" class SMESH_Gen; class TopoDS_Shape; class SMESH_Mesh; -class SMESH_Hypothesis: public SMESHDS_Hypothesis +class SMESH_EXPORT SMESH_Hypothesis: public SMESHDS_Hypothesis { public: enum Hypothesis_Status // in the order of severity diff --git a/src/SMESH/SMESH_IndexedDataMapOfShapeIndexedMapOfShape.hxx b/src/SMESH/SMESH_IndexedDataMapOfShapeIndexedMapOfShape.hxx index 5010b3ebc..4fc35195f 100644 --- a/src/SMESH/SMESH_IndexedDataMapOfShapeIndexedMapOfShape.hxx +++ b/src/SMESH/SMESH_IndexedDataMapOfShapeIndexedMapOfShape.hxx @@ -26,10 +26,13 @@ #ifndef SMESH_IndexedMapOfShape_HeaderFile #define SMESH_IndexedMapOfShape_HeaderFile +#include "SMESH_SMESH.hxx" + #include #include +SMESH_EXPORT inline Standard_Boolean IsEqual(const TopoDS_Shape& S1, const TopoDS_Shape& S2) { diff --git a/src/SMESH/SMESH_Mesh.hxx b/src/SMESH/SMESH_Mesh.hxx index 5054e0038..246bbbca8 100644 --- a/src/SMESH/SMESH_Mesh.hxx +++ b/src/SMESH/SMESH_Mesh.hxx @@ -29,6 +29,8 @@ #ifndef _SMESH_MESH_HXX_ #define _SMESH_MESH_HXX_ +#include "SMESH_SMESH.hxx" + #include "SMESH_Hypothesis.hxx" //#include "SMESH_subMesh.hxx" @@ -74,7 +76,7 @@ class SMESH_HypoFilter; //typedef NMTTools_IndexedDataMapOfShapeIndexedMapOfShape IndexedMapOfChain; typedef SMESH_IndexedDataMapOfShapeIndexedMapOfShape IndexedMapOfChain; -class SMESH_Mesh +class SMESH_EXPORT SMESH_Mesh { SMESH_Mesh(); SMESH_Mesh(const SMESH_Mesh&); diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index d75adf3e7..5860687f6 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -1969,8 +1969,8 @@ void SMESH_MeshEditor::Smooth (set & theElems, // iNotSame is where prevNodes and nextNodes are different //======================================================================= -static bool isReverse(const SMDS_MeshNode* prevNodes[], - const SMDS_MeshNode* nextNodes[], +static bool isReverse(vector prevNodes, + vector nextNodes, const int nbNodes, const int iNotSame) { @@ -2005,8 +2005,12 @@ static void sweepElement(SMESHDS_Mesh* aMesh, // Loop on elem nodes: // find new nodes and detect same nodes indices int nbNodes = elem->NbNodes(); - list::const_iterator itNN[ nbNodes ]; - const SMDS_MeshNode* prevNod[ nbNodes ], *nextNod[ nbNodes ]; + //list::const_iterator itNN[ nbNodes ]; + vector::const_iterator> itNN( nbNodes ); + //const SMDS_MeshNode* prevNod[ nbNodes ], *nextNod[ nbNodes ]; + vector prevNod( nbNodes ); + vector nextNod( nbNodes ); + int iNode, nbSame = 0, iNotSameNode = 0, iSameNode = 0; for ( iNode = 0; iNode < nbNodes; iNode++ ) @@ -3192,7 +3196,8 @@ int SMESH_MeshEditor::SimplifyFace (const vector faceNode set nodeSet; // get simple seq of nodes - const SMDS_MeshNode* simpleNodes[ nbNodes ]; + //const SMDS_MeshNode* simpleNodes[ nbNodes ]; + vector simpleNodes( nbNodes ); int iSimple = 0, nbUnique = 0; simpleNodes[iSimple++] = faceNodes[0]; @@ -3304,8 +3309,12 @@ void SMESH_MeshEditor::MergeNodes (TListOfListOfNodes & theGroupsOfNodes) int aShapeId = FindShape( elem ); set nodeSet; - const SMDS_MeshNode* curNodes[ nbNodes ], *uniqueNodes[ nbNodes ]; - int iUnique = 0, iCur = 0, nbRepl = 0, iRepl [ nbNodes ]; + //const SMDS_MeshNode* curNodes[ nbNodes ], *uniqueNodes[ nbNodes ]; + const SMDS_MeshNode** curNodes = new const SMDS_MeshNode*[ nbNodes ]; + const SMDS_MeshNode** uniqueNodes = new const SMDS_MeshNode*[ nbNodes ]; + + int iUnique = 0, iCur = 0, nbRepl = 0; + vector iRepl( nbNodes ); // get new seq of nodes SMDS_ElemIteratorPtr itN = elem->nodesIterator(); @@ -3691,13 +3700,14 @@ void SMESH_MeshEditor::MergeNodes (TListOfListOfNodes & theGroupsOfNodes) rmElemIds.push_back( elem->GetID() ); } + delete curNodes; + delete uniqueNodes; } // loop on elements // Remove equal nodes and bad elements Remove( rmNodeIds, true ); Remove( rmElemIds, false ); - } //======================================================================= @@ -3771,7 +3781,9 @@ const SMDS_MeshElement* continue; // get face nodes and find index of n1 int i1, nbN = elem->NbNodes(), iNode = 0; - const SMDS_MeshNode* faceNodes[ nbN ], *n; + //const SMDS_MeshNode* faceNodes[ nbN ], *n; + vector faceNodes( nbN ); + const SMDS_MeshNode* n; SMDS_ElemIteratorPtr nIt = elem->nodesIterator(); while ( nIt->more() ) { faceNodes[ iNode ] = static_cast( nIt->next() ); @@ -4105,7 +4117,8 @@ SMESH_MeshEditor::Sew_Error const SMDS_MeshElement* elem = invElemIt->next(); // prepare data for a loop on links, of a face or a volume int iPrevNode, iNode = 0, nbNodes = elem->NbNodes(); - const SMDS_MeshNode* faceNodes[ nbNodes ]; + //const SMDS_MeshNode* faceNodes[ nbNodes ]; + const SMDS_MeshNode** faceNodes = new const SMDS_MeshNode*[ nbNodes ]; bool isVolume = volume.Set( elem ); const SMDS_MeshNode** nodes = isVolume ? volume.GetNodes() : faceNodes; if ( isVolume ) // --volume @@ -4161,6 +4174,7 @@ SMESH_MeshEditor::Sew_Error } } } + delete faceNodes; } // loop on inverse elements of prevSideNode if ( !sideNode ) { @@ -4222,7 +4236,10 @@ SMESH_MeshEditor::Sew_Error // insert new nodes into the border and the side to get equal nb of segments // get normalized parameters of nodes on the borders - double param[ 2 ][ maxNbNodes ]; + //double param[ 2 ][ maxNbNodes ]; + double* param[ 2 ]; + param[0] = new double [ maxNbNodes ]; + param[1] = new double [ maxNbNodes ]; int iNode, iBord; for ( iBord = 0; iBord < 2; iBord++ ) { // loop on 2 borders list< const SMDS_MeshNode* >& nodes = nSide[ iBord ]; @@ -4383,6 +4400,8 @@ SMESH_MeshEditor::Sew_Error } } + delete param[0]; + delete param[1]; } // end: insert new nodes MergeNodes ( nodeGroupsToMerge ); @@ -4407,7 +4426,8 @@ void SMESH_MeshEditor::InsertNodesIntoLink(const SMDS_MeshElement* theFace, // find indices of 2 link nodes and of the rest nodes int iNode = 0, il1, il2, i3, i4; il1 = il2 = i3 = i4 = -1; - const SMDS_MeshNode* nodes[ theFace->NbNodes() ]; + //const SMDS_MeshNode* nodes[ theFace->NbNodes() ]; + vector nodes( theFace->NbNodes() ); SMDS_ElemIteratorPtr nodeIt = theFace->nodesIterator(); while ( nodeIt->more() ) { const SMDS_MeshNode* n = static_cast( nodeIt->next() ); @@ -4489,7 +4509,8 @@ void SMESH_MeshEditor::InsertNodesIntoLink(const SMDS_MeshElement* theFace, // put aNodesToInsert between theBetweenNode1 and theBetweenNode2 int nbLinkNodes = 2 + aNodesToInsert.size(); - const SMDS_MeshNode* linkNodes[ nbLinkNodes ]; + //const SMDS_MeshNode* linkNodes[ nbLinkNodes ]; + vector linkNodes( nbLinkNodes ); linkNodes[ 0 ] = nodes[ il1 ]; linkNodes[ nbLinkNodes - 1 ] = nodes[ il2 ]; list::iterator nIt = aNodesToInsert.begin(); diff --git a/src/SMESH/SMESH_MeshEditor.hxx b/src/SMESH/SMESH_MeshEditor.hxx index 78457ef15..9dfaf0af6 100644 --- a/src/SMESH/SMESH_MeshEditor.hxx +++ b/src/SMESH/SMESH_MeshEditor.hxx @@ -30,6 +30,8 @@ #ifndef SMESH_MeshEditor_HeaderFile #define SMESH_MeshEditor_HeaderFile +#include "SMESH_SMESH.hxx" + #include "SMESH_Mesh.hxx" #include "SMESH_Controls.hxx" #include "SMESH_SequenceOfNode.hxx" @@ -49,7 +51,7 @@ class gp_Ax1; class gp_Vec; class gp_Pnt; -class SMESH_MeshEditor { +class SMESH_EXPORT SMESH_MeshEditor { public: SMESH_MeshEditor( SMESH_Mesh* theMesh ); diff --git a/src/SMESH/SMESH_Pattern.hxx b/src/SMESH/SMESH_Pattern.hxx index e49b498ec..753e0237a 100644 --- a/src/SMESH/SMESH_Pattern.hxx +++ b/src/SMESH/SMESH_Pattern.hxx @@ -24,6 +24,8 @@ #ifndef SMESH_Pattern_HeaderFile #define SMESH_Pattern_HeaderFile +#include "SMESH_SMESH.hxx" + #include #include #include @@ -53,7 +55,7 @@ class TopoDS_Edge; // of 6 faces. // -class SMESH_Pattern { +class SMESH_EXPORT SMESH_Pattern { public: SMESH_Pattern (); diff --git a/src/SMESH/SMESH_SMESH.hxx b/src/SMESH/SMESH_SMESH.hxx new file mode 100755 index 000000000..32433cde3 --- /dev/null +++ b/src/SMESH/SMESH_SMESH.hxx @@ -0,0 +1,39 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SMESH_SMESH.hxx +// Author : Alexander A. BORODIN +// Module : SMESH + +#ifndef _SMESH_SMESH_HXX_ +#define _SMESH_SMESH_HXX_ + +#ifdef WNT + #if defined SMESH_EXPORTS + #define SMESH_EXPORT __declspec( dllexport ) + #else + #define SMESH_EXPORT __declspec( dllimport ) + #endif +#else + #define SMESH_EXPORT +#endif + +#endif diff --git a/src/SMESH/SMESH_SequenceOfElemPtr.hxx b/src/SMESH/SMESH_SequenceOfElemPtr.hxx index 6c0b740ed..c31a483f0 100644 --- a/src/SMESH/SMESH_SequenceOfElemPtr.hxx +++ b/src/SMESH/SMESH_SequenceOfElemPtr.hxx @@ -26,6 +26,8 @@ #ifndef SMESH_SequenceOfElemPtr_HeaderFile #define SMESH_SequenceOfElemPtr_HeaderFile +#include "SMESH_SMESH.hxx" + #include //#include diff --git a/src/SMESH/SMESH_SequenceOfNode.hxx b/src/SMESH/SMESH_SequenceOfNode.hxx index 21b648a06..35d6d17cb 100644 --- a/src/SMESH/SMESH_SequenceOfNode.hxx +++ b/src/SMESH/SMESH_SequenceOfNode.hxx @@ -26,6 +26,8 @@ #ifndef SMESH_SequenceOfNode_HeaderFile #define SMESH_SequenceOfNode_HeaderFile +#include "SMESH_SMESH.hxx" + #include typedef const SMDS_MeshNode* SMDS_MeshNodePtr; diff --git a/src/SMESH/SMESH_subMesh.cxx b/src/SMESH/SMESH_subMesh.cxx index 250040453..a5cb3c7ba 100644 --- a/src/SMESH/SMESH_subMesh.cxx +++ b/src/SMESH/SMESH_subMesh.cxx @@ -26,7 +26,6 @@ // Module : SMESH // $Header$ -using namespace std; #include "SMESH_subMesh.hxx" #include "SMESH_Gen.hxx" #include "SMESH_Mesh.hxx" @@ -53,6 +52,8 @@ using namespace std; #include #endif +using namespace std; + //============================================================================= /*! * default constructor: diff --git a/src/SMESH/SMESH_subMesh.hxx b/src/SMESH/SMESH_subMesh.hxx index 8251c6b94..2bebf84d1 100644 --- a/src/SMESH/SMESH_subMesh.hxx +++ b/src/SMESH/SMESH_subMesh.hxx @@ -29,6 +29,8 @@ #ifndef _SMESH_SUBMESH_HXX_ #define _SMESH_SUBMESH_HXX_ +#include "SMESH_SMESH.hxx" + #include "SMESHDS_Mesh.hxx" #include "SMESHDS_SubMesh.hxx" #include "SMESH_Hypothesis.hxx" @@ -46,7 +48,7 @@ class SMESH_Hypothesis; class SMESH_Algo; class SMESH_Gen; -class SMESH_subMesh +class SMESH_EXPORT SMESH_subMesh { public: SMESH_subMesh(int Id, SMESH_Mesh * father, SMESHDS_Mesh * meshDS, diff --git a/src/SMESHDS/Makefile.in b/src/SMESHDS/Makefile.in index 50d4fa742..ea7d101fb 100644 --- a/src/SMESHDS/Makefile.in +++ b/src/SMESHDS/Makefile.in @@ -67,7 +67,8 @@ EXPORT_HEADERS= \ SMESHDS_SubMesh.hxx \ SMESHDS_GroupBase.hxx \ SMESHDS_Group.hxx \ - SMESHDS_GroupOnGeom.hxx + SMESHDS_GroupOnGeom.hxx \ + SMESH_SMESHDS.hxx # additionnal information to compil and link file CPPFLAGS += $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome $(BOOST_CPPFLAGS) diff --git a/src/SMESHDS/SMESHDS_Command.hxx b/src/SMESHDS/SMESHDS_Command.hxx index 3ecd762f3..3439cfc1c 100644 --- a/src/SMESHDS/SMESHDS_Command.hxx +++ b/src/SMESHDS/SMESHDS_Command.hxx @@ -27,11 +27,13 @@ #ifndef _SMESHDS_Command_HeaderFile #define _SMESHDS_Command_HeaderFile +#include "SMESH_SMESHDS.hxx" + #include "SMESHDS_CommandType.hxx" #include #include -class SMESHDS_Command +class SMESHDS_EXPORT SMESHDS_Command { public: diff --git a/src/SMESHDS/SMESHDS_Document.hxx b/src/SMESHDS/SMESHDS_Document.hxx index e95269f11..c7184a90e 100644 --- a/src/SMESHDS/SMESHDS_Document.hxx +++ b/src/SMESHDS/SMESHDS_Document.hxx @@ -27,12 +27,14 @@ #ifndef _SMESHDS_Document_HeaderFile #define _SMESHDS_Document_HeaderFile +#include "SMESH_SMESHDS.hxx" + #include "SMESHDS_Mesh.hxx" #include "SMESHDS_Hypothesis.hxx" #include -class SMESHDS_Document +class SMESHDS_EXPORT SMESHDS_Document { public: SMESHDS_Document(int UserID); diff --git a/src/SMESHDS/SMESHDS_Group.hxx b/src/SMESHDS/SMESHDS_Group.hxx index b318a0f97..8ceabf523 100644 --- a/src/SMESHDS/SMESHDS_Group.hxx +++ b/src/SMESHDS/SMESHDS_Group.hxx @@ -27,13 +27,15 @@ #ifndef _SMESHDS_Group_HeaderFile #define _SMESHDS_Group_HeaderFile +#include "SMESH_SMESHDS.hxx" + #include #include "SMESHDS_GroupBase.hxx" #include "SMDS_MeshGroup.hxx" class SMESHDS_Mesh; -class SMESHDS_Group : public SMESHDS_GroupBase +class SMESHDS_EXPORT SMESHDS_Group : public SMESHDS_GroupBase { public: diff --git a/src/SMESHDS/SMESHDS_GroupBase.hxx b/src/SMESHDS/SMESHDS_GroupBase.hxx index a7aa87ced..29c388e6a 100644 --- a/src/SMESHDS/SMESHDS_GroupBase.hxx +++ b/src/SMESHDS/SMESHDS_GroupBase.hxx @@ -27,13 +27,15 @@ #ifndef _SMESHDS_GroupBase_HeaderFile #define _SMESHDS_GroupBase_HeaderFile +#include "SMESH_SMESHDS.hxx" + #include #include "SMDSAbs_ElementType.hxx" #include "SMDS_MeshElement.hxx" class SMESHDS_Mesh; -class SMESHDS_GroupBase +class SMESHDS_EXPORT SMESHDS_GroupBase { public: diff --git a/src/SMESHDS/SMESHDS_GroupOnGeom.hxx b/src/SMESHDS/SMESHDS_GroupOnGeom.hxx index 6a514e2f1..cbec91ece 100644 --- a/src/SMESHDS/SMESHDS_GroupOnGeom.hxx +++ b/src/SMESHDS/SMESHDS_GroupOnGeom.hxx @@ -27,12 +27,14 @@ #ifndef _SMESHDS_GroupOnGeom_HeaderFile #define _SMESHDS_GroupOnGeom_HeaderFile +#include "SMESH_SMESHDS.hxx" + #include "SMESHDS_GroupBase.hxx" #include class SMESHDS_SubMesh; -class SMESHDS_GroupOnGeom: public SMESHDS_GroupBase +class SMESHDS_EXPORT SMESHDS_GroupOnGeom: public SMESHDS_GroupBase { public: diff --git a/src/SMESHDS/SMESHDS_Hypothesis.hxx b/src/SMESHDS/SMESHDS_Hypothesis.hxx index 9fb413fbd..28a2964c2 100644 --- a/src/SMESHDS/SMESHDS_Hypothesis.hxx +++ b/src/SMESHDS/SMESHDS_Hypothesis.hxx @@ -29,10 +29,12 @@ #ifndef _SMESHDS_HYPOTHESIS_HXX_ #define _SMESHDS_HYPOTHESIS_HXX_ +#include "SMESH_SMESHDS.hxx" + #include #include -class SMESHDS_Hypothesis +class SMESHDS_EXPORT SMESHDS_Hypothesis { public: SMESHDS_Hypothesis(int hypId); diff --git a/src/SMESHDS/SMESHDS_Mesh.hxx b/src/SMESHDS/SMESHDS_Mesh.hxx index a5a54907b..dc3f47975 100644 --- a/src/SMESHDS/SMESHDS_Mesh.hxx +++ b/src/SMESHDS/SMESHDS_Mesh.hxx @@ -27,6 +27,8 @@ #ifndef _SMESHDS_Mesh_HeaderFile #define _SMESHDS_Mesh_HeaderFile +#include "SMESH_SMESHDS.hxx" + #include "SMDS_Mesh.hxx" #include "SMDS_MeshNode.hxx" #include "SMDS_MeshEdge.hxx" @@ -68,15 +70,9 @@ namespace gstd = std; #endif -#if defined WNT && defined WIN32 && defined SMESHDS_EXPORTS -#define SMESHDS_WNT_EXPORT __declspec( dllexport ) -#else -#define SMESHDS_WNT_EXPORT -#endif - class SMESHDS_GroupBase; -class SMESHDS_WNT_EXPORT SMESHDS_Mesh:public SMDS_Mesh{ +class SMESHDS_EXPORT SMESHDS_Mesh:public SMDS_Mesh{ public: SMESHDS_Mesh(int MeshID); void ShapeToMesh(const TopoDS_Shape & S); diff --git a/src/SMESHDS/SMESHDS_Script.hxx b/src/SMESHDS/SMESHDS_Script.hxx index 3874facfc..c9b66e029 100644 --- a/src/SMESHDS/SMESHDS_Script.hxx +++ b/src/SMESHDS/SMESHDS_Script.hxx @@ -27,13 +27,15 @@ #ifndef _SMESHDS_Script_HeaderFile #define _SMESHDS_Script_HeaderFile +#include "SMESH_SMESHDS.hxx" + #include "SMESHDS_Command.hxx" #include #include -class SMESHDS_Script +class SMESHDS_EXPORT SMESHDS_Script { public: void AddNode(int NewNodeID, double x, double y, double z); diff --git a/src/SMESHDS/SMESHDS_SubMesh.hxx b/src/SMESHDS/SMESHDS_SubMesh.hxx index ac3cd1c3f..4406c282b 100644 --- a/src/SMESHDS/SMESHDS_SubMesh.hxx +++ b/src/SMESHDS/SMESHDS_SubMesh.hxx @@ -27,16 +27,12 @@ #ifndef _SMESHDS_SubMesh_HeaderFile #define _SMESHDS_SubMesh_HeaderFile +#include "SMESH_SMESHDS.hxx" + #include "SMDS_Mesh.hxx" #include -#if defined WNT && defined WIN32 && defined SMESHDS_EXPORTS -#define SMESHDS_WNT_EXPORT __declspec( dllexport ) -#else -#define SMESHDS_WNT_EXPORT -#endif - -class SMESHDS_WNT_EXPORT SMESHDS_SubMesh +class SMESHDS_EXPORT SMESHDS_SubMesh { public: diff --git a/src/SMESHDS/SMESH_SMESHDS.hxx b/src/SMESHDS/SMESH_SMESHDS.hxx new file mode 100755 index 000000000..fdef18da9 --- /dev/null +++ b/src/SMESHDS/SMESH_SMESHDS.hxx @@ -0,0 +1,39 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SMESH_SMESHDS.hxx +// Author : Alexander A. BORODIN +// Module : SMESH + +#ifndef _SMESH_SMESHDS_HXX_ +#define _SMESH_SMESHDS_HXX_ + +#ifdef WNT + #if defined SMESHDS_EXPORTS + #define SMESHDS_EXPORT __declspec( dllexport ) + #else + #define SMESHDS_EXPORT __declspec( dllimport ) + #endif +#else + #define SMESHDS_EXPORT +#endif + +#endif \ No newline at end of file diff --git a/src/SMESHFiltersSelection/SMESH_LogicalFilter.hxx b/src/SMESHFiltersSelection/SMESH_LogicalFilter.hxx index 609865680..ce12108d7 100644 --- a/src/SMESHFiltersSelection/SMESH_LogicalFilter.hxx +++ b/src/SMESHFiltersSelection/SMESH_LogicalFilter.hxx @@ -23,11 +23,13 @@ #ifndef _SMESH_LogicalFilter_HeaderFile #define _SMESH_LogicalFilter_HeaderFile +#include "SMESH_Type.h" + #include #include -class SMESH_LogicalFilter : public SUIT_SelectionFilter +class SMESHFILTERSSELECTION_EXPORT SMESH_LogicalFilter : public SUIT_SelectionFilter { public: enum { LO_OR, LO_AND, LO_NOT, LO_UNDEFINED }; diff --git a/src/SMESHFiltersSelection/SMESH_NumberFilter.hxx b/src/SMESHFiltersSelection/SMESH_NumberFilter.hxx index 4b9f29cea..b8e0932b3 100644 --- a/src/SMESHFiltersSelection/SMESH_NumberFilter.hxx +++ b/src/SMESHFiltersSelection/SMESH_NumberFilter.hxx @@ -23,6 +23,8 @@ #ifndef _SMESH_NumberFilter_HeaderFile #define _SMESH_NumberFilter_HeaderFile +#include "SMESH_Type.h" + #include "SUIT_SelectionFilter.h" #include @@ -45,7 +47,7 @@ class SUIT_DataOwner; * * theMainObject - Sub-shapes of this object is selected only * * theIsClosedOnly - Closed shapes is selected if this parameter is true */ -class SMESH_NumberFilter : public SUIT_SelectionFilter +class SMESHFILTERSSELECTION_EXPORT SMESH_NumberFilter : public SUIT_SelectionFilter { public: SMESH_NumberFilter (const char* theKind, diff --git a/src/SMESHFiltersSelection/SMESH_Type.h b/src/SMESHFiltersSelection/SMESH_Type.h index e4d376832..25cc4deec 100644 --- a/src/SMESHFiltersSelection/SMESH_Type.h +++ b/src/SMESHFiltersSelection/SMESH_Type.h @@ -29,6 +29,16 @@ #ifndef SMESH_TYPE_HEADER #define SMESH_TYPE_HEADER +#ifdef WNT + #if defined SMESHFILTERSSELECTION_EXPORTS + #define SMESHFILTERSSELECTION_EXPORT __declspec( dllexport ) + #else + #define SMESHFILTERSSELECTION_EXPORT __declspec( dllimport ) + #endif +#else + #define SMESHFILTERSSELECTION_EXPORT +#endif + enum MeshObjectType { HYPOTHESIS, ALGORITHM, diff --git a/src/SMESHFiltersSelection/SMESH_TypeFilter.hxx b/src/SMESHFiltersSelection/SMESH_TypeFilter.hxx index 46724b6b7..6107a1393 100644 --- a/src/SMESHFiltersSelection/SMESH_TypeFilter.hxx +++ b/src/SMESHFiltersSelection/SMESH_TypeFilter.hxx @@ -28,7 +28,7 @@ class SUIT_DataOwner; -class SMESH_TypeFilter : public SUIT_SelectionFilter +class SMESHFILTERSSELECTION_EXPORT SMESH_TypeFilter : public SUIT_SelectionFilter { public: SMESH_TypeFilter (MeshObjectType theType); diff --git a/src/SMESHGUI/Makefile.in b/src/SMESHGUI/Makefile.in index 55987d6c2..268d4bc70 100644 --- a/src/SMESHGUI/Makefile.in +++ b/src/SMESHGUI/Makefile.in @@ -42,7 +42,8 @@ EXPORT_HEADERS= SMESHGUI_Swig.hxx \ SMESHGUI_Hypotheses.h \ SMESHGUI_HypothesesUtils.h \ SMESHGUI_SpinBox.h \ - SMESHGUI_Selection.h + SMESHGUI_Selection.h \ + SMESH_SMESHGUI.hxx # .po files to transform in .qm PO_FILES = \ diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index ecc471d99..f7f79516d 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -314,7 +314,7 @@ namespace{ aFormat = aFilterMap[fd->selectedFilter()]; is_ok = true; if( !aFilename.isEmpty() - && (aMesh->NbPolygons()>0 or aMesh->NbPolyhedrons()>0) + && (aMesh->NbPolygons()>0 || aMesh->NbPolyhedrons()>0) && aFormat==SMESH::MED_V2_1){ int aRet = SUIT_MessageBox::warn2(SMESHGUI::desktop(), QObject::tr("SMESH_WRN_WARNING"), @@ -669,127 +669,6 @@ namespace{ return RefType; } - - - void SMESHGUI::OnEditDelete() - { - // VSR 17/11/04: check if all objects selected belong to SMESH component --> start - LightApp_SelectionMgr* aSel = SMESHGUI::selectionMgr(); - SALOME_ListIO selected; aSel->selectedObjects( selected, QString::null, false ); - - QString aParentComponent = QString::null; - for( SALOME_ListIteratorOfListIO anIt( selected ); anIt.More(); anIt.Next() ) - { - QString cur = anIt.Value()->getComponentDataType(); - if( aParentComponent.isNull() ) - aParentComponent = cur; - else if( !aParentComponent.isEmpty() && aParentComponent!=cur ) - aParentComponent = ""; - } - - if ( aParentComponent != SMESHGUI::GetSMESHGUI()->name() ) { - SUIT_MessageBox::warn1 ( SMESHGUI::desktop(), - QObject::tr("ERR_ERROR"), - QObject::tr("NON_SMESH_OBJECTS_SELECTED").arg( SMESHGUI::GetSMESHGUI()->moduleName() ), - QObject::tr("BUT_OK") ); - return; - } - // VSR 17/11/04: check if all objects selected belong to SMESH component <-- finish - if (SUIT_MessageBox::warn2 - (SMESHGUI::desktop(), - QObject::tr("SMESH_WRN_WARNING"), - QObject::tr("SMESH_REALLY_DELETE"), - QObject::tr("SMESH_BUT_YES"), QObject::tr("SMESH_BUT_NO"), 1, 0, 0) != 1) - return; - - SalomeApp_Application* anApp = dynamic_cast( SUIT_Session::session()->activeApplication() ); - SUIT_ViewManager* vm = anApp->activeViewManager(); - int nbSf = vm->getViewsCount(); - - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); - _PTR(StudyBuilder) aStudyBuilder = aStudy->NewBuilder(); - _PTR(GenericAttribute) anAttr; - _PTR(AttributeIOR) anIOR; - - SALOME_ListIteratorOfListIO It(selected); - - aStudyBuilder->NewCommand(); // There is a transaction - for(; It.More(); It.Next()){ - Handle(SALOME_InteractiveObject) IObject = It.Value(); - if(IObject->hasEntry()){ - _PTR(SObject) SO = aStudy->FindObjectID(IObject->getEntry()); - - // disable removal of "SMESH" component object - if(SO->FindAttribute(anAttr, "AttributeIOR")){ - anIOR = anAttr; - if ( !strcmp( (char*)anIOR->Value().c_str(), engineIOR().latin1() ) ) - continue; - } - - /* Erase child graphical objects */ - _PTR(ChildIterator) it = aStudy->NewChildIterator(SO); - for(it->InitEx(true); it->More(); it->Next()){ - _PTR(SObject) CSO = it->Value(); - if(CSO->FindAttribute(anAttr, "AttributeIOR")){ - anIOR = anAttr; - - QPtrVector aViews = vm->getViews(); - for(int i = 0; i < nbSf; i++){ - SUIT_ViewWindow *sf = aViews[i]; - CORBA::String_var anEntry = CSO->GetID().c_str(); - if(SMESH_Actor* anActor = SMESH::FindActorByEntry(sf,anEntry.in())){ - SMESH::RemoveActor(sf,anActor); - } - } - } - } - - /* Erase main graphical object */ - QPtrVector aViews = vm->getViews(); - for(int i = 0; i < nbSf; i++){ - SUIT_ViewWindow *sf = aViews[i]; - if(SMESH_Actor* anActor = SMESH::FindActorByEntry(sf,IObject->getEntry())){ - SMESH::RemoveActor(sf,anActor); - } - } - - // Remove object(s) from data structures - _PTR(SObject) obj = aStudy->FindObjectID(IObject->getEntry()); - if(obj){ - SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow( SMESH::SObjectToObject( obj ) ); - SMESH::SMESH_subMesh_var aSubMesh = SMESH::SMESH_subMesh::_narrow( SMESH::SObjectToObject( obj ) ); - QString objType = CheckTypeObject(IObject); - if ( !aGroup->_is_nil() ) { // DELETE GROUP - SMESH::SMESH_Mesh_var aMesh = aGroup->GetMesh(); - aMesh->RemoveGroup( aGroup ); - } - else if ( !aSubMesh->_is_nil() ) { // DELETE SUBMESH - SMESH::SMESH_Mesh_var aMesh = aSubMesh->GetFather(); - aMesh->RemoveSubMesh( aSubMesh ); - } - else if ( objType == "Hypothesis" || objType == "Algorithm" ) {// DELETE HYPOTHESIS - SMESH::RemoveHypothesisOrAlgorithmOnMesh(IObject); - aStudyBuilder->RemoveObjectWithChildren( obj ); - } - else {// default action: remove SObject from the study - // san - it's no use opening a transaction here until UNDO/REDO is provided in SMESH - //SUIT_Operation *op = new SALOMEGUI_ImportOperation(myActiveStudy); - //op->start(); - aStudyBuilder->RemoveObjectWithChildren( obj ); - //op->finish(); - } - } - - } /* IObject->hasEntry() */ - } /* more/next */ - aStudyBuilder->CommitCommand(); - - /* Clear any previous selection */ - SALOME_ListIO l1; - aSel->setSelectedObjects( l1 ); - - SMESHGUI::GetSMESHGUI()->updateObjBrowser(); - } } extern "C" { @@ -3162,3 +3041,123 @@ LightApp_Displayer* SMESHGUI::displayer() myDisplayer = new SMESHGUI_Displayer( getApp() ); return myDisplayer; } + +void SMESHGUI::OnEditDelete() + { + // VSR 17/11/04: check if all objects selected belong to SMESH component --> start + LightApp_SelectionMgr* aSel = SMESHGUI::selectionMgr(); + SALOME_ListIO selected; aSel->selectedObjects( selected, QString::null, false ); + + QString aParentComponent = QString::null; + for( SALOME_ListIteratorOfListIO anIt( selected ); anIt.More(); anIt.Next() ) + { + QString cur = anIt.Value()->getComponentDataType(); + if( aParentComponent.isNull() ) + aParentComponent = cur; + else if( !aParentComponent.isEmpty() && aParentComponent!=cur ) + aParentComponent = ""; + } + + if ( aParentComponent != SMESHGUI::GetSMESHGUI()->name() ) { + SUIT_MessageBox::warn1 ( SMESHGUI::desktop(), + QObject::tr("ERR_ERROR"), + QObject::tr("NON_SMESH_OBJECTS_SELECTED").arg( SMESHGUI::GetSMESHGUI()->moduleName() ), + QObject::tr("BUT_OK") ); + return; + } + // VSR 17/11/04: check if all objects selected belong to SMESH component <-- finish + if (SUIT_MessageBox::warn2 + (SMESHGUI::desktop(), + QObject::tr("SMESH_WRN_WARNING"), + QObject::tr("SMESH_REALLY_DELETE"), + QObject::tr("SMESH_BUT_YES"), QObject::tr("SMESH_BUT_NO"), 1, 0, 0) != 1) + return; + + SalomeApp_Application* anApp = dynamic_cast( SUIT_Session::session()->activeApplication() ); + SUIT_ViewManager* vm = anApp->activeViewManager(); + int nbSf = vm->getViewsCount(); + + _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); + _PTR(StudyBuilder) aStudyBuilder = aStudy->NewBuilder(); + _PTR(GenericAttribute) anAttr; + _PTR(AttributeIOR) anIOR; + + SALOME_ListIteratorOfListIO It(selected); + + aStudyBuilder->NewCommand(); // There is a transaction + for(; It.More(); It.Next()){ + Handle(SALOME_InteractiveObject) IObject = It.Value(); + if(IObject->hasEntry()){ + _PTR(SObject) SO = aStudy->FindObjectID(IObject->getEntry()); + + // disable removal of "SMESH" component object + if(SO->FindAttribute(anAttr, "AttributeIOR")){ + anIOR = anAttr; + if ( !strcmp( (char*)anIOR->Value().c_str(), engineIOR().latin1() ) ) + continue; + } + + /* Erase child graphical objects */ + _PTR(ChildIterator) it = aStudy->NewChildIterator(SO); + for(it->InitEx(true); it->More(); it->Next()){ + _PTR(SObject) CSO = it->Value(); + if(CSO->FindAttribute(anAttr, "AttributeIOR")){ + anIOR = anAttr; + + QPtrVector aViews = vm->getViews(); + for(int i = 0; i < nbSf; i++){ + SUIT_ViewWindow *sf = aViews[i]; + CORBA::String_var anEntry = CSO->GetID().c_str(); + if(SMESH_Actor* anActor = SMESH::FindActorByEntry(sf,anEntry.in())){ + SMESH::RemoveActor(sf,anActor); + } + } + } + } + + /* Erase main graphical object */ + QPtrVector aViews = vm->getViews(); + for(int i = 0; i < nbSf; i++){ + SUIT_ViewWindow *sf = aViews[i]; + if(SMESH_Actor* anActor = SMESH::FindActorByEntry(sf,IObject->getEntry())){ + SMESH::RemoveActor(sf,anActor); + } + } + + // Remove object(s) from data structures + _PTR(SObject) obj = aStudy->FindObjectID(IObject->getEntry()); + if(obj){ + SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow( SMESH::SObjectToObject( obj ) ); + SMESH::SMESH_subMesh_var aSubMesh = SMESH::SMESH_subMesh::_narrow( SMESH::SObjectToObject( obj ) ); + QString objType = CheckTypeObject(IObject); + if ( !aGroup->_is_nil() ) { // DELETE GROUP + SMESH::SMESH_Mesh_var aMesh = aGroup->GetMesh(); + aMesh->RemoveGroup( aGroup ); + } + else if ( !aSubMesh->_is_nil() ) { // DELETE SUBMESH + SMESH::SMESH_Mesh_var aMesh = aSubMesh->GetFather(); + aMesh->RemoveSubMesh( aSubMesh ); + } + else if ( objType == "Hypothesis" || objType == "Algorithm" ) {// DELETE HYPOTHESIS + SMESH::RemoveHypothesisOrAlgorithmOnMesh(IObject); + aStudyBuilder->RemoveObjectWithChildren( obj ); + } + else {// default action: remove SObject from the study + // san - it's no use opening a transaction here until UNDO/REDO is provided in SMESH + //SUIT_Operation *op = new SALOMEGUI_ImportOperation(myActiveStudy); + //op->start(); + aStudyBuilder->RemoveObjectWithChildren( obj ); + //op->finish(); + } + } + + } /* IObject->hasEntry() */ + } /* more/next */ + aStudyBuilder->CommitCommand(); + + /* Clear any previous selection */ + SALOME_ListIO l1; + aSel->setSelectedObjects( l1 ); + + SMESHGUI::GetSMESHGUI()->updateObjBrowser(); + } \ No newline at end of file diff --git a/src/SMESHGUI/SMESHGUI.h b/src/SMESHGUI/SMESHGUI.h index 9626e4358..7b062275b 100644 --- a/src/SMESHGUI/SMESHGUI.h +++ b/src/SMESHGUI/SMESHGUI.h @@ -29,6 +29,8 @@ #ifndef SMESHGUI_HeaderFile #define SMESHGUI_HeaderFile +#include "SMESH_SMESHGUI.hxx" + // SALOME Includes #include #include @@ -53,7 +55,7 @@ class LightApp_SelectionMgr; // class : SMESHGUI // purpose : //================================================================================= -class SMESHGUI : public SalomeApp_Module +class SMESHGUI_EXPORT SMESHGUI : public SalomeApp_Module { Q_OBJECT; diff --git a/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.h b/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.h index 33f8a3d3a..9b9e71f8f 100644 --- a/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.h +++ b/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.h @@ -29,6 +29,8 @@ #ifndef DIALOGBOX_ADD_FACE_H #define DIALOGBOX_ADD_FACE_H +#include "SMESH_SMESHGUI.hxx" + #include "LightApp_SelectionMgr.h" #include "SMDSAbs_ElementType.hxx" @@ -66,7 +68,7 @@ namespace SMESH{ // class : SMESHGUI_AddMeshElementDlg // purpose : //================================================================================= -class SMESHGUI_AddMeshElementDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_AddMeshElementDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_ClippingDlg.h b/src/SMESHGUI/SMESHGUI_ClippingDlg.h index bc4bab595..463257cc9 100644 --- a/src/SMESHGUI/SMESHGUI_ClippingDlg.h +++ b/src/SMESHGUI/SMESHGUI_ClippingDlg.h @@ -29,6 +29,8 @@ #ifndef DIALOGBOX_CLIPPING_H #define DIALOGBOX_CLIPPING_H +#include "SMESH_SMESHGUI.hxx" + #include #include @@ -68,7 +70,7 @@ namespace SMESH { // class : SMESHGUI_ClippingDlg // purpose : //================================================================================= -class SMESHGUI_ClippingDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_ClippingDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_CreateHypothesesDlg.h b/src/SMESHGUI/SMESHGUI_CreateHypothesesDlg.h index e2bb65a67..3219dd56c 100644 --- a/src/SMESHGUI/SMESHGUI_CreateHypothesesDlg.h +++ b/src/SMESHGUI/SMESHGUI_CreateHypothesesDlg.h @@ -28,6 +28,8 @@ #ifndef DIALOGBOX_CREATE_HYPOTHESES_H #define DIALOGBOX_CREATE_HYPOTHESES_H +#include "SMESH_SMESHGUI.hxx" + // QT Includes #include #include @@ -52,7 +54,7 @@ class SMESHGUI; // class : SMESHGUI_CreateHypothesesDlg // purpose : //================================================================================= -class SMESHGUI_CreateHypothesesDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_CreateHypothesesDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_CreatePatternDlg.h b/src/SMESHGUI/SMESHGUI_CreatePatternDlg.h index 84a0cbd34..cc16c162b 100755 --- a/src/SMESHGUI/SMESHGUI_CreatePatternDlg.h +++ b/src/SMESHGUI/SMESHGUI_CreatePatternDlg.h @@ -27,6 +27,8 @@ #ifndef SMESHGUI_CreatePatternDlg_H #define SMESHGUI_CreatePatternDlg_H +#include "SMESH_SMESHGUI.hxx" + #include // IDL Headers @@ -57,7 +59,7 @@ class SMESHGUI; * Description : Dialog to specify filters for VTK viewer */ -class SMESHGUI_CreatePatternDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_CreatePatternDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.h b/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.h index 5070b4471..b495c3290 100644 --- a/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.h +++ b/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.h @@ -29,6 +29,8 @@ #ifndef DIALOGBOX_CREATEPOLYHEDRAL_H #define DIALOGBOX_CREATEPOLYHEDRAL_H +#include "SMESH_SMESHGUI.hxx" + // QT Includes #include @@ -59,7 +61,7 @@ namespace SMESH{ // class : SMESHGUI_CreatePolyhedralVolumeDlg // purpose : //================================================================================= -class SMESHGUI_CreatePolyhedralVolumeDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_CreatePolyhedralVolumeDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.h b/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.h index f944b3020..e0b6738aa 100644 --- a/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.h +++ b/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.h @@ -27,6 +27,8 @@ #ifndef SMESHGUI_DELETEGROUPDLG_H #define SMESHGUI_DELETEGROUPDLG_H +#include "SMESH_SMESHGUI.hxx" + #include #include @@ -47,7 +49,7 @@ class LightApp_SelectionMgr; * Description : Delete groups and their contents */ -class SMESHGUI_DeleteGroupDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_DeleteGroupDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_Dialog.h b/src/SMESHGUI/SMESHGUI_Dialog.h index 73c92abe2..1a04adbd0 100644 --- a/src/SMESHGUI/SMESHGUI_Dialog.h +++ b/src/SMESHGUI/SMESHGUI_Dialog.h @@ -30,6 +30,8 @@ #ifndef SMESHGUI_DIALOG_H #define SMESHGUI_DIALOG_H +#include "SMESH_SMESHGUI.hxx" + #include class SUIT_Desktop; @@ -39,7 +41,7 @@ class SUIT_ResourceMgr; // class : SMESHGUI_Dialog // purpose : Base dialog for all SMESHGUI dialogs //================================================================================= -class SMESHGUI_Dialog : public LightApp_Dialog +class SMESHGUI_EXPORT SMESHGUI_Dialog : public LightApp_Dialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_Displayer.h b/src/SMESHGUI/SMESHGUI_Displayer.h index 8b030526e..4c1aa5d79 100644 --- a/src/SMESHGUI/SMESHGUI_Displayer.h +++ b/src/SMESHGUI/SMESHGUI_Displayer.h @@ -29,12 +29,14 @@ #ifndef SMESHGUI_DISPLAYER_HEADER #define SMESHGUI_DISPLAYER_HEADER +#include "SMESH_SMESHGUI.hxx" + #include class SalomeApp_Application; class SalomeApp_Study; -class SMESHGUI_Displayer : public LightApp_Displayer +class SMESHGUI_EXPORT SMESHGUI_Displayer : public LightApp_Displayer { public: SMESHGUI_Displayer( SalomeApp_Application* ); diff --git a/src/SMESHGUI/SMESHGUI_EditHypothesesDlg.h b/src/SMESHGUI/SMESHGUI_EditHypothesesDlg.h index 6fe085dc6..7385dcb9f 100644 --- a/src/SMESHGUI/SMESHGUI_EditHypothesesDlg.h +++ b/src/SMESHGUI/SMESHGUI_EditHypothesesDlg.h @@ -29,6 +29,8 @@ #ifndef DIALOGBOX_EDIT_HYPOTHESES_H #define DIALOGBOX_EDIT_HYPOTHESES_H +#include "SMESH_SMESHGUI.hxx" + //#include "SMESH_TypeFilter.hxx" #include "SUIT_SelectionFilter.h" #include "LightApp_SelectionMgr.h" @@ -58,7 +60,7 @@ typedef map MapIOR; // class : SMESHGUI_EditHypothesesDlg // purpose : //================================================================================= -class SMESHGUI_EditHypothesesDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_EditHypothesesDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_EditMeshDlg.h b/src/SMESHGUI/SMESHGUI_EditMeshDlg.h index 839b3fd7c..eeddcfd82 100644 --- a/src/SMESHGUI/SMESHGUI_EditMeshDlg.h +++ b/src/SMESHGUI/SMESHGUI_EditMeshDlg.h @@ -21,6 +21,8 @@ #ifndef DIALOGBOX_GETMESH_H #define DIALOGBOX_GETMESH_H +#include "SMESH_SMESHGUI.hxx" + #include "LightApp_SelectionMgr.h" #include "SUIT_SelectionFilter.h" @@ -46,7 +48,7 @@ class SMESHGUI; // class : SMESHGUI_EditMeshDlg // purpose : //================================================================================= -class SMESHGUI_EditMeshDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_EditMeshDlg : public QDialog { Q_OBJECT; diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.h b/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.h index 57f7be3b7..7b1e34961 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.h +++ b/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.h @@ -29,6 +29,8 @@ #ifndef DIALOGBOX_EXTRUSION_PATH_H #define DIALOGBOX_EXTRUSION_PATH_H +#include "SMESH_SMESHGUI.hxx" + #include "LightApp_SelectionMgr.h" #include "SUIT_SelectionFilter.h" @@ -60,7 +62,7 @@ class SVTK_Selector; // class : SMESHGUI_ExtrusionAlongPathDlg // purpose : //================================================================================= -class SMESHGUI_ExtrusionAlongPathDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_ExtrusionAlongPathDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.h b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.h index 935a2716c..9b8a3705e 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.h +++ b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.h @@ -29,6 +29,8 @@ #ifndef DIALOGBOX_EXTRUSION_H #define DIALOGBOX_EXTRUSION_H +#include "SMESH_SMESHGUI.hxx" + #include "LightApp_SelectionMgr.h" #include "SUIT_SelectionFilter.h" @@ -59,7 +61,7 @@ class SVTK_Selector; // class : SMESHGUI_ExtrusionDlg // purpose : //================================================================================= -class SMESHGUI_ExtrusionDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_ExtrusionDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_Filter.h b/src/SMESHGUI/SMESHGUI_Filter.h index 0114f38b8..466b30cc5 100755 --- a/src/SMESHGUI/SMESHGUI_Filter.h +++ b/src/SMESHGUI/SMESHGUI_Filter.h @@ -28,6 +28,8 @@ #ifndef SMESHGUI_Filter_HeaderFile #define SMESHGUI_Filter_HeaderFile +#include "SMESH_SMESHGUI.hxx" + #include "VTKViewer_Filter.h" #include diff --git a/src/SMESHGUI/SMESHGUI_FilterDlg.cxx b/src/SMESHGUI/SMESHGUI_FilterDlg.cxx index cd3d8eb65..6c01f45a2 100755 --- a/src/SMESHGUI/SMESHGUI_FilterDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_FilterDlg.cxx @@ -958,7 +958,7 @@ void SMESHGUI_FilterTable::onRemoveBtn() if (aTable->isRowSelected(i)) { aRows.resize(aRows.size() + 1); - aRows[ aRows.size() - 1 ] = i; + aRows[ (int)(aRows.size() - 1) ] = i; removeAdditionalWidget(aTable, i); } } diff --git a/src/SMESHGUI/SMESHGUI_FilterDlg.h b/src/SMESHGUI/SMESHGUI_FilterDlg.h index d74fc689c..bdfbd8047 100755 --- a/src/SMESHGUI/SMESHGUI_FilterDlg.h +++ b/src/SMESHGUI/SMESHGUI_FilterDlg.h @@ -29,6 +29,8 @@ #ifndef SMESHGUI_FilterDlg_H #define SMESHGUI_FilterDlg_H +#include "SMESH_SMESHGUI.hxx" + #include #include #include @@ -70,7 +72,7 @@ class SVTK_ViewWindow; * - Buttons for editing table */ -class SMESHGUI_FilterTable : public QFrame +class SMESHGUI_EXPORT SMESHGUI_FilterTable : public QFrame { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.h b/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.h index 8fbc6f998..867801101 100644 --- a/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.h +++ b/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.h @@ -29,6 +29,8 @@ #ifndef SMESHGUI_FilterLibraryDlg_H #define SMESHGUI_FilterLibraryDlg_H +#include "SMESH_SMESHGUI.hxx" + #include #include @@ -48,7 +50,7 @@ class QGroupBox; Description : Dialog to specify filters for VTK viewer */ -class SMESHGUI_FilterLibraryDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_FilterLibraryDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_FilterUtils.h b/src/SMESHGUI/SMESHGUI_FilterUtils.h index 6b8c75862..501bad2d9 100644 --- a/src/SMESHGUI/SMESHGUI_FilterUtils.h +++ b/src/SMESHGUI/SMESHGUI_FilterUtils.h @@ -20,13 +20,15 @@ #ifndef SMESHGUI_FilterUtils_HeaderFile #define SMESHGUI_FilterUtils_HeaderFile +#include "SMESH_SMESHGUI.hxx" + #include "SALOMEconfig.h" #include CORBA_SERVER_HEADER(SMESH_Filter) namespace SMESH{ - SMESH::FilterManager_var& GetFilterManager(); + SMESHGUI_EXPORT SMESH::FilterManager_var& GetFilterManager(); } diff --git a/src/SMESHGUI/SMESHGUI_GEOMGenUtils.h b/src/SMESHGUI/SMESHGUI_GEOMGenUtils.h index 6f2ccb9b3..ecdbc4bf8 100644 --- a/src/SMESHGUI/SMESHGUI_GEOMGenUtils.h +++ b/src/SMESHGUI/SMESHGUI_GEOMGenUtils.h @@ -20,6 +20,8 @@ #ifndef SMESHGUI_GEOMGenUtils_HeaderFile #define SMESHGUI_GEOMGenUtils_HeaderFile +#include "SMESH_SMESHGUI.hxx" + #include "SALOMEconfig.h" #include CORBA_SERVER_HEADER(GEOM_Gen) @@ -29,11 +31,11 @@ class SALOMEDSClient_SObject; namespace SMESH { - GEOM::GEOM_Gen_var GetGEOMGen(); + SMESHGUI_EXPORT GEOM::GEOM_Gen_var GetGEOMGen(); - GEOM::GEOM_Object_var GetShapeOnMeshOrSubMesh (_PTR(SObject) theSObject); + SMESHGUI_EXPORT GEOM::GEOM_Object_var GetShapeOnMeshOrSubMesh (_PTR(SObject) theSObject); - GEOM::GEOM_Object_ptr GetGeom (_PTR(SObject) theSO); + SMESHGUI_EXPORT GEOM::GEOM_Object_ptr GetGeom (_PTR(SObject) theSO); } #endif diff --git a/src/SMESHGUI/SMESHGUI_GroupDlg.h b/src/SMESHGUI/SMESHGUI_GroupDlg.h index af101fcff..66c6c31ad 100644 --- a/src/SMESHGUI/SMESHGUI_GroupDlg.h +++ b/src/SMESHGUI/SMESHGUI_GroupDlg.h @@ -28,6 +28,8 @@ #ifndef DIALOGBOX_GROUP_H #define DIALOGBOX_GROUP_H +#include "SMESH_SMESHGUI.hxx" + #include "LightApp_SelectionMgr.h" //#include "SMESH_TypeFilter.hxx" #include "SUIT_SelectionFilter.h" @@ -58,7 +60,7 @@ class SVTK_ViewWindow; // class : SMESHGUI_GroupDlg // purpose : //================================================================================= -class SMESHGUI_GroupDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_GroupDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_GroupOpDlg.h b/src/SMESHGUI/SMESHGUI_GroupOpDlg.h index 7a62a35b3..256cdfb91 100644 --- a/src/SMESHGUI/SMESHGUI_GroupOpDlg.h +++ b/src/SMESHGUI/SMESHGUI_GroupOpDlg.h @@ -27,6 +27,8 @@ #ifndef SMESHGUI_GroupOpDlg_H #define SMESHGUI_GroupOpDlg_H +#include "SMESH_SMESHGUI.hxx" + #include #include @@ -47,7 +49,7 @@ class SVTK_Selector; Description : Perform boolean operations on groups */ -class SMESHGUI_GroupOpDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_GroupOpDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_GroupUtils.h b/src/SMESHGUI/SMESHGUI_GroupUtils.h index 9cd9783c1..554bac9cd 100644 --- a/src/SMESHGUI/SMESHGUI_GroupUtils.h +++ b/src/SMESHGUI/SMESHGUI_GroupUtils.h @@ -20,6 +20,8 @@ #ifndef SMESHGUI_GroupUtils_HeaderFile #define SMESHGUI_GroupUtils_HeaderFile +#include "SMESH_SMESHGUI.hxx" + #include "SALOMEconfig.h" #include CORBA_SERVER_HEADER(SMESH_Mesh) #include CORBA_SERVER_HEADER(SMESH_Group) @@ -27,6 +29,7 @@ namespace SMESH{ +SMESHGUI_EXPORT SMESH::SMESH_Group_var AddGroup(SMESH::SMESH_Mesh_ptr theMesh, SMESH::ElementType theType, const char* theGroupName); diff --git a/src/SMESHGUI/SMESHGUI_Hypotheses.h b/src/SMESHGUI/SMESHGUI_Hypotheses.h index d47422a4a..80caf54e5 100644 --- a/src/SMESHGUI/SMESHGUI_Hypotheses.h +++ b/src/SMESHGUI/SMESHGUI_Hypotheses.h @@ -28,6 +28,8 @@ #ifndef SMESHGUI_Hypotheses_HeaderFile #define SMESHGUI_Hypotheses_HeaderFile +#include "SMESH_SMESHGUI.hxx" + #include #include CORBA_SERVER_HEADER(SMESH_Hypothesis) @@ -40,7 +42,7 @@ class QPixmap; /*! * \brief Auxiliary class for creation of hypotheses */ -class SMESHGUI_GenericHypothesisCreator : public QObject +class SMESHGUI_EXPORT SMESHGUI_GenericHypothesisCreator : public QObject { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx index 98d84f8a9..c0a6460d1 100644 --- a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx @@ -47,7 +47,23 @@ #include #include -#include +#ifdef WNT + #include +#else + #include +#endif + +#ifdef WNT + #define LibHandle HMODULE + #define LoadLib( name ) LoadLibrary( name ) + #define GetProc GetProcAddress + #define UnLoadLib( handle ) FreeLibrary( handle ); +#else + #define LibHandle void* + #define LoadLib( name ) dlopen( name, RTLD_LAZY ) + #define GetProc dlsym + #define UnLoadLib( handle ) dlclose( handle ); +#endif #ifdef _DEBUG_ static int MYDEBUG = 0; @@ -287,11 +303,18 @@ namespace SMESH{ try { // load plugin library if(MYDEBUG) MESSAGE("Loading client meshers plugin library ..."); - void* libHandle = dlopen (aClientLibName, RTLD_LAZY); + LibHandle libHandle = LoadLib( aClientLibName ); if (!libHandle) { // report any error, if occured - const char* anError = dlerror(); - if(MYDEBUG) MESSAGE(anError); + if ( MYDEBUG ) + { +#ifdef WIN32 + const char* anError = "Can't load client meshers plugin library"; +#else + const char* anError = dlerror(); +#endif + MESSAGE(anError); + } } else { // get method, returning hypothesis creator @@ -299,10 +322,10 @@ namespace SMESH{ typedef SMESHGUI_GenericHypothesisCreator* (*GetHypothesisCreator) \ ( const QString& ); GetHypothesisCreator procHandle = - (GetHypothesisCreator)dlsym(libHandle, "GetHypothesisCreator"); + (GetHypothesisCreator)GetProc(libHandle, "GetHypothesisCreator"); if (!procHandle) { if(MYDEBUG) MESSAGE("bad hypothesis client plugin library"); - dlclose(libHandle); + UnLoadLib(libHandle); } else { // get hypothesis creator diff --git a/src/SMESHGUI/SMESHGUI_HypothesesUtils.h b/src/SMESHGUI/SMESHGUI_HypothesesUtils.h index 2fb920af9..d710a91e6 100644 --- a/src/SMESHGUI/SMESHGUI_HypothesesUtils.h +++ b/src/SMESHGUI/SMESHGUI_HypothesesUtils.h @@ -28,6 +28,8 @@ #ifndef SMESHGUI_HypothesesUtils_HeaderFile #define SMESHGUI_HypothesesUtils_HeaderFile +#include "SMESH_SMESHGUI.hxx" + #include #include @@ -49,36 +51,46 @@ class algo_error_array; namespace SMESH{ - void InitAvailableHypotheses(); + SMESHGUI_EXPORT void InitAvailableHypotheses(); + SMESHGUI_EXPORT QStringList GetAvailableHypotheses( const bool isAlgo, const int theDim = -1, const bool isAux = false); - + SMESHGUI_EXPORT QStringList GetHypothesesSets(); + SMESHGUI_EXPORT HypothesesSet* GetHypothesesSet(const QString theSetName); + SMESHGUI_EXPORT HypothesisData* GetHypothesisData(const char* aHypType); + SMESHGUI_EXPORT SMESHGUI_GenericHypothesisCreator* GetHypothesisCreator(const char* aHypType); + SMESHGUI_EXPORT SMESH::SMESH_Hypothesis_ptr CreateHypothesis(const char* aHypType, const char* aHypName, const bool isAlgo = false); + SMESHGUI_EXPORT bool AddHypothesisOnMesh(SMESH::SMESH_Mesh_ptr aMesh, SMESH::SMESH_Hypothesis_ptr aHyp); + SMESHGUI_EXPORT bool AddHypothesisOnSubMesh(SMESH::SMESH_subMesh_ptr aSubMesh, SMESH::SMESH_Hypothesis_ptr aHyp); + SMESHGUI_EXPORT bool RemoveHypothesisOrAlgorithmOnMesh(const Handle(SALOME_InteractiveObject)& IObject); + SMESHGUI_EXPORT bool RemoveHypothesisOrAlgorithmOnMesh(_PTR(SObject) MorSM, SMESH::SMESH_Hypothesis_ptr anHyp); typedef std::vector<_PTR(SObject)> SObjectList; SObjectList GetMeshesUsingAlgoOrHypothesis(SMESH::SMESH_Hypothesis_ptr AlgoOrHyp ) ; + SMESHGUI_EXPORT QString GetMessageOnAlgoStateErrors(const algo_error_array& errors); } diff --git a/src/SMESHGUI/SMESHGUI_IdValidator.h b/src/SMESHGUI/SMESHGUI_IdValidator.h index 680dacba8..35e64f59f 100644 --- a/src/SMESHGUI/SMESHGUI_IdValidator.h +++ b/src/SMESHGUI/SMESHGUI_IdValidator.h @@ -28,11 +28,13 @@ #ifndef SMESHGUI_IdValidator_HeaderFile #define SMESHGUI_IdValidator_HeaderFile +#include "SMESH_SMESHGUI.hxx" + #include // validator for manual input of Ids -class SMESHGUI_IdValidator: public QValidator +class SMESHGUI_EXPORT SMESHGUI_IdValidator: public QValidator { public: diff --git a/src/SMESHGUI/SMESHGUI_MergeNodesDlg.h b/src/SMESHGUI/SMESHGUI_MergeNodesDlg.h index 457259574..eb4767619 100644 --- a/src/SMESHGUI/SMESHGUI_MergeNodesDlg.h +++ b/src/SMESHGUI/SMESHGUI_MergeNodesDlg.h @@ -29,6 +29,8 @@ #ifndef DIALOGBOX_MERGENODES_H #define DIALOGBOX_MERGENODES_H +#include "SMESH_SMESHGUI.hxx" + #include "LightApp_SelectionMgr.h" //#include "SMESH_TypeFilter.hxx" #include "SUIT_SelectionFilter.h" @@ -63,7 +65,7 @@ class SVTK_Selector; // class : SMESHGUI_MergeNodesDlg // purpose : //================================================================================= -class SMESHGUI_MergeNodesDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_MergeNodesDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_MeshDlg.h b/src/SMESHGUI/SMESHGUI_MeshDlg.h index f12773bd1..3c3624b25 100644 --- a/src/SMESHGUI/SMESHGUI_MeshDlg.h +++ b/src/SMESHGUI/SMESHGUI_MeshDlg.h @@ -33,6 +33,8 @@ #ifndef SMESHGUI_MeshDlg_H #define SMESHGUI_MeshDlg_H +#include "SMESH_SMESHGUI.hxx" + #include "SMESHGUI_Dialog.h" #include #include @@ -51,7 +53,7 @@ class QPopupMenu; * * This dialog is used for mech creation or editing. */ -class SMESHGUI_MeshDlg : public SMESHGUI_Dialog +class SMESHGUI_EXPORT SMESHGUI_MeshDlg : public SMESHGUI_Dialog { Q_OBJECT @@ -98,7 +100,7 @@ private: * algorithms and hypotheses */ -class SMESHGUI_MeshTab : public QFrame +class SMESHGUI_EXPORT SMESHGUI_MeshTab : public QFrame { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_MeshInfosDlg.h b/src/SMESHGUI/SMESHGUI_MeshInfosDlg.h index 4ff11f1d9..e8e4bd9ed 100644 --- a/src/SMESHGUI/SMESHGUI_MeshInfosDlg.h +++ b/src/SMESHGUI/SMESHGUI_MeshInfosDlg.h @@ -29,6 +29,8 @@ #ifndef SMESHGUI_MESHINFOSDLG_H #define SMESHGUI_MESHINFOSDLG_H +#include "SMESH_SMESHGUI.hxx" + // QT Includes #include @@ -40,7 +42,7 @@ class QWidgetStack; class LightApp_SelectionMgr; class SMESHGUI; -class SMESHGUI_MeshInfosDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_MeshInfosDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_MeshOp.h b/src/SMESHGUI/SMESHGUI_MeshOp.h index 677731a3b..865a2fc53 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOp.h +++ b/src/SMESHGUI/SMESHGUI_MeshOp.h @@ -32,6 +32,8 @@ #ifndef SMESHGUI_MeshOp_H #define SMESHGUI_MeshOp_H +#include "SMESH_SMESHGUI.hxx" + #include "SMESHGUI_SelectionOp.h" #include @@ -47,7 +49,7 @@ class SMESHGUI_ShapeByMeshDlg; * * This operation is used for mech creation or editing. */ -class SMESHGUI_MeshOp : public SMESHGUI_SelectionOp +class SMESHGUI_EXPORT SMESHGUI_MeshOp : public SMESHGUI_SelectionOp { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.h b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.h index 106dc8b27..bdaa10d08 100755 --- a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.h +++ b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.h @@ -27,6 +27,8 @@ #ifndef SMESHGUI_MeshPatternDlg_H #define SMESHGUI_MeshPatternDlg_H +#include "SMESH_SMESHGUI.hxx" + #include // IDL Headers @@ -60,7 +62,7 @@ class SMESHGUI; Description : Dialog to specify filters for VTK viewer */ -class SMESHGUI_MeshPatternDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_MeshPatternDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_MeshUtils.h b/src/SMESHGUI/SMESHGUI_MeshUtils.h index 011de3404..e943ac1e0 100644 --- a/src/SMESHGUI/SMESHGUI_MeshUtils.h +++ b/src/SMESHGUI/SMESHGUI_MeshUtils.h @@ -20,6 +20,8 @@ #ifndef SMESHGUI_MeshUtils_HeaderFile #define SMESHGUI_MeshUtils_HeaderFile +#include "SMESH_SMESHGUI.hxx" + #include "SALOME_InteractiveObject.hxx" #include "SALOMEconfig.h" @@ -28,6 +30,7 @@ namespace SMESH{ +SMESHGUI_EXPORT SMESH_Mesh_var GetMeshByIO(const Handle(SALOME_InteractiveObject)& theIO); } diff --git a/src/SMESHGUI/SMESHGUI_MoveNodesDlg.h b/src/SMESHGUI/SMESHGUI_MoveNodesDlg.h index d115e52ff..976aa6d05 100644 --- a/src/SMESHGUI/SMESHGUI_MoveNodesDlg.h +++ b/src/SMESHGUI/SMESHGUI_MoveNodesDlg.h @@ -29,6 +29,8 @@ #ifndef DIALOGBOX_MOVE_NODES_H #define DIALOGBOX_MOVE_NODES_H +#include "SMESH_SMESHGUI.hxx" + #include "LightApp_SelectionMgr.h" #include @@ -49,7 +51,7 @@ class SVTK_ViewWindow; // class : SMESHGUI_MoveNodesDlg // purpose : //================================================================================= -class SMESHGUI_MoveNodesDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_MoveNodesDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_MultiEditDlg.h b/src/SMESHGUI/SMESHGUI_MultiEditDlg.h index 5e6c66326..81c31d632 100755 --- a/src/SMESHGUI/SMESHGUI_MultiEditDlg.h +++ b/src/SMESHGUI/SMESHGUI_MultiEditDlg.h @@ -27,6 +27,8 @@ #ifndef SMESHGUI_MultiEditDlg_H #define SMESHGUI_MultiEditDlg_H +#include "SMESH_SMESHGUI.hxx" + #include #include "SUIT_SelectionFilter.h" @@ -64,7 +66,7 @@ class QButtonGroup; * union of two neighboring triangles */ -class SMESHGUI_MultiEditDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_MultiEditDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx index 0e29413e7..4018e63fc 100644 --- a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx @@ -152,7 +152,7 @@ namespace SMESH { aCellLocationsArray->SetNumberOfTuples(1); aCells->InitTraversal(); - vtkIdType npts; + vtkIdType npts = 0; aCellLocationsArray->SetValue(0, aCells->GetTraversalLocation(npts)); aGrid->SetCells(aCellTypesArray, aCellLocationsArray, aCells); diff --git a/src/SMESHGUI/SMESHGUI_NodesDlg.h b/src/SMESHGUI/SMESHGUI_NodesDlg.h index 4ec0005a0..a3339ce8c 100644 --- a/src/SMESHGUI/SMESHGUI_NodesDlg.h +++ b/src/SMESHGUI/SMESHGUI_NodesDlg.h @@ -29,6 +29,8 @@ #ifndef DIALOGBOX_NODES_H #define DIALOGBOX_NODES_H +#include "SMESH_SMESHGUI.hxx" + #include #include @@ -61,7 +63,7 @@ namespace SMESH{ // class : SMESHGUI_NodesDlg // purpose : //================================================================================= -class SMESHGUI_NodesDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_NodesDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_Operation.h b/src/SMESHGUI/SMESHGUI_Operation.h index 181cb2cc7..cf8ce7f0e 100755 --- a/src/SMESHGUI/SMESHGUI_Operation.h +++ b/src/SMESHGUI/SMESHGUI_Operation.h @@ -12,6 +12,8 @@ #ifndef SMESHGUI_Operation_H #define SMESHGUI_Operation_H +#include "SMESH_SMESHGUI.hxx" + #include #include @@ -22,7 +24,7 @@ class SMESHGUI; Description : Base class for all SMESH operations */ -class SMESHGUI_Operation : public LightApp_Operation +class SMESHGUI_EXPORT SMESHGUI_Operation : public LightApp_Operation { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_PatternUtils.h b/src/SMESHGUI/SMESHGUI_PatternUtils.h index fb09d01d9..f3bc58c09 100644 --- a/src/SMESHGUI/SMESHGUI_PatternUtils.h +++ b/src/SMESHGUI/SMESHGUI_PatternUtils.h @@ -20,12 +20,15 @@ #ifndef SMESHGUI_PatternUtils_HeaderFile #define SMESHGUI_PatternUtils_HeaderFile +#include "SMESH_SMESHGUI.hxx" + #include "SALOMEconfig.h" #include CORBA_SERVER_HEADER(SMESH_Pattern) namespace SMESH{ +SMESHGUI_EXPORT SMESH::SMESH_Pattern_var GetPattern(); } diff --git a/src/SMESHGUI/SMESHGUI_PatternWidget.h b/src/SMESHGUI/SMESHGUI_PatternWidget.h index ddab7433b..2319d2f18 100644 --- a/src/SMESHGUI/SMESHGUI_PatternWidget.h +++ b/src/SMESHGUI/SMESHGUI_PatternWidget.h @@ -29,6 +29,8 @@ #ifndef WIDGET_PATTERN_H #define WIDGET_PATTERN_H +#include "SMESH_SMESHGUI.hxx" + #include #include @@ -45,7 +47,7 @@ class QPoint; // class : SMESHGUI_PatternWidget // purpose : //================================================================================= -class SMESHGUI_PatternWidget : public QFrame +class SMESHGUI_EXPORT SMESHGUI_PatternWidget : public QFrame { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_PrecisionDlg.h b/src/SMESHGUI/SMESHGUI_PrecisionDlg.h index 976db3091..e033ec438 100755 --- a/src/SMESHGUI/SMESHGUI_PrecisionDlg.h +++ b/src/SMESHGUI/SMESHGUI_PrecisionDlg.h @@ -29,6 +29,8 @@ #ifndef SMESHGUI_PrecisionDlg_H #define SMESHGUI_PrecisionDlg_H +#include "SMESH_SMESHGUI.hxx" + #include class QSpinBox; @@ -42,7 +44,7 @@ class SMESHGUI; Description : Dialog to specify precision of mesh quality controls */ -class SMESHGUI_PrecisionDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_PrecisionDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_Preferences_ColorDlg.h b/src/SMESHGUI/SMESHGUI_Preferences_ColorDlg.h index 43702b2ac..51d5c759b 100644 --- a/src/SMESHGUI/SMESHGUI_Preferences_ColorDlg.h +++ b/src/SMESHGUI/SMESHGUI_Preferences_ColorDlg.h @@ -29,6 +29,8 @@ #ifndef SMESHGUI_PREFERENCES_COLORDLG_H #define SMESHGUI_PREFERENCES_COLORDLG_H +#include "SMESH_SMESHGUI.hxx" + // SALOME Includes //#include "SUIT_Config.h" //#include "SUIT_Settings.h" @@ -48,7 +50,7 @@ class QSpinBox; class QColor; class SMESHGUI; -class SMESHGUI_Preferences_ColorDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_Preferences_ColorDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.h b/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.h index 5d4dce8a9..e20dd2be7 100644 --- a/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.h +++ b/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.h @@ -29,6 +29,8 @@ #ifndef SMESHGUI_PREFERENCES_SCALARBARDLG_H #define SMESHGUI_PREFERENCES_SCALARBARDLG_H +#include "SMESH_SMESHGUI.hxx" + #include class QButtonGroup; @@ -49,7 +51,7 @@ class LightApp_SelectionMgr; class SMESH_Actor; -class SMESHGUI_Preferences_ScalarBarDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_Preferences_ScalarBarDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_Preferences_SelectionDlg.h b/src/SMESHGUI/SMESHGUI_Preferences_SelectionDlg.h index 07b7a644a..b1556d114 100644 --- a/src/SMESHGUI/SMESHGUI_Preferences_SelectionDlg.h +++ b/src/SMESHGUI/SMESHGUI_Preferences_SelectionDlg.h @@ -29,6 +29,8 @@ #ifndef SMESHGUI_PREFERENCES_SELECTIONDLG_H #define SMESHGUI_PREFERENCES_SELECTIONDLG_H +#include "SMESH_SMESHGUI.hxx" + // QT Includes #include @@ -40,7 +42,7 @@ class QSpinBox; class QColor; class SMESHGUI; -class SMESHGUI_LineEdit : public QLineEdit +class SMESHGUI_EXPORT SMESHGUI_LineEdit : public QLineEdit { Q_OBJECT @@ -54,7 +56,7 @@ class SMESHGUI_LineEdit : public QLineEdit void focusOutEvent(QFocusEvent* e); }; -class SMESHGUI_DoubleValidator : public QDoubleValidator +class SMESHGUI_EXPORT SMESHGUI_DoubleValidator : public QDoubleValidator { Q_OBJECT @@ -68,7 +70,7 @@ class SMESHGUI_DoubleValidator : public QDoubleValidator void fixup(QString& text) const; }; -class SMESHGUI_Preferences_SelectionDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_Preferences_SelectionDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.h b/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.h index 8300d124c..89d42292a 100644 --- a/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.h +++ b/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.h @@ -29,6 +29,8 @@ #ifndef DIALOGBOX_REMOVE_ELEMENTS_H #define DIALOGBOX_REMOVE_ELEMENTS_H +#include "SMESH_SMESHGUI.hxx" + #include "LightApp_SelectionMgr.h" // QT Includes @@ -58,7 +60,7 @@ class SVTK_ViewWindow; // class : SMESHGUI_RemoveElementsDlg // purpose : //================================================================================= -class SMESHGUI_RemoveElementsDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_RemoveElementsDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.h b/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.h index 68fb7817f..363be9f63 100644 --- a/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.h +++ b/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.h @@ -29,6 +29,8 @@ #ifndef DIALOGBOX_REMOVE_NODES_H #define DIALOGBOX_REMOVE_NODES_H +#include "SMESH_SMESHGUI.hxx" + #include "LightApp_SelectionMgr.h" // QT Includes @@ -61,7 +63,7 @@ class SVTK_ViewWindow; // class : SMESHGUI_RemoveNodesDlg // purpose : //================================================================================= -class SMESHGUI_RemoveNodesDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_RemoveNodesDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_RenumberingDlg.h b/src/SMESHGUI/SMESHGUI_RenumberingDlg.h index 50932fdbc..241e7a22c 100644 --- a/src/SMESHGUI/SMESHGUI_RenumberingDlg.h +++ b/src/SMESHGUI/SMESHGUI_RenumberingDlg.h @@ -29,6 +29,8 @@ #ifndef DIALOGBOX_RENUMBERING_H #define DIALOGBOX_RENUMBERING_H +#include "SMESH_SMESHGUI.hxx" + #include "LightApp_SelectionMgr.h" //#include "SMESH_TypeFilter.hxx" #include "SUIT_SelectionFilter.h" @@ -55,7 +57,7 @@ class SMESHGUI; // class : SMESHGUI_RenumberingDlg // purpose : If the unit == 0 nodes will be renumbered, if the unit == 1 the elements will. //================================================================================= -class SMESHGUI_RenumberingDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_RenumberingDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_RevolutionDlg.h b/src/SMESHGUI/SMESHGUI_RevolutionDlg.h index dc1da869d..77639c8b5 100644 --- a/src/SMESHGUI/SMESHGUI_RevolutionDlg.h +++ b/src/SMESHGUI/SMESHGUI_RevolutionDlg.h @@ -29,6 +29,8 @@ #ifndef DIALOGBOX_REVOLUTION_H #define DIALOGBOX_REVOLUTION_H +#include "SMESH_SMESHGUI.hxx" + #include "LightApp_SelectionMgr.h" #include "SMESH_LogicalFilter.hxx" @@ -62,7 +64,7 @@ class SVTK_Selector; // class : SMESHGUI_RevolutionDlg // purpose : //================================================================================= -class SMESHGUI_RevolutionDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_RevolutionDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_RotationDlg.h b/src/SMESHGUI/SMESHGUI_RotationDlg.h index 75a263154..2ba7fd42f 100644 --- a/src/SMESHGUI/SMESHGUI_RotationDlg.h +++ b/src/SMESHGUI/SMESHGUI_RotationDlg.h @@ -29,6 +29,8 @@ #ifndef DIALOGBOX_ROTATION_H #define DIALOGBOX_ROTATION_H +#include "SMESH_SMESHGUI.hxx" + #include "LightApp_SelectionMgr.h" #include "SMESH_LogicalFilter.hxx" @@ -61,7 +63,7 @@ class SVTK_Selector; // class : SMESHGUI_RotationDlg // purpose : //================================================================================= -class SMESHGUI_RotationDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_RotationDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_Selection.h b/src/SMESHGUI/SMESHGUI_Selection.h index 5f2e05fb6..bc22d7240 100644 --- a/src/SMESHGUI/SMESHGUI_Selection.h +++ b/src/SMESHGUI/SMESHGUI_Selection.h @@ -29,6 +29,8 @@ #ifndef SMESHGUI_SELECTION_HeaderFile #define SMESHGUI_SELECTION_HeaderFile +#include "SMESH_SMESHGUI.hxx" + #include "LightApp_Selection.h" #include "SALOMEDSClient_definitions.hxx" @@ -37,7 +39,7 @@ class SALOMEDSClient_Study; class LightApp_DataOwner; class SMESH_Actor; -class SMESHGUI_Selection : public LightApp_Selection +class SMESHGUI_EXPORT SMESHGUI_Selection : public LightApp_Selection { public: SMESHGUI_Selection(); diff --git a/src/SMESHGUI/SMESHGUI_SelectionOp.h b/src/SMESHGUI/SMESHGUI_SelectionOp.h index bb1a05b66..ebc16d78f 100644 --- a/src/SMESHGUI/SMESHGUI_SelectionOp.h +++ b/src/SMESHGUI/SMESHGUI_SelectionOp.h @@ -27,6 +27,8 @@ #ifndef SMESHGUI_SelectionOp_H #define SMESHGUI_SelectionOp_H +#include "SMESH_SMESHGUI.hxx" + #include #include #include @@ -47,7 +49,7 @@ class SMESH_Actor; Description : Base operation for all operations using object selection in viewer or objectbrowser through common widgets created by LightApp_Dialog::createObject */ -class SMESHGUI_SelectionOp : public SMESHGUI_Operation +class SMESHGUI_EXPORT SMESHGUI_SelectionOp : public SMESHGUI_Operation { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_SewingDlg.h b/src/SMESHGUI/SMESHGUI_SewingDlg.h index 425a92853..8340eb134 100644 --- a/src/SMESHGUI/SMESHGUI_SewingDlg.h +++ b/src/SMESHGUI/SMESHGUI_SewingDlg.h @@ -29,6 +29,8 @@ #ifndef DIALOGBOX_SEWING_H #define DIALOGBOX_SEWING_H +#include "SMESH_SMESHGUI.hxx" + #include "LightApp_SelectionMgr.h" // QT Includes @@ -56,7 +58,7 @@ class SVTK_Selector; // class : SMESHGUI_SewingDlg // purpose : //================================================================================= -class SMESHGUI_SewingDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_SewingDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.h b/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.h index 1f1a50c6e..09dec6c30 100644 --- a/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.h +++ b/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.h @@ -27,6 +27,8 @@ #ifndef SMESHGUI_ShapeByMeshDlg_H #define SMESHGUI_ShapeByMeshDlg_H +#include "SMESH_SMESHGUI.hxx" + #include // IDL Headers @@ -48,7 +50,7 @@ class SMESHGUI; * by selecting mesh elements */ -class SMESHGUI_ShapeByMeshDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_ShapeByMeshDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_SingleEditDlg.h b/src/SMESHGUI/SMESHGUI_SingleEditDlg.h index 6a1ddc7d2..f19a2b9ee 100755 --- a/src/SMESHGUI/SMESHGUI_SingleEditDlg.h +++ b/src/SMESHGUI/SMESHGUI_SingleEditDlg.h @@ -27,6 +27,8 @@ #ifndef SMESHGUI_SingleEditDlg_H #define SMESHGUI_SingleEditDlg_H +#include "SMESH_SMESHGUI.hxx" + #include #include @@ -49,7 +51,7 @@ class LightApp_SelectionMgr; * Description : Base class for dialogs of diagonal inversion and * union of two neighboring triangles */ -class SMESHGUI_SingleEditDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_SingleEditDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_SmoothingDlg.h b/src/SMESHGUI/SMESHGUI_SmoothingDlg.h index 5cccb1b22..71455f077 100644 --- a/src/SMESHGUI/SMESHGUI_SmoothingDlg.h +++ b/src/SMESHGUI/SMESHGUI_SmoothingDlg.h @@ -29,6 +29,8 @@ #ifndef DIALOGBOX_SMOOTHING_H #define DIALOGBOX_SMOOTHING_H +#include "SMESH_SMESHGUI.hxx" + #include "LightApp_SelectionMgr.h" #include "SMESH_LogicalFilter.hxx" @@ -62,7 +64,7 @@ class SVTK_Selector; // class : SMESHGUI_SmoothingDlg // purpose : //================================================================================= -class SMESHGUI_SmoothingDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_SmoothingDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_SpinBox.h b/src/SMESHGUI/SMESHGUI_SpinBox.h index 8655e4dfb..8f7444e75 100644 --- a/src/SMESHGUI/SMESHGUI_SpinBox.h +++ b/src/SMESHGUI/SMESHGUI_SpinBox.h @@ -29,13 +29,15 @@ #ifndef SMESH_SPINBOX_H #define SMESH_SPINBOX_H +#include "SMESH_SMESHGUI.hxx" + #include //================================================================================= // class : SMESHGUI_SpinBox // purpose : Derivated from QtxDblSpinBox class //================================================================================= -class SMESHGUI_SpinBox : public QtxDblSpinBox +class SMESHGUI_EXPORT SMESHGUI_SpinBox : public QtxDblSpinBox { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_StandardMeshInfosDlg.h b/src/SMESHGUI/SMESHGUI_StandardMeshInfosDlg.h index 28a6dfbc7..cd53455d6 100644 --- a/src/SMESHGUI/SMESHGUI_StandardMeshInfosDlg.h +++ b/src/SMESHGUI/SMESHGUI_StandardMeshInfosDlg.h @@ -29,6 +29,8 @@ #ifndef SMESHGUI_STANDARDMESHINFOSDLG_H #define SMESHGUI_STANDARDMESHINFOSDLG_H +#include "SMESH_SMESHGUI.hxx" + //#include "SMESH_TypeFilter.hxx" #include "SUIT_SelectionFilter.h" @@ -44,7 +46,7 @@ class LightApp_SelectionMgr; class SMESHGUI; -class SMESHGUI_StandardMeshInfosDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_StandardMeshInfosDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_Swig.cxx b/src/SMESHGUI/SMESHGUI_Swig.cxx index d8a0805e3..258bbf3a1 100644 --- a/src/SMESHGUI/SMESHGUI_Swig.cxx +++ b/src/SMESHGUI/SMESHGUI_Swig.cxx @@ -26,7 +26,6 @@ // Module : SMESH // $Header$ -using namespace std; #include "SMESHGUI_Swig.hxx" #include "Utils_ORB_INIT.hxx" @@ -55,6 +54,8 @@ using namespace std; #include CORBA_SERVER_HEADER(SMESH_Mesh) #include CORBA_SERVER_HEADER(SMESH_Hypothesis) +using namespace std; + static CORBA::ORB_var _orb; static CORBA::Object_ptr StringToObject (const char* ior) diff --git a/src/SMESHGUI/SMESHGUI_Swig.hxx b/src/SMESHGUI/SMESHGUI_Swig.hxx index e1b2ebcbc..3fe481828 100644 --- a/src/SMESHGUI/SMESHGUI_Swig.hxx +++ b/src/SMESHGUI/SMESHGUI_Swig.hxx @@ -29,12 +29,14 @@ #ifndef _SMESHGUI_SWIG_HXX_ #define _SMESHGUI_SWIG_HXX_ +#include "SMESH_SMESHGUI.hxx" + // IDL Headers #include #include CORBA_SERVER_HEADER(SALOMEDS) #include CORBA_SERVER_HEADER(SALOMEDS_Attributes) -class SMESH_Swig +class SMESHGUI_EXPORT SMESH_Swig { public: SMESH_Swig(); diff --git a/src/SMESHGUI/SMESHGUI_SymmetryDlg.h b/src/SMESHGUI/SMESHGUI_SymmetryDlg.h index ba49ca860..f5efd5e10 100644 --- a/src/SMESHGUI/SMESHGUI_SymmetryDlg.h +++ b/src/SMESHGUI/SMESHGUI_SymmetryDlg.h @@ -29,6 +29,8 @@ #ifndef DIALOGBOX_SYMMETRY_H #define DIALOGBOX_SYMMETRY_H +#include "SMESH_SMESHGUI.hxx" + #include "LightApp_SelectionMgr.h" #include "SMESH_LogicalFilter.hxx" @@ -60,7 +62,7 @@ class SVTK_Selector; // class : SMESHGUI_SymmetryDlg // purpose : //================================================================================= -class SMESHGUI_SymmetryDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_SymmetryDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_TranslationDlg.h b/src/SMESHGUI/SMESHGUI_TranslationDlg.h index a101c7182..fbbb19ae4 100644 --- a/src/SMESHGUI/SMESHGUI_TranslationDlg.h +++ b/src/SMESHGUI/SMESHGUI_TranslationDlg.h @@ -29,6 +29,8 @@ #ifndef DIALOGBOX_TRANSLATION_H #define DIALOGBOX_TRANSLATION_H +#include "SMESH_SMESHGUI.hxx" + #include "LightApp_SelectionMgr.h" #include "SMESH_LogicalFilter.hxx" @@ -59,7 +61,7 @@ class SVTK_Selector; // class : SMESHGUI_TranslationDlg // purpose : //================================================================================= -class SMESHGUI_TranslationDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_TranslationDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_TransparencyDlg.h b/src/SMESHGUI/SMESHGUI_TransparencyDlg.h index d41385430..1e182404c 100644 --- a/src/SMESHGUI/SMESHGUI_TransparencyDlg.h +++ b/src/SMESHGUI/SMESHGUI_TransparencyDlg.h @@ -29,6 +29,8 @@ #ifndef DIALOGBOX_TRANSPARENCYDLG_H #define DIALOGBOX_TRANSPARENCYDLG_H +#include "SMESH_SMESHGUI.hxx" + // QT Includes #include @@ -44,7 +46,7 @@ class SMESHGUI; // class : SMESHGUI_TransparencyDlg // purpose : //================================================================================= -class SMESHGUI_TransparencyDlg : public QDialog +class SMESHGUI_EXPORT SMESHGUI_TransparencyDlg : public QDialog { Q_OBJECT diff --git a/src/SMESHGUI/SMESHGUI_Utils.h b/src/SMESHGUI/SMESHGUI_Utils.h index 83278e4a5..0ab0529c5 100644 --- a/src/SMESHGUI/SMESHGUI_Utils.h +++ b/src/SMESHGUI/SMESHGUI_Utils.h @@ -20,7 +20,9 @@ #ifndef SMESHGUI_Utils_HeaderFile #define SMESHGUI_Utils_HeaderFile -#include +#include "SMESH_SMESHGUI.hxx" + +#include #include "SALOMEDSClient_definitions.hxx" #include "SALOME_InteractiveObject.hxx" @@ -44,21 +46,27 @@ class LightApp_SelectionMgr; namespace SMESH { +SMESHGUI_EXPORT SUIT_Desktop* GetDesktop(const CAM_Module* theModule); +SMESHGUI_EXPORT LightApp_SelectionMgr* GetSelectionMgr(const SalomeApp_Module* theModule); +SMESHGUI_EXPORT SalomeApp_Study* GetAppStudy(const CAM_Module* theModule); +SMESHGUI_EXPORT SUIT_ResourceMgr* GetResourceMgr( const SalomeApp_Module* ); +SMESHGUI_EXPORT _PTR(Study) GetCStudy(const SalomeApp_Study* theStudy); +SMESHGUI_EXPORT CORBA::Object_var DataOwnerToObject(const LightApp_DataOwnerPtr& theOwner); template typename TInterface::_var_type @@ -71,20 +79,29 @@ namespace SMESH { } +SMESHGUI_EXPORT SUIT_Study* GetActiveStudy(); +SMESHGUI_EXPORT SUIT_ViewWindow* GetActiveWindow(); +SMESHGUI_EXPORT _PTR(Study) GetActiveStudyDocument(); +SMESHGUI_EXPORT _PTR(SObject) FindSObject(CORBA::Object_ptr theObject); +SMESHGUI_EXPORT void SetName (_PTR(SObject) theSObject, const char* theName); + +SMESHGUI_EXPORT void SetValue (_PTR(SObject) theSObject, const char* theValue); +SMESHGUI_EXPORT CORBA::Object_var SObjectToObject (_PTR(SObject) theSObject, _PTR(Study) theStudy); +SMESHGUI_EXPORT CORBA::Object_var SObjectToObject(_PTR(SObject) theSObject); template typename TInterface::_var_type @@ -96,6 +113,7 @@ namespace SMESH { return TInterface::_nil(); } +SMESHGUI_EXPORT CORBA::Object_var IObjectToObject(const Handle(SALOME_InteractiveObject)& theIO); template typename TInterface::_var_type @@ -107,6 +125,7 @@ namespace SMESH { return TInterface::_nil(); } +SMESHGUI_EXPORT CORBA::Object_var IORToObject(const char* theIOR); template typename TInterface::_var_type @@ -118,10 +137,13 @@ namespace SMESH { return TInterface::_nil(); } +SMESHGUI_EXPORT int GetNameOfSelectedIObjects (LightApp_SelectionMgr*, QString& theName); +SMESHGUI_EXPORT _PTR(SObject) GetMeshOrSubmesh (_PTR(SObject) theSObject); +SMESHGUI_EXPORT void ModifiedMesh (_PTR(SObject) theSObject, bool theIsRight); // void UpdateObjBrowser (bool); diff --git a/src/SMESHGUI/SMESHGUI_VTKUtils.h b/src/SMESHGUI/SMESHGUI_VTKUtils.h index 6b64521f0..5c12a857a 100644 --- a/src/SMESHGUI/SMESHGUI_VTKUtils.h +++ b/src/SMESHGUI/SMESHGUI_VTKUtils.h @@ -20,6 +20,8 @@ #ifndef SMESHGUI_VTKUtils_HeaderFile #define SMESHGUI_VTKUtils_HeaderFile +#include "SMESH_SMESHGUI.hxx" + class QString; class vtkRenderer; class TColStd_IndexedMapOfInteger; @@ -40,7 +42,7 @@ class SVTK_Selector; class LightApp_SelectionMgr; class SMESHGUI; -#include +#include #include "SALOMEconfig.h" #include CORBA_CLIENT_HEADER(SALOMEDS) @@ -58,121 +60,162 @@ namespace SMESH{ //---------------------------------------------------------------------------- typedef pair TKeyOfVisualObj; +SMESHGUI_EXPORT TVisualObjPtr GetVisualObj(int theStudyId, const char* theEntry); //---------------------------------------------------------------------------- +SMESHGUI_EXPORT SVTK_ViewWindow* GetViewWindow(const SalomeApp_Module* theModule); +SMESHGUI_EXPORT SUIT_ViewWindow* GetActiveWindow(); +SMESHGUI_EXPORT SVTK_ViewWindow* FindVtkViewWindow( SUIT_ViewManager*, SUIT_ViewWindow* ); +SMESHGUI_EXPORT SVTK_ViewWindow* GetVtkViewWindow( SUIT_ViewWindow* ); +SMESHGUI_EXPORT SVTK_ViewWindow* GetCurrentVtkView(); +SMESHGUI_EXPORT void RepaintViewWindow(SVTK_ViewWindow*); +SMESHGUI_EXPORT void RenderViewWindow(SVTK_ViewWindow*); //---------------------------------------------------------------------------- +SMESHGUI_EXPORT SMESH_Actor* FindActorByEntry (SUIT_ViewWindow*, const char* theEntry); +SMESHGUI_EXPORT SMESH_Actor* FindActorByEntry (const char* theEntry); +SMESHGUI_EXPORT SMESH_Actor* FindActorByObject (CORBA::Object_ptr theObject); //---------------------------------------------------------------------------- +SMESHGUI_EXPORT SMESH_Actor* CreateActor (_PTR(Study), const char*, int = false); +SMESHGUI_EXPORT void DisplayActor (SUIT_ViewWindow*, SMESH_Actor* theActor); +SMESHGUI_EXPORT void RemoveActor (SUIT_ViewWindow*, SMESH_Actor* theActor); //---------------------------------------------------------------------------- enum EDisplaing {eDisplayAll, eDisplay, eDisplayOnly, eErase, eEraseAll}; +SMESHGUI_EXPORT void UpdateView (SUIT_ViewWindow*, EDisplaing theAction, const char* theEntry = ""); +SMESHGUI_EXPORT void UpdateView (EDisplaing theAction, const char* theEntry = ""); +SMESHGUI_EXPORT void UpdateView(); +SMESHGUI_EXPORT void Update(const Handle(SALOME_InteractiveObject)& theIO, bool theDisplay); //---------------------------------------------------------------------------- +SMESHGUI_EXPORT void FitAll(); +SMESHGUI_EXPORT void RepaintCurrentView(); +SMESHGUI_EXPORT vtkRenderer* GetCurrentRenderer(); //---------------------------------------------------------------------------- +SMESHGUI_EXPORT void SetPointRepresentation(bool theIsVisible); +SMESHGUI_EXPORT void SetPickable(SMESH_Actor* theActor = NULL); +SMESHGUI_EXPORT void UpdateSelectionProp( SMESHGUI* ); //---------------------------------------------------------------------------- +SMESHGUI_EXPORT SVTK_Selector* GetSelector(SUIT_ViewWindow* = GetActiveWindow()); +SMESHGUI_EXPORT void SetFilter (const Handle(VTKViewer_Filter)& theFilter, SVTK_Selector* theSelector = GetSelector()); +SMESHGUI_EXPORT Handle(VTKViewer_Filter) GetFilter (int theId, SVTK_Selector* theSelector = GetSelector()); +SMESHGUI_EXPORT bool IsFilterPresent (int theId, SVTK_Selector* theSelector = GetSelector()); +SMESHGUI_EXPORT void RemoveFilter (int theId, SVTK_Selector* theSelector = GetSelector()); +SMESHGUI_EXPORT void RemoveFilters (SVTK_Selector* theSelector = GetSelector()); +SMESHGUI_EXPORT bool IsValid (SALOME_Actor* theActor, int theCellId, SVTK_Selector* theSelector = GetSelector()); //---------------------------------------------------------------------------- +SMESHGUI_EXPORT int GetNameOfSelectedNodes(SVTK_Selector* theSelector, const Handle(SALOME_InteractiveObject)& theIO, QString& theName); +SMESHGUI_EXPORT int GetNameOfSelectedElements(SVTK_Selector* theSelector, const Handle(SALOME_InteractiveObject)& theIO, QString& theName); +SMESHGUI_EXPORT int GetEdgeNodes(SVTK_Selector* theSelector, const TVisualObjPtr& theVisualObj, int& theId1, int& theId2); //---------------------------------------------------------------------------- +SMESHGUI_EXPORT int GetNameOfSelectedNodes (LightApp_SelectionMgr*, const Handle(SALOME_InteractiveObject)& theIO, QString& theName); +SMESHGUI_EXPORT int GetNameOfSelectedNodes (LightApp_SelectionMgr*, QString& aName); +SMESHGUI_EXPORT int GetNameOfSelectedElements (LightApp_SelectionMgr*, const Handle(SALOME_InteractiveObject)& theIO, QString& theName); +SMESHGUI_EXPORT int GetNameOfSelectedElements (LightApp_SelectionMgr*, QString& aName); +SMESHGUI_EXPORT int GetSelected (LightApp_SelectionMgr*, TColStd_IndexedMapOfInteger& theMap, const bool theIsElement = true ); +SMESHGUI_EXPORT int GetEdgeNodes (LightApp_SelectionMgr*, int& theId1, int& theId2); +SMESHGUI_EXPORT void SetControlsPrecision (const long theVal); }; diff --git a/src/SMESHGUI/SMESHGUI_XmlHandler.cxx b/src/SMESHGUI/SMESHGUI_XmlHandler.cxx index 76e138511..d6d875e75 100644 --- a/src/SMESHGUI/SMESHGUI_XmlHandler.cxx +++ b/src/SMESHGUI/SMESHGUI_XmlHandler.cxx @@ -91,6 +91,15 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&, myServerLib = atts.value("server-lib"); myClientLib = atts.value("gui-lib"); +#ifdef WNT + myServerLib += ".dll"; + myClientLib += ".dll"; +#else + myServerLib = "lib" + myServerLib + ".so"; + myClientLib = "lib" + myClientLib + ".so"; +#endif + + QString aResName = atts.value("resources"); if (aResName != "") { diff --git a/src/SMESHGUI/SMESHGUI_XmlHandler.h b/src/SMESHGUI/SMESHGUI_XmlHandler.h index ecf738528..c91f6197c 100644 --- a/src/SMESHGUI/SMESHGUI_XmlHandler.h +++ b/src/SMESHGUI/SMESHGUI_XmlHandler.h @@ -28,12 +28,14 @@ #ifndef SMESHGUI_XmlHandler_HeaderFile #define SMESHGUI_XmlHandler_HeaderFile +#include "SMESH_SMESHGUI.hxx" + #include "SMESHGUI_Hypotheses.h" #include #include -class SMESHGUI_XmlHandler : public QXmlDefaultHandler +class SMESHGUI_EXPORT SMESHGUI_XmlHandler : public QXmlDefaultHandler { public: SMESHGUI_XmlHandler(); diff --git a/src/SMESHGUI/SMESH_SMESHGUI.hxx b/src/SMESHGUI/SMESH_SMESHGUI.hxx new file mode 100755 index 000000000..29a4e6e95 --- /dev/null +++ b/src/SMESHGUI/SMESH_SMESHGUI.hxx @@ -0,0 +1,39 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SMESH_SMESHGUI.hxx +// Author : Alexander A. BORODIN +// Module : SMESH + +#ifndef _SMESH_SMESHGUI_HXX_ +#define _SMESH_SMESHGUI_HXX_ + +#ifdef WNT + #if defined SMESHGUI_EXPORTS + #define SMESHGUI_EXPORT __declspec( dllexport ) + #else + #define SMESHGUI_EXPORT __declspec( dllimport ) + #endif +#else + #define SMESHGUI_EXPORT +#endif + +#endif diff --git a/src/SMESHGUI/SMESH_msg_en.po b/src/SMESHGUI/SMESH_msg_en.po index b0c73c29e..c6134226f 100644 --- a/src/SMESHGUI/SMESH_msg_en.po +++ b/src/SMESHGUI/SMESH_msg_en.po @@ -5,22 +5,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"PO-Revision-Date: 2006-01-13 13:50+0300\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -# This is a Qt message file in .po format. Each msgid starts with -# a scope. This scope should *NOT* be translated - eg. "Foo::Bar" -# would be translated to "Pub", not "Foo::Pub". -msgid "" -msgstr "" "Project-Id-Version: PROJECT VERSION\n" -"POT-Creation-Date: 2002-05-28 10:46:48 AM CEST\n" -"PO-Revision-Date: 2004-10-20 17:25+0400\n" +"POT-Creation-Date: 2002-05-28 10:57:43 AM CEST\n" +"PO-Revision-Date: 2005-06-07 10:51+0400\n" "Last-Translator: FULLNAME \n" "Content-Type: text/plain; charset=iso-8859-1\n" diff --git a/src/SMESH_I/SMESH.hxx b/src/SMESH_I/SMESH.hxx index ea68b0445..2c6361815 100644 --- a/src/SMESH_I/SMESH.hxx +++ b/src/SMESH_I/SMESH.hxx @@ -26,8 +26,18 @@ // Module : SMESH // $Header: -#ifndef _SMESH_SMESH_HXX_ -#define _SMESH_SMESH_HXX_ +#ifndef _SMESH_I_SMESH_HXX_ +#define _SMESH_I_SMESH_HXX_ + +#ifdef WNT + #if defined SMESH_I_EXPORTS + #define SMESH_I_EXPORT __declspec( dllexport ) + #else + #define SMESH_I_EXPORT __declspec( dllimport ) + #endif +#else + #define SMESH_I_EXPORT +#endif // Tags definition enum { diff --git a/src/SMESH_I/SMESH_1D_Algo_i.cxx b/src/SMESH_I/SMESH_1D_Algo_i.cxx index 06f621dc9..aaec199ec 100644 --- a/src/SMESH_I/SMESH_1D_Algo_i.cxx +++ b/src/SMESH_I/SMESH_1D_Algo_i.cxx @@ -26,11 +26,12 @@ // Module : SMESH // $Header$ -using namespace std; #include "SMESH_1D_Algo_i.hxx" #include "utilities.h" +using namespace std; + //============================================================================= /*! * SMESH_1D_Algo_i::SMESH_1D_Algo_i diff --git a/src/SMESH_I/SMESH_1D_Algo_i.hxx b/src/SMESH_I/SMESH_1D_Algo_i.hxx index 1112a4019..5d085c925 100644 --- a/src/SMESH_I/SMESH_1D_Algo_i.hxx +++ b/src/SMESH_I/SMESH_1D_Algo_i.hxx @@ -29,6 +29,8 @@ #ifndef _SMESH_1D_ALGO_I_HXX_ #define _SMESH_1D_ALGO_I_HXX_ +#include "SMESH.hxx" + #include #include CORBA_SERVER_HEADER(SMESH_Hypothesis) @@ -37,7 +39,7 @@ // ====================================================== // Generic 1D algorithm // ====================================================== -class SMESH_1D_Algo_i: +class SMESH_I_EXPORT SMESH_1D_Algo_i: public virtual POA_SMESH::SMESH_1D_Algo, public virtual SMESH_Algo_i { diff --git a/src/SMESH_I/SMESH_2D_Algo_i.cxx b/src/SMESH_I/SMESH_2D_Algo_i.cxx index 00744eea4..f6e42c029 100644 --- a/src/SMESH_I/SMESH_2D_Algo_i.cxx +++ b/src/SMESH_I/SMESH_2D_Algo_i.cxx @@ -26,11 +26,12 @@ // Module : SMESH // $Header$ -using namespace std; #include "SMESH_2D_Algo_i.hxx" #include "utilities.h" +using namespace std; + //============================================================================= /*! * SMESH_2D_Algo_i::SMESH_2D_Algo_i diff --git a/src/SMESH_I/SMESH_2D_Algo_i.hxx b/src/SMESH_I/SMESH_2D_Algo_i.hxx index 58664c9cf..be4ebdf7a 100644 --- a/src/SMESH_I/SMESH_2D_Algo_i.hxx +++ b/src/SMESH_I/SMESH_2D_Algo_i.hxx @@ -29,6 +29,8 @@ #ifndef _SMESH_2D_ALGO_I_HXX_ #define _SMESH_2D_ALGO_I_HXX_ +#include "SMESH.hxx" + #include #include CORBA_SERVER_HEADER(SMESH_Hypothesis) @@ -37,7 +39,7 @@ // ====================================================== // Generic 2D algorithm // ====================================================== -class SMESH_2D_Algo_i: +class SMESH_I_EXPORT SMESH_2D_Algo_i: public virtual POA_SMESH::SMESH_2D_Algo, public virtual SMESH_Algo_i { diff --git a/src/SMESH_I/SMESH_2smeshpy.cxx b/src/SMESH_I/SMESH_2smeshpy.cxx index 6d8150db8..d1a64b6c7 100644 --- a/src/SMESH_I/SMESH_2smeshpy.cxx +++ b/src/SMESH_I/SMESH_2smeshpy.cxx @@ -4,11 +4,16 @@ #include "SMESH_2smeshpy.hxx" -#include "SMESH_Gen_i.hxx" #include "utilities.h" #include "SMESH_PythonDump.hxx" #include "Resource_DataMapOfAsciiStringAsciiString.hxx" +#include "SMESH_Gen_i.hxx" +/* SALOME headers that include CORBA headers that include windows.h + * that defines GetObject symbol as GetObjectA should stand before SALOME headers + * that declare methods named GetObject - to apply the same rules of GetObject renaming + * and thus to avoid mess with GetObject symbol on Windows */ + IMPLEMENT_STANDARD_HANDLE (_pyObject ,Standard_Transient); IMPLEMENT_STANDARD_HANDLE (_pyCommand ,Standard_Transient); IMPLEMENT_STANDARD_HANDLE (_pyGen ,_pyObject); diff --git a/src/SMESH_I/SMESH_3D_Algo_i.cxx b/src/SMESH_I/SMESH_3D_Algo_i.cxx index 14276fe12..875557d88 100644 --- a/src/SMESH_I/SMESH_3D_Algo_i.cxx +++ b/src/SMESH_I/SMESH_3D_Algo_i.cxx @@ -26,11 +26,12 @@ // Module : SMESH // $Header$ -using namespace std; #include "SMESH_3D_Algo_i.hxx" #include "utilities.h" +using namespace std; + //============================================================================= /*! * SMESH_3D_Algo_i::SMESH_3D_Algo_i diff --git a/src/SMESH_I/SMESH_3D_Algo_i.hxx b/src/SMESH_I/SMESH_3D_Algo_i.hxx index 8589e166a..41cf9c3b0 100644 --- a/src/SMESH_I/SMESH_3D_Algo_i.hxx +++ b/src/SMESH_I/SMESH_3D_Algo_i.hxx @@ -37,7 +37,7 @@ // ====================================================== // Generic 3D algorithm // ====================================================== -class SMESH_3D_Algo_i: +class SMESH_I_EXPORT SMESH_3D_Algo_i: public virtual POA_SMESH::SMESH_3D_Algo, public virtual SMESH_Algo_i { diff --git a/src/SMESH_I/SMESH_Algo_i.cxx b/src/SMESH_I/SMESH_Algo_i.cxx index a57df7bef..71b4f961c 100644 --- a/src/SMESH_I/SMESH_Algo_i.cxx +++ b/src/SMESH_I/SMESH_Algo_i.cxx @@ -26,7 +26,6 @@ // Module : SMESH // $Header$ -using namespace std; #include "SMESH_Algo_i.hxx" #include "SMESH_Algo.hxx" @@ -35,6 +34,8 @@ using namespace std; #include #include +using namespace std; + //============================================================================= /*! * SMESH_Algo_i::SMESH_Algo_i diff --git a/src/SMESH_I/SMESH_Algo_i.hxx b/src/SMESH_I/SMESH_Algo_i.hxx index 21630ec8a..99719e9c2 100644 --- a/src/SMESH_I/SMESH_Algo_i.hxx +++ b/src/SMESH_I/SMESH_Algo_i.hxx @@ -29,6 +29,8 @@ #ifndef _SMESH_ALGO_I_HXX_ #define _SMESH_ALGO_I_HXX_ +#include "SMESH.hxx" + #include #include CORBA_SERVER_HEADER(SMESH_Hypothesis) @@ -37,7 +39,7 @@ // ====================================================== // Generic algorithm // ====================================================== -class SMESH_Algo_i: +class SMESH_I_EXPORT SMESH_Algo_i: public virtual POA_SMESH::SMESH_Algo, public virtual SMESH_Hypothesis_i { diff --git a/src/SMESH_I/SMESH_Filter_i.hxx b/src/SMESH_I/SMESH_Filter_i.hxx index a96758049..8a7e6b5b9 100644 --- a/src/SMESH_I/SMESH_Filter_i.hxx +++ b/src/SMESH_I/SMESH_Filter_i.hxx @@ -28,6 +28,8 @@ #ifndef _SMESH_FILTER_I_HXX_ #define _SMESH_FILTER_I_HXX_ +#include "SMESH.hxx" + #include #include CORBA_SERVER_HEADER(SMESH_Filter) @@ -50,7 +52,7 @@ namespace SMESH Description : Predicate for verifying whether entiy belong to specified geometrical support */ - class BelongToGeom: public virtual Predicate + class SMESH_I_EXPORT BelongToGeom: public virtual Predicate { public: BelongToGeom(); @@ -78,7 +80,7 @@ namespace SMESH Description : Predicate for verifying whether entiy lying or partially lying on specified geometrical support */ - class LyingOnGeom: public virtual Predicate + class SMESH_I_EXPORT LyingOnGeom: public virtual Predicate { public: LyingOnGeom(); @@ -115,7 +117,7 @@ namespace SMESH Class : Functor_i Description : An abstact class for all functors */ - class Functor_i: public virtual POA_SMESH::Functor, + class SMESH_I_EXPORT Functor_i: public virtual POA_SMESH::Functor, public virtual SALOME::GenericObj_i { public: @@ -134,7 +136,7 @@ namespace SMESH Class : NumericalFunctor_i Description : Base class for numerical functors */ - class NumericalFunctor_i: public virtual POA_SMESH::NumericalFunctor, + class SMESH_I_EXPORT NumericalFunctor_i: public virtual POA_SMESH::NumericalFunctor, public virtual Functor_i { public: @@ -152,7 +154,7 @@ namespace SMESH Class : SMESH_MinimumAngleFunct Description : Functor for calculation of minimum angle */ - class MinimumAngle_i: public virtual POA_SMESH::MinimumAngle, + class SMESH_I_EXPORT MinimumAngle_i: public virtual POA_SMESH::MinimumAngle, public virtual NumericalFunctor_i { public: @@ -165,7 +167,7 @@ namespace SMESH Class : AspectRatio_i Description : Functor for calculating aspect ratio */ - class AspectRatio_i: public virtual POA_SMESH::AspectRatio, + class SMESH_I_EXPORT AspectRatio_i: public virtual POA_SMESH::AspectRatio, public virtual NumericalFunctor_i { public: @@ -178,7 +180,7 @@ namespace SMESH Class : AspectRatio3D_i Description : Functor for calculating aspect ratio for 3D */ - class AspectRatio3D_i: public virtual POA_SMESH::AspectRatio3D, + class SMESH_I_EXPORT AspectRatio3D_i: public virtual POA_SMESH::AspectRatio3D, public virtual NumericalFunctor_i { public: @@ -191,7 +193,7 @@ namespace SMESH Class : Warping_i Description : Functor for calculating warping */ - class Warping_i: public virtual POA_SMESH::Warping, + class SMESH_I_EXPORT Warping_i: public virtual POA_SMESH::Warping, public virtual NumericalFunctor_i { public: @@ -204,7 +206,7 @@ namespace SMESH Class : Taper_i Description : Functor for calculating taper */ - class Taper_i: public virtual POA_SMESH::Taper, + class SMESH_I_EXPORT Taper_i: public virtual POA_SMESH::Taper, public virtual NumericalFunctor_i { public: @@ -217,7 +219,7 @@ namespace SMESH Class : Skew_i Description : Functor for calculating skew in degrees */ - class Skew_i: public virtual POA_SMESH::Skew, + class SMESH_I_EXPORT Skew_i: public virtual POA_SMESH::Skew, public virtual NumericalFunctor_i { public: @@ -230,7 +232,7 @@ namespace SMESH Class : Area_i Description : Functor for calculating area */ - class Area_i: public virtual POA_SMESH::Area, + class SMESH_I_EXPORT Area_i: public virtual POA_SMESH::Area, public virtual NumericalFunctor_i { public: @@ -243,7 +245,7 @@ namespace SMESH Class : Volume3D_i Description : Functor for calculating volume of 3D element */ - class Volume3D_i: public virtual POA_SMESH::Volume3D, + class SMESH_I_EXPORT Volume3D_i: public virtual POA_SMESH::Volume3D, public virtual NumericalFunctor_i { public: @@ -256,7 +258,7 @@ namespace SMESH Class : Length_i Description : Functor for calculating length of edge */ - class Length_i: public virtual POA_SMESH::Length, + class SMESH_I_EXPORT Length_i: public virtual POA_SMESH::Length, public virtual NumericalFunctor_i { public: @@ -268,7 +270,7 @@ namespace SMESH Class : Length2D_i Description : Functor for calculating length of edge */ - class Length2D_i: public virtual POA_SMESH::Length2D, + class SMESH_I_EXPORT Length2D_i: public virtual POA_SMESH::Length2D, public virtual NumericalFunctor_i { public: @@ -285,7 +287,7 @@ namespace SMESH Class : MultiConnection_i Description : Functor for calculating number of faces conneted to the edge */ - class MultiConnection_i: public virtual POA_SMESH::MultiConnection, + class SMESH_I_EXPORT MultiConnection_i: public virtual POA_SMESH::MultiConnection, public virtual NumericalFunctor_i { public: @@ -297,7 +299,7 @@ namespace SMESH Class : MultiConnection2D_i Description : Functor for calculating number of faces conneted to the edge */ - class MultiConnection2D_i: public virtual POA_SMESH::MultiConnection2D, + class SMESH_I_EXPORT MultiConnection2D_i: public virtual POA_SMESH::MultiConnection2D, public virtual NumericalFunctor_i { public: @@ -317,7 +319,7 @@ namespace SMESH Class : Predicate_i Description : Base class for all predicates */ - class Predicate_i: public virtual POA_SMESH::Predicate, + class SMESH_I_EXPORT Predicate_i: public virtual POA_SMESH::Predicate, public virtual Functor_i { public: @@ -334,7 +336,7 @@ namespace SMESH Description : Verify whether a mesh volume is incorrectly oriented from the point of view of MED convention */ - class BadOrientedVolume_i: public virtual POA_SMESH::BadOrientedVolume, + class SMESH_I_EXPORT BadOrientedVolume_i: public virtual POA_SMESH::BadOrientedVolume, public virtual Predicate_i { public: @@ -346,7 +348,7 @@ namespace SMESH Class : BelongToGeom_i Description : Predicate for selection on geometrical support */ - class BelongToGeom_i: public virtual POA_SMESH::BelongToGeom, + class SMESH_I_EXPORT BelongToGeom_i: public virtual POA_SMESH::BelongToGeom, public virtual Predicate_i { public: @@ -374,7 +376,7 @@ namespace SMESH Class : BelongToSurface_i Description : Verify whether mesh element lie in pointed Geom planar object */ - class BelongToSurface_i: public virtual POA_SMESH::BelongToSurface, + class SMESH_I_EXPORT BelongToSurface_i: public virtual POA_SMESH::BelongToSurface, public virtual Predicate_i { public: @@ -402,7 +404,7 @@ namespace SMESH Class : BelongToPlane_i Description : Verify whether mesh element lie in pointed Geom planar object */ - class BelongToPlane_i: public virtual POA_SMESH::BelongToPlane, + class SMESH_I_EXPORT BelongToPlane_i: public virtual POA_SMESH::BelongToPlane, public virtual BelongToSurface_i { public: @@ -415,7 +417,7 @@ namespace SMESH Class : BelongToCylinder_i Description : Verify whether mesh element lie in pointed Geom cylindrical object */ - class BelongToCylinder_i: public virtual POA_SMESH::BelongToCylinder, + class SMESH_I_EXPORT BelongToCylinder_i: public virtual POA_SMESH::BelongToCylinder, public virtual BelongToSurface_i { public: @@ -428,7 +430,7 @@ namespace SMESH Class : LyingOnGeom_i Description : Predicate for selection on geometrical support(lying or partially lying) */ - class LyingOnGeom_i: public virtual POA_SMESH::LyingOnGeom, + class SMESH_I_EXPORT LyingOnGeom_i: public virtual POA_SMESH::LyingOnGeom, public virtual Predicate_i { public: @@ -456,7 +458,7 @@ namespace SMESH Class : FreeBorders_i Description : Predicate for free borders */ - class FreeBorders_i: public virtual POA_SMESH::FreeBorders, + class SMESH_I_EXPORT FreeBorders_i: public virtual POA_SMESH::FreeBorders, public virtual Predicate_i { public: @@ -469,7 +471,7 @@ namespace SMESH Class : FreeEdges_i Description : Predicate for free edges */ - class FreeEdges_i: public virtual POA_SMESH::FreeEdges, + class SMESH_I_EXPORT FreeEdges_i: public virtual POA_SMESH::FreeEdges, public virtual Predicate_i { public: @@ -486,7 +488,7 @@ namespace SMESH Class : RangeOfIds_i Description : Predicate for Range of Ids */ - class RangeOfIds_i: public virtual POA_SMESH::RangeOfIds, + class SMESH_I_EXPORT RangeOfIds_i: public virtual POA_SMESH::RangeOfIds, public virtual Predicate_i { public: @@ -506,7 +508,7 @@ namespace SMESH Class : Comparator_i Description : Base class for comparators */ - class Comparator_i: public virtual POA_SMESH::Comparator, + class SMESH_I_EXPORT Comparator_i: public virtual POA_SMESH::Comparator, public virtual Predicate_i { public: @@ -531,7 +533,7 @@ namespace SMESH Class : LessThan_i Description : Comparator "<" */ - class LessThan_i: public virtual POA_SMESH::LessThan, + class SMESH_I_EXPORT LessThan_i: public virtual POA_SMESH::LessThan, public virtual Comparator_i { public: @@ -544,7 +546,7 @@ namespace SMESH Class : MoreThan_i Description : Comparator ">" */ - class MoreThan_i: public virtual POA_SMESH::MoreThan, + class SMESH_I_EXPORT MoreThan_i: public virtual POA_SMESH::MoreThan, public virtual Comparator_i { public: @@ -557,7 +559,7 @@ namespace SMESH Class : EqualTo_i Description : Comparator "=" */ - class EqualTo_i: public virtual POA_SMESH::EqualTo, + class SMESH_I_EXPORT EqualTo_i: public virtual POA_SMESH::EqualTo, public virtual Comparator_i { public: @@ -575,7 +577,7 @@ namespace SMESH Class : LogicalNOT_i Description : Logical NOT predicate */ - class LogicalNOT_i: public virtual POA_SMESH::LogicalNOT, + class SMESH_I_EXPORT LogicalNOT_i: public virtual POA_SMESH::LogicalNOT, public virtual Predicate_i { public: @@ -596,7 +598,7 @@ namespace SMESH Class : LogicalBinary_i Description : Base class for binary logical predicate */ - class LogicalBinary_i: public virtual POA_SMESH::LogicalBinary, + class SMESH_I_EXPORT LogicalBinary_i: public virtual POA_SMESH::LogicalBinary, public virtual Predicate_i { public: @@ -622,7 +624,7 @@ namespace SMESH Class : LogicalAND_i Description : Logical AND */ - class LogicalAND_i: public virtual POA_SMESH::LogicalAND, + class SMESH_I_EXPORT LogicalAND_i: public virtual POA_SMESH::LogicalAND, public virtual LogicalBinary_i { public: @@ -635,7 +637,7 @@ namespace SMESH Class : LogicalOR_i Description : Logical OR */ - class LogicalOR_i: public virtual POA_SMESH::LogicalOR, + class SMESH_I_EXPORT LogicalOR_i: public virtual POA_SMESH::LogicalOR, public virtual LogicalBinary_i { public: @@ -647,7 +649,7 @@ namespace SMESH /* FILTER */ - class Filter_i: public virtual POA_SMESH::Filter, + class SMESH_I_EXPORT Filter_i: public virtual POA_SMESH::Filter, public virtual SALOME::GenericObj_i { public: @@ -709,7 +711,7 @@ namespace SMESH /* FILTER LIBRARY */ - class FilterLibrary_i: public virtual POA_SMESH::FilterLibrary, + class SMESH_I_EXPORT FilterLibrary_i: public virtual POA_SMESH::FilterLibrary, public virtual SALOME::GenericObj_i { public: @@ -747,7 +749,7 @@ namespace SMESH FILTER MANAGER */ - class FilterManager_i: public virtual POA_SMESH::FilterManager, + class SMESH_I_EXPORT FilterManager_i: public virtual POA_SMESH::FilterManager, public virtual SALOME::GenericObj_i { public: diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index 79f87e116..96f436a2b 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -52,7 +52,24 @@ #include "utilities.h" #include #include -#include + +#ifdef WNT + #include +#else + #include +#endif + +#ifdef WNT + #define LibHandle HMODULE + #define LoadLib( name ) LoadLibrary( name ) + #define GetProc GetProcAddress + #define UnLoadLib( handle ) FreeLibrary( handle ); +#else + #define LibHandle void* + #define LoadLib( name ) dlopen( name, RTLD_LAZY ) + #define GetProc dlsym + #define UnLoadLib( handle ) dlclose( handle ); +#endif #include @@ -304,23 +321,27 @@ SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::createHypothesis(const char* theHypName { // load plugin library if(MYDEBUG) MESSAGE("Loading server meshers plugin library ..."); - void* libHandle = dlopen (theLibName, RTLD_LAZY); + LibHandle libHandle = LoadLib( theLibName ); if (!libHandle) { // report any error, if occured +#ifndef WNT const char* anError = dlerror(); throw(SALOME_Exception(anError)); +#else + throw(SALOME_Exception(LOCALIZED( "Can't load server meshers plugin library" ))); +#endif } // get method, returning hypothesis creator if(MYDEBUG) MESSAGE("Find GetHypothesisCreator() method ..."); typedef GenericHypothesisCreator_i* (*GetHypothesisCreator)(const char* theHypName); GetHypothesisCreator procHandle = - (GetHypothesisCreator)dlsym( libHandle, "GetHypothesisCreator" ); + (GetHypothesisCreator)GetProc( libHandle, "GetHypothesisCreator" ); if (!procHandle) { throw(SALOME_Exception(LOCALIZED("bad hypothesis plugin library"))); - dlclose(libHandle); + UnLoadLib(libHandle); } // get hypothesis creator @@ -2807,7 +2828,7 @@ int SMESH_Gen_i::RegisterObject(CORBA::Object_ptr theObject) //============================================================================= extern "C" -{ +{ SMESH_I_EXPORT PortableServer::ObjectId* SMESHEngine_factory( CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, PortableServer::ObjectId* contId, diff --git a/src/SMESH_I/SMESH_Gen_i.hxx b/src/SMESH_I/SMESH_Gen_i.hxx index f1cce1453..a1ac46b78 100644 --- a/src/SMESH_I/SMESH_Gen_i.hxx +++ b/src/SMESH_I/SMESH_Gen_i.hxx @@ -29,6 +29,8 @@ #ifndef _SMESH_GEN_I_HXX_ #define _SMESH_GEN_I_HXX_ +#include "SMESH.hxx" + #include #include CORBA_SERVER_HEADER(SMESH_Gen) #include CORBA_SERVER_HEADER(SMESH_Mesh) @@ -58,7 +60,7 @@ class SALOME_LifeCycleCORBA; // =========================================================== // Study context - stores study-connected objects references // ========================================================== -class StudyContext +class SMESH_I_EXPORT StudyContext { public: // constructor @@ -122,7 +124,7 @@ private: // =========================================================== // SMESH module's engine // ========================================================== -class SMESH_Gen_i: +class SMESH_I_EXPORT SMESH_Gen_i: public virtual POA_SMESH::SMESH_Gen, public virtual Engines_Component_i { diff --git a/src/SMESH_I/SMESH_Group_i.hxx b/src/SMESH_I/SMESH_Group_i.hxx index e9801b258..5ecdc7d43 100644 --- a/src/SMESH_I/SMESH_Group_i.hxx +++ b/src/SMESH_I/SMESH_Group_i.hxx @@ -29,6 +29,8 @@ #ifndef SMESH_Group_i_HeaderFile #define SMESH_Group_i_HeaderFile +#include "SMESH.hxx" + #include #include CORBA_SERVER_HEADER(SMESH_Group) #include CORBA_SERVER_HEADER(SMESH_Mesh) @@ -43,7 +45,7 @@ class SMESHDS_GroupBase; // =========== // Group Base // =========== -class SMESH_GroupBase_i: +class SMESH_I_EXPORT SMESH_GroupBase_i: public virtual POA_SMESH::SMESH_GroupBase, public virtual SALOME::GenericObj_i { @@ -82,7 +84,7 @@ private: // Group // ====== -class SMESH_Group_i: +class SMESH_I_EXPORT SMESH_Group_i: public virtual POA_SMESH::SMESH_Group, public SMESH_GroupBase_i { @@ -102,7 +104,7 @@ class SMESH_Group_i: // Group linked to geometry // ========================= -class SMESH_GroupOnGeom_i: +class SMESH_I_EXPORT SMESH_GroupOnGeom_i: public virtual POA_SMESH::SMESH_GroupOnGeom, public SMESH_GroupBase_i { diff --git a/src/SMESH_I/SMESH_Hypothesis_i.cxx b/src/SMESH_I/SMESH_Hypothesis_i.cxx index d5cdce9fb..707023af0 100644 --- a/src/SMESH_I/SMESH_Hypothesis_i.cxx +++ b/src/SMESH_I/SMESH_Hypothesis_i.cxx @@ -26,12 +26,13 @@ // Module : SMESH // $Header$ -using namespace std; #include #include #include "SMESH_Hypothesis_i.hxx" #include "utilities.h" +using namespace std; + //============================================================================= /*! * SMESH_Hypothesis_i::SMESH_Hypothesis_i diff --git a/src/SMESH_I/SMESH_Hypothesis_i.hxx b/src/SMESH_I/SMESH_Hypothesis_i.hxx index df89d82c8..8bf6beaa1 100644 --- a/src/SMESH_I/SMESH_Hypothesis_i.hxx +++ b/src/SMESH_I/SMESH_Hypothesis_i.hxx @@ -29,6 +29,8 @@ #ifndef _SMESH_HYPOTHESIS_I_HXX_ #define _SMESH_HYPOTHESIS_I_HXX_ +#include "SMESH.hxx" + #include #include CORBA_SERVER_HEADER(SMESH_Hypothesis) @@ -40,7 +42,7 @@ // ====================================================== // Generic hypothesis // ====================================================== -class SMESH_Hypothesis_i: +class SMESH_I_EXPORT SMESH_Hypothesis_i: public virtual POA_SMESH::SMESH_Hypothesis, public virtual SALOME::GenericObj_i { @@ -85,7 +87,7 @@ protected: // ====================================================== // Generic hypothesis creator // ====================================================== -class GenericHypothesisCreator_i +class SMESH_I_EXPORT GenericHypothesisCreator_i { public: // Create a hypothesis diff --git a/src/SMESH_I/SMESH_MEDFamily_i.cxx b/src/SMESH_I/SMESH_MEDFamily_i.cxx index 6e2508962..1dfe803ef 100644 --- a/src/SMESH_I/SMESH_MEDFamily_i.cxx +++ b/src/SMESH_I/SMESH_MEDFamily_i.cxx @@ -24,11 +24,12 @@ // File : SMESH_MEDFamily_i.cxx // Module : SMESH -using namespace std; #include "SMESH_MEDFamily_i.hxx" #include "utilities.h" #include "Utils_CorbaException.hxx" +using namespace std; + //============================================================================= /*! * Default constructor diff --git a/src/SMESH_I/SMESH_MEDFamily_i.hxx b/src/SMESH_I/SMESH_MEDFamily_i.hxx index eeeef51ee..d5b70f6f2 100644 --- a/src/SMESH_I/SMESH_MEDFamily_i.hxx +++ b/src/SMESH_I/SMESH_MEDFamily_i.hxx @@ -27,11 +27,13 @@ #ifndef SMESH_MED_FAMILY_I_HXX_ #define SMESH_MED_FAMILY_I_HXX_ +#include "SMESH.hxx" + #include "SMESH_MEDSupport_i.hxx" #include -class SMESH_MEDFamily_i: +class SMESH_I_EXPORT SMESH_MEDFamily_i: public virtual POA_SALOME_MED::FAMILY, public virtual SMESH_MEDSupport_i { diff --git a/src/SMESH_I/SMESH_MEDMesh_i.cxx b/src/SMESH_I/SMESH_MEDMesh_i.cxx index 3f1c017d4..221fc13c3 100644 --- a/src/SMESH_I/SMESH_MEDMesh_i.cxx +++ b/src/SMESH_I/SMESH_MEDMesh_i.cxx @@ -1137,9 +1137,15 @@ void SMESH_MEDMesh_i::createFamilies() throw(SALOME::SALOME_Exception) SMESH_MEDFamily_i *famservant = new SMESH_MEDFamily_i(famIdent, submesh_i, famName, famDes, SALOME_MED::MED_NODE); - SALOME_MED::FAMILY_ptr famille = - SALOME_MED::FAMILY::_narrow(famservant-> - POA_SALOME_MED::FAMILY::_this()); +#ifdef WNT + SALOME_MED::FAMILY_ptr famille = SALOME_MED::FAMILY::_nil(); + POA_SALOME_MED::FAMILY* servantbase = dynamic_cast(famservant); + if ( servantbase ) + famille = SALOME_MED::FAMILY::_narrow( servantbase->_this() ); +#else + SALOME_MED::FAMILY_ptr famille = + SALOME_MED::FAMILY::_narrow( famservant->POA_SALOME_MED::FAMILY::_this() ); +#endif _families.push_back(famille); } } diff --git a/src/SMESH_I/SMESH_MEDMesh_i.hxx b/src/SMESH_I/SMESH_MEDMesh_i.hxx index 3b0fedec9..0f154e8d6 100644 --- a/src/SMESH_I/SMESH_MEDMesh_i.hxx +++ b/src/SMESH_I/SMESH_MEDMesh_i.hxx @@ -27,6 +27,8 @@ #ifndef _MED_SMESH_MESH_I_HXX_ #define _MED_SMESH_MESH_I_HXX_ +#include "SMESH.hxx" + #include #include CORBA_SERVER_HEADER(MED) #include @@ -44,7 +46,7 @@ class SMESH_Mesh_i; -class SMESH_MEDMesh_i: +class SMESH_I_EXPORT SMESH_MEDMesh_i: public virtual POA_SALOME_MED::MESH, public virtual SALOME::GenericObj_i { public: private: protected: diff --git a/src/SMESH_I/SMESH_MEDSupport_i.cxx b/src/SMESH_I/SMESH_MEDSupport_i.cxx index 7b5289ebb..b66601bbc 100644 --- a/src/SMESH_I/SMESH_MEDSupport_i.cxx +++ b/src/SMESH_I/SMESH_MEDSupport_i.cxx @@ -24,7 +24,6 @@ // File : SMESH_MEDSupport_i.cxx // Module : SMESH -using namespace std; #include "SMESH_MEDSupport_i.hxx" #include "utilities.h" #include "Utils_CorbaException.hxx" @@ -37,6 +36,8 @@ using namespace std; #include "SMESH_Mesh_i.hxx" #include "SMESH_subMesh_i.hxx" +using namespace std; + //============================================================================= /*! diff --git a/src/SMESH_I/SMESH_MEDSupport_i.hxx b/src/SMESH_I/SMESH_MEDSupport_i.hxx index c888661b6..0eb3949ab 100644 --- a/src/SMESH_I/SMESH_MEDSupport_i.hxx +++ b/src/SMESH_I/SMESH_MEDSupport_i.hxx @@ -27,6 +27,8 @@ #ifndef _MED_SMESH_MEDSUPPORT_I_HXX_ #define _MED_SMESH_MEDSUPPORT_I_HXX_ +#include "SMESH.hxx" + #include #include CORBA_SERVER_HEADER(MED) #include @@ -40,7 +42,7 @@ #include "SALOME_GenericObj_i.hh" class SMESH_subMesh_i; -class SMESH_MEDSupport_i: +class SMESH_I_EXPORT SMESH_MEDSupport_i: public virtual POA_SALOME_MED::SUPPORT, public virtual SALOME::GenericObj_i { public: diff --git a/src/SMESH_I/SMESH_MeshEditor_i.cxx b/src/SMESH_I/SMESH_MeshEditor_i.cxx index 9aa35ea1e..b9ab3cd48 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.cxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.cxx @@ -1370,7 +1370,7 @@ void SMESH_MeshEditor_i::FindCoincidentNodes (CORBA::Double Tol { list< const SMDS_MeshNode* >& aListOfNodes = *llIt; list< const SMDS_MeshNode* >::iterator lIt = aListOfNodes.begin();; - SMESH::long_array& aGroup = GroupsOfNodes[ i ]; + SMESH::long_array& aGroup = (*GroupsOfNodes)[i]; aGroup.length( aListOfNodes.size() ); for ( int j = 0; lIt != aListOfNodes.end(); lIt++, j++ ) aGroup[ j ] = (*lIt)->GetID(); diff --git a/src/SMESH_I/SMESH_MeshEditor_i.hxx b/src/SMESH_I/SMESH_MeshEditor_i.hxx index aa28198c1..b72bd738c 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.hxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.hxx @@ -29,12 +29,14 @@ #ifndef _SMESH_MESHEDITOR_I_HXX_ #define _SMESH_MESHEDIOTR_I_HXX_ +#include "SMESH.hxx" + #include #include CORBA_SERVER_HEADER(SMESH_Mesh) #include "SMESH_Mesh.hxx" -class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor +class SMESH_I_EXPORT SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor { public: SMESH_MeshEditor_i(SMESH_Mesh * theMesh); diff --git a/src/SMESH_I/SMESH_Mesh_i.hxx b/src/SMESH_I/SMESH_Mesh_i.hxx index 42fac7d5d..82a44605c 100644 --- a/src/SMESH_I/SMESH_Mesh_i.hxx +++ b/src/SMESH_I/SMESH_Mesh_i.hxx @@ -29,6 +29,8 @@ #ifndef _SMESH_MESH_I_HXX_ #define _SMESH_MESH_I_HXX_ +#include "SMESH.hxx" + #include #include CORBA_SERVER_HEADER(SMESH_Mesh) #include CORBA_SERVER_HEADER(SMESH_Group) @@ -48,7 +50,7 @@ class SMESH_GroupBase_i; #include -class SMESH_Mesh_i: +class SMESH_I_EXPORT SMESH_Mesh_i: public virtual POA_SMESH::SMESH_Mesh, public virtual SALOME::GenericObj_i { @@ -159,7 +161,7 @@ public: throw (SALOME::SALOME_Exception); void ExportUNV( const char* file ) throw (SALOME::SALOME_Exception); - void ExportSTL( const char* file, const bool isascii ) + void ExportSTL( const char* file, bool isascii ) throw (SALOME::SALOME_Exception); SALOME_MED::MESH_ptr GetMEDMesh() @@ -216,7 +218,7 @@ public: SMESH::long_array* GetNodesId() throw (SALOME::SALOME_Exception); - SMESH::ElementType GetElementType( const CORBA::Long id, const bool iselem ) + SMESH::ElementType GetElementType( CORBA::Long id, bool iselem ) throw (SALOME::SALOME_Exception); char* Dump(); diff --git a/src/SMESH_I/SMESH_Pattern_i.hxx b/src/SMESH_I/SMESH_Pattern_i.hxx index 29b5084cd..537d7b015 100644 --- a/src/SMESH_I/SMESH_Pattern_i.hxx +++ b/src/SMESH_I/SMESH_Pattern_i.hxx @@ -30,6 +30,8 @@ #ifndef SMESH_Pattern_I_HeaderFile #define SMESH_Pattern_I_HeaderFile +#include "SMESH.hxx" + #include "SALOMEconfig.h" #include CORBA_SERVER_HEADER(SMESH_Pattern) #include CORBA_SERVER_HEADER(SMESH_Mesh) @@ -41,7 +43,7 @@ class SMESH_Gen_i; class SMESH_Mesh; -class SMESH_Pattern_i: +class SMESH_I_EXPORT SMESH_Pattern_i: public virtual POA_SMESH::SMESH_Pattern { public: @@ -75,9 +77,14 @@ class SMESH_Pattern_i: CORBA::Long theNode000Index, CORBA::Long theNode001Index); - CORBA::Boolean MakeMesh (SMESH::SMESH_Mesh_ptr theMesh, + //for omniORB conflict compilation + /*CORBA::Boolean MakeMesh (SMESH::SMESH_Mesh_ptr theMesh, const CORBA::Boolean CreatePolygons, - const CORBA::Boolean CreatePolyedrs); + const CORBA::Boolean CreatePolyedrs);*/ + + CORBA::Boolean MakeMesh (SMESH::SMESH_Mesh_ptr theMesh, + CORBA::Boolean CreatePolygons, + CORBA::Boolean CreatePolyedrs); SMESH::SMESH_Pattern::ErrorCode GetErrorCode(); diff --git a/src/SMESH_I/SMESH_PythonDump.hxx b/src/SMESH_I/SMESH_PythonDump.hxx index f3a011335..57a7cf826 100644 --- a/src/SMESH_I/SMESH_PythonDump.hxx +++ b/src/SMESH_I/SMESH_PythonDump.hxx @@ -20,6 +20,8 @@ #ifndef _SMESH_PYTHONDUMP_HXX_ #define _SMESH_PYTHONDUMP_HXX_ +#include "SMESH.hxx" + #include #include CORBA_SERVER_HEADER(SMESH_Mesh) #include CORBA_SERVER_HEADER(SALOMEDS) @@ -37,7 +39,7 @@ namespace SMESH class Filter_i; class Functor_i; - class TPythonDump + class SMESH_I_EXPORT TPythonDump { std::ostringstream myStream; static size_t myCounter; diff --git a/src/SMESH_I/SMESH_subMesh_i.cxx b/src/SMESH_I/SMESH_subMesh_i.cxx index f8ade30f5..650d44765 100644 --- a/src/SMESH_I/SMESH_subMesh_i.cxx +++ b/src/SMESH_I/SMESH_subMesh_i.cxx @@ -26,7 +26,6 @@ // Module : SMESH // $Header$ -using namespace std; #include "SMESH_subMesh_i.hxx" #include "SMESH_Gen_i.hxx" #include "SMESH_Mesh_i.hxx" @@ -40,6 +39,8 @@ using namespace std; #include #include +using namespace std; + //============================================================================= /*! * diff --git a/src/SMESH_I/SMESH_subMesh_i.hxx b/src/SMESH_I/SMESH_subMesh_i.hxx index e8d84b37e..42861f04e 100644 --- a/src/SMESH_I/SMESH_subMesh_i.hxx +++ b/src/SMESH_I/SMESH_subMesh_i.hxx @@ -29,6 +29,8 @@ #ifndef _SMESH_SUBMESH_I_HXX_ #define _SMESH_SUBMESH_I_HXX_ +#include "SMESH.hxx" + #include #include CORBA_SERVER_HEADER(SMESH_Mesh) #include CORBA_SERVER_HEADER(SMESH_Hypothesis) @@ -40,7 +42,7 @@ class SMESH_Gen_i; class SMESH_Mesh_i; -class SMESH_subMesh_i: +class SMESH_I_EXPORT SMESH_subMesh_i: public virtual POA_SMESH::SMESH_subMesh, public virtual SALOME::GenericObj_i { @@ -64,7 +66,10 @@ public: SMESH::long_array* GetElementsByType( SMESH::ElementType theElemType ) throw (SALOME::SALOME_Exception); - SMESH::ElementType GetElementType( const CORBA::Long id, const bool iselem ) + //for omniORB conflict compilation + /*SMESH::ElementType GetElementType( const CORBA::Long id, const bool iselem ) + throw (SALOME::SALOME_Exception);*/ + SMESH::ElementType GetElementType( CORBA::Long id, bool iselem ) throw (SALOME::SALOME_Exception); SMESH::long_array* GetNodesId()