From: eap Date: Tue, 18 Dec 2007 11:54:04 +0000 (+0000) Subject: PAL18328 SMESH_AdvancedEditor.py don't work in Debug version X-Git-Tag: V3_2_10~29 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f28f56add73b4036e42243235f03fac4a59f956a;p=modules%2Fsmesh.git PAL18328 SMESH_AdvancedEditor.py don't work in Debug version -class SMDS_WNT_EXPORT SMDS_VolumeTool +class SMDS_EXPORT SMDS_VolumeTool { public: + const SMDS_MeshVolume* Get() const; + // return element + + int ID() const; + // return element ID --- diff --git a/src/SMDS/SMDS_VolumeTool.cxx b/src/SMDS/SMDS_VolumeTool.cxx index 592e79eb9..3094a761f 100644 --- a/src/SMDS/SMDS_VolumeTool.cxx +++ b/src/SMDS/SMDS_VolumeTool.cxx @@ -1651,3 +1651,22 @@ int SMDS_VolumeTool::NbFaceNodes(VolumeType type, return 0; } +//======================================================================= +//function : Get +//purpose : return element +//======================================================================= + +const SMDS_MeshVolume* SMDS_VolumeTool::Get() const +{ + return static_cast( myVolume ); +} + +//======================================================================= +//function : ID +//purpose : return element ID +//======================================================================= + +int SMDS_VolumeTool::ID() const +{ + return myVolume ? myVolume->GetID() : 0; +} diff --git a/src/SMDS/SMDS_VolumeTool.hxx b/src/SMDS/SMDS_VolumeTool.hxx index 18aa6aec3..5eb5a0755 100644 --- a/src/SMDS/SMDS_VolumeTool.hxx +++ b/src/SMDS/SMDS_VolumeTool.hxx @@ -30,25 +30,16 @@ #ifndef SMDS_VolumeTool_HeaderFile #define SMDS_VolumeTool_HeaderFile +#include "SMESH_SMDS.hxx" + class SMDS_MeshElement; class SMDS_MeshNode; class SMDS_PolyhedralVolumeOfNodes; +class SMDS_MeshVolume; #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 +48,7 @@ class SMDS_PolyhedralVolumeOfNodes; // // ========================================================================= -class SMDS_WNT_EXPORT SMDS_VolumeTool +class SMDS_EXPORT SMDS_VolumeTool { public: @@ -72,6 +63,12 @@ class SMDS_WNT_EXPORT SMDS_VolumeTool // Set volume. // Return false if theVolume is not of type SMDSAbs_Volume + const SMDS_MeshVolume* Get() const; + // return element + + int ID() const; + // return element ID + // ----------------------- // general info // ----------------------- diff --git a/src/SMDS/SMESH_SMDS.hxx b/src/SMDS/SMESH_SMDS.hxx new file mode 100755 index 000000000..d354e130e --- /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