Salome HOME
0022124: [CEA 763] Projection 1D does not work with Netgen 1D2D
[modules/smesh.git] / src / SMESH / SMESH_Algo.hxx
index 0f6058a31f2b7dc168b94089e8cb15e965fe85c8..8a9fad6c9743a187874b5d07150d503a43992f83 100644 (file)
 
 #include "SMESH_SMESH.hxx"
 
-#include "SMESH_Hypothesis.hxx"
-#include "SMESH_ComputeError.hxx"
+#include "SMDSAbs_ElementType.hxx"
 #include "SMESH_Comment.hxx"
+#include "SMESH_ComputeError.hxx"
+#include "SMESH_Hypothesis.hxx"
 
 #include <TopoDS_Shape.hxx>
 #include <TopoDS_Edge.hxx>
@@ -42,6 +43,7 @@
 #include <vector>
 #include <list>
 #include <map>
+#include <set>
 
 class SMDS_MeshNode;
 class SMESHDS_Mesh;
@@ -60,6 +62,7 @@ class gp_XYZ;
 typedef std::map< SMESH_subMesh*, std::vector<int> >           MapShapeNbElems;
 typedef std::map< SMESH_subMesh*, std::vector<int> >::iterator MapShapeNbElemsItr;
 
+// ==================================================================================
 /*!
  * \brief Root of all algorithms
  *
@@ -69,9 +72,33 @@ typedef std::map< SMESH_subMesh*, std::vector<int> >::iterator MapShapeNbElemsIt
  *  - methods related to dependencies between sub-meshes imposed by the algorith
  *  - static utilities, like EdgeLength()
  */
-class SMESH_EXPORT SMESH_Algo:public SMESH_Hypothesis
+// ==================================================================================
+
+class SMESH_EXPORT SMESH_Algo : public SMESH_Hypothesis
 {
-public:
+ public:
+  //==================================================================================
+  /*!
+   * \brief Structure describing algorithm features
+   */
+  // --------------------------------------------------------------------------------
+  struct Features
+  {
+    int                            _dim;
+    std::set<SMDSAbs_GeometryType> _inElemTypes;  // acceptable types of input mesh element
+    std::set<SMDSAbs_GeometryType> _outElemTypes; // produced types of mesh elements
+    std::string                    _label;        // GUI type name
+
+    bool IsCompatible( const Features& algo2 ) const;
+  };
+  /*!
+   * \brief Returns a structure describing algorithm features
+   */
+  static const Features& GetFeatures( const std::string& algoType );
+  const Features&        GetFeatures() const { return GetFeatures( _name ); }
+
+ public:
+  //==================================================================================
   /*!
    * \brief Creates algorithm
     * \param hypId - algorithm ID