X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FDriverMED%2FDriverMED_Family.h;h=d102b87a9ffa791080f1876de566e1f7e87e2512;hp=1325617f13203d0b34b2e28223f5c52d59d0d6eb;hb=a274ade365bd0f0e19d56c577acc4a13aa1972a7;hpb=5d0b75d9d1a9935ec419e820e6dde45a665dd978 diff --git a/src/DriverMED/DriverMED_Family.h b/src/DriverMED/DriverMED_Family.h index 1325617f1..d102b87a9 100644 --- a/src/DriverMED/DriverMED_Family.h +++ b/src/DriverMED/DriverMED_Family.h @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -36,6 +36,7 @@ #include "SMESHDS_SubMesh.hxx" #include "MED_Common.hxx" +#include #include #include #include @@ -58,10 +59,11 @@ #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 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 { @@ -113,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 , @@ -143,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