Salome HOME
21680: EDF 2288 SMESH: creation of 0D elements from other elements
[modules/smesh.git] / src / SMDS / SMDS_Downward.hxx
index 2226c55dc1e534b85ecf321b733f33cc56ac2deb..c4557b2361ed42188d8c4f99e849c8d83c532031 100644 (file)
@@ -1,9 +1,25 @@
-/*
- * SMDS_Downward.hxx
- *
- *  Created on: Jun 3, 2010
- *      Author: prascle
- */
+// Copyright (C) 2010-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// File: SMDS_Downward.hxx
+// Created: Jun 3, 2010
+// Author: prascle
 
 #ifndef SMDS_DOWNWARD_HXX_
 #define SMDS_DOWNWARD_HXX_
@@ -26,7 +42,7 @@ typedef struct
   int nbElems;
 } ListElemByNodesType; // TODO resize for polyhedrons
 
-class DownIdType
+class SMDS_EXPORT DownIdType
 {
 public:
   DownIdType(int a, unsigned char b) :
@@ -48,7 +64,7 @@ struct DownIdCompare
   }
 };
 
-class SMDS_Downward
+class SMDS_EXPORT SMDS_Downward
 {
   friend class SMDS_UnstructuredGrid;
   friend class SMDS_Down2D;
@@ -62,6 +78,7 @@ public:
   virtual const unsigned char* getUpTypes(int cellId) = 0;
   virtual void getNodeIds(int cellId, std::set<int>& nodeSet) = 0;
   virtual int getNodes(int cellId, int* nodevec) {return 0; }
+  virtual void getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& orderedNodes) {};
   int getVtkCellId(int cellId)
   {
     return _vtkCellIds[cellId];
@@ -92,7 +109,7 @@ protected:
   static std::vector<int> _cellDimension; //!< conversion table: type --> dimension
 };
 
-class SMDS_Down1D: public SMDS_Downward
+class SMDS_EXPORT SMDS_Down1D: public SMDS_Downward
 {
   friend class SMDS_UnstructuredGrid;
 public:
@@ -123,7 +140,7 @@ protected:
   std::vector<int> _upCellIndex; //!< compacted storage after connectivity calculation
 };
 
-class SMDS_Down2D: public SMDS_Downward
+class SMDS_EXPORT SMDS_Down2D: public SMDS_Downward
 {
   friend class SMDS_UnstructuredGrid;
   friend class SMDS_Down1D;
@@ -154,7 +171,7 @@ protected:
   int _nbNodes; //!< number of nodes in a face
 };
 
-class SMDS_Down3D: public SMDS_Downward
+class SMDS_EXPORT SMDS_Down3D: public SMDS_Downward
 {
   friend class SMDS_UnstructuredGrid;
 public:
@@ -162,7 +179,6 @@ public:
   virtual const int* getUpCells(int cellId);
   virtual const unsigned char* getUpTypes(int cellId);
   virtual void getNodeIds(int cellId, std::set<int>& nodeSet);
-  virtual void getOrderedNodesOfFace(int cellId, std::vector<vtkIdType>& orderedNodes) = 0;
 protected:
   SMDS_Down3D(SMDS_UnstructuredGrid *grid, int nbDownCells);
   ~SMDS_Down3D();
@@ -172,7 +188,7 @@ protected:
   int FindFaceByNodes(int cellId, ElemByNodesType& faceByNodes);
 };
 
-class SMDS_DownEdge: public SMDS_Down1D
+class SMDS_EXPORT SMDS_DownEdge: public SMDS_Down1D
 {
   friend class SMDS_UnstructuredGrid;
 public:
@@ -181,7 +197,7 @@ protected:
   ~SMDS_DownEdge();
 };
 
-class SMDS_DownQuadEdge: public SMDS_Down1D
+class SMDS_EXPORT SMDS_DownQuadEdge: public SMDS_Down1D
 {
   friend class SMDS_UnstructuredGrid;
 public:
@@ -190,7 +206,7 @@ protected:
   ~SMDS_DownQuadEdge();
 };
 
-class SMDS_DownTriangle: public SMDS_Down2D
+class SMDS_EXPORT SMDS_DownTriangle: public SMDS_Down2D
 {
   friend class SMDS_UnstructuredGrid;
 public:
@@ -201,7 +217,7 @@ protected:
   virtual void addDownCell(int cellId, int lowCellId, unsigned char aType); //!< Id's are downward connectivity id's
 };
 
-class SMDS_DownQuadTriangle: public SMDS_Down2D
+class SMDS_EXPORT SMDS_DownQuadTriangle: public SMDS_Down2D
 {
   friend class SMDS_UnstructuredGrid;
 public:
@@ -212,7 +228,7 @@ protected:
   virtual void addDownCell(int cellId, int lowCellId, unsigned char aType); //!< Id's are downward connectivity id's
 };
 
-class SMDS_DownQuadrangle: public SMDS_Down2D
+class SMDS_EXPORT SMDS_DownQuadrangle: public SMDS_Down2D
 {
   friend class SMDS_UnstructuredGrid;
 public:
@@ -223,7 +239,7 @@ protected:
   virtual void addDownCell(int cellId, int lowCellId, unsigned char aType); //!< Id's are downward connectivity id's
 };
 
-class SMDS_DownQuadQuadrangle: public SMDS_Down2D
+class SMDS_EXPORT SMDS_DownQuadQuadrangle: public SMDS_Down2D
 {
   friend class SMDS_UnstructuredGrid;
 public:
@@ -250,7 +266,7 @@ protected:
 //protected:
 //};
 
-class SMDS_DownTetra: public SMDS_Down3D
+class SMDS_EXPORT SMDS_DownTetra: public SMDS_Down3D
 {
   friend class SMDS_UnstructuredGrid;
 public:
@@ -262,7 +278,7 @@ protected:
   virtual void computeFacesWithNodes(int cellId, ListElemByNodesType& facesWithNodes);
 };
 
-class SMDS_DownQuadTetra: public SMDS_Down3D
+class SMDS_EXPORT SMDS_DownQuadTetra: public SMDS_Down3D
 {
   friend class SMDS_UnstructuredGrid;
 public:
@@ -274,7 +290,7 @@ protected:
   virtual void computeFacesWithNodes(int cellId, ListElemByNodesType& facesWithNodes);
 };
 
-class SMDS_DownPyramid: public SMDS_Down3D
+class SMDS_EXPORT SMDS_DownPyramid: public SMDS_Down3D
 {
   friend class SMDS_UnstructuredGrid;
 public:
@@ -286,7 +302,7 @@ protected:
   virtual void computeFacesWithNodes(int cellId, ListElemByNodesType& facesWithNodes);
 };
 
-class SMDS_DownQuadPyramid: public SMDS_Down3D
+class SMDS_EXPORT SMDS_DownQuadPyramid: public SMDS_Down3D
 {
   friend class SMDS_UnstructuredGrid;
 public:
@@ -298,7 +314,7 @@ protected:
   virtual void computeFacesWithNodes(int cellId, ListElemByNodesType& facesWithNodes);
 };
 
-class SMDS_DownPenta: public SMDS_Down3D
+class SMDS_EXPORT SMDS_DownPenta: public SMDS_Down3D
 {
   friend class SMDS_UnstructuredGrid;
 public:
@@ -310,7 +326,7 @@ protected:
   virtual void computeFacesWithNodes(int cellId, ListElemByNodesType& facesWithNodes);
 };
 
-class SMDS_DownQuadPenta: public SMDS_Down3D
+class SMDS_EXPORT SMDS_DownQuadPenta: public SMDS_Down3D
 {
   friend class SMDS_UnstructuredGrid;
 public:
@@ -322,7 +338,7 @@ protected:
   virtual void computeFacesWithNodes(int cellId, ListElemByNodesType& facesWithNodes);
 };
 
-class SMDS_DownHexa: public SMDS_Down3D
+class SMDS_EXPORT SMDS_DownHexa: public SMDS_Down3D
 {
   friend class SMDS_UnstructuredGrid;
 public:
@@ -334,7 +350,7 @@ protected:
   virtual void computeFacesWithNodes(int cellId, ListElemByNodesType& facesWithNodes);
 };
 
-class SMDS_DownQuadHexa: public SMDS_Down3D
+class SMDS_EXPORT SMDS_DownQuadHexa: public SMDS_Down3D
 {
   friend class SMDS_UnstructuredGrid;
 public: