X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FDriverMED%2FDriverMED_Family.h;h=97157a2a3b710599921f3121fea393a0e77d9af4;hb=c704eadf0489f1776156b36aea985c18a6915ec2;hp=0f77a01ed27536f4ae988a5207e8d0a04fe9680a;hpb=c98d9fcd7f02c1f1f5c24dd3e709ed75228d66c4;p=modules%2Fsmesh.git diff --git a/src/DriverMED/DriverMED_Family.h b/src/DriverMED/DriverMED_Family.h index 0f77a01ed..97157a2a3 100644 --- a/src/DriverMED/DriverMED_Family.h +++ b/src/DriverMED/DriverMED_Family.h @@ -36,8 +36,10 @@ #include "SMESHDS_SubMesh.hxx" #include "MED_Common.hxx" +#include #include #include +#include #define REST_NODES_FAMILY 1 #define FIRST_NODE_FAMILY 2 @@ -49,10 +51,19 @@ #define REST_BALL_FAMILY -5 #define FIRST_ELEM_FAMILY -6 -typedef std::list DriverMED_FamilyPtrList; -typedef std::map SMESHDS_SubMeshPtrMap; -typedef std::list SMESHDS_GroupBasePtrList; -typedef std::set ElementsSet; +// Not In Group families +#define NIG_EDGES_FAMILY INT_MAX-1 +#define NIG_FACES_FAMILY INT_MAX-2 +#define NIG_VOLS_FAMILY INT_MAX-3 +#define NIG_0DELEM_FAMILY INT_MAX-4 +#define NIG_BALL_FAMILY INT_MAX-5 +#define NIG_GROUP_PREFIX "NOT_IN_GRP" + +typedef std::list DriverMED_FamilyPtrList; +typedef std::map SMESHDS_SubMeshPtrMap; +typedef std::list SMESHDS_GroupBasePtrList; +typedef std::set ElementsSet; +typedef boost::container::flat_set< SMDSAbs_ElementType > ElemTypeSet; class MESHDRIVERMED_EXPORT DriverMED_Family { @@ -76,7 +87,8 @@ class MESHDRIVERMED_EXPORT DriverMED_Family const bool doGroupOfFaces, const bool doGroupOfVolumes, const bool doGroupOf0DElems, - const bool doGroupOfBalls); + const bool doGroupOfBalls, + const bool doAllInGroups); //! Create TFamilyInfo for this family MED::PFamilyInfo @@ -103,22 +115,23 @@ class MESHDRIVERMED_EXPORT DriverMED_Family void SetType(const SMDSAbs_ElementType theType); SMDSAbs_ElementType GetType(); - const std::set< SMDSAbs_ElementType >& GetTypes() const; + const ElemTypeSet& GetTypes() const; bool MemberOf(std::string theGroupName) const; - int GetGroupAttributVal() const; + int GetGroupAttributVal() const; void SetGroupAttributVal( int theValue); + size_t NbElements( SMDSAbs_ElementType ) const; + private: //! Initialize the tool by SMESHDS_GroupBase void Init (SMESHDS_GroupBase* group); //! Split on some parts (families) on the basis of the elements type. static - DriverMED_FamilyPtrList - SplitByType(SMESHDS_SubMesh* theSubMesh, - const int theId); + DriverMED_FamilyPtrList SplitByType(SMESHDS_SubMesh* theSubMesh, + const int theId); /*! Remove from elements, common with , @@ -133,12 +146,12 @@ class MESHDRIVERMED_EXPORT DriverMED_Family private: - int myId; - SMDSAbs_ElementType myType; - ElementsSet myElements; - MED::TStringSet myGroupNames; - int myGroupAttributVal; - std::set myTypes; // Issue 0020576 + int myId; + SMDSAbs_ElementType myType; + ElementsSet myElements; + MED::TStringSet myGroupNames; + int myGroupAttributVal; + ElemTypeSet myTypes; // Issue 0020576 }; #endif