28 #ifndef _INCLUDE_DRIVERMED_FAMILY
29 #define _INCLUDE_DRIVERMED_FAMILY
39 #include <boost/container/flat_set.hpp>
40 #include <boost/shared_ptr.hpp>
44 #define REST_NODES_FAMILY 1
45 #define FIRST_NODE_FAMILY 2
47 #define REST_EDGES_FAMILY -1
48 #define REST_FACES_FAMILY -2
49 #define REST_VOLUMES_FAMILY -3
50 #define REST_0DELEM_FAMILY -4
51 #define REST_BALL_FAMILY -5
52 #define FIRST_ELEM_FAMILY -6
55 #define NIG_EDGES_FAMILY INT_MAX-1
56 #define NIG_FACES_FAMILY INT_MAX-2
57 #define NIG_VOLS_FAMILY INT_MAX-3
58 #define NIG_0DELEM_FAMILY INT_MAX-4
59 #define NIG_BALL_FAMILY INT_MAX-5
60 #define NIG_GROUP_PREFIX "NOT_IN_GRP"
65 typedef std::set<const SMDS_MeshElement*,TIDCompare >
ElementsSet;
85 const bool doGroupOfNodes,
86 const bool doGroupOfEdges,
87 const bool doGroupOfFaces,
88 const bool doGroupOfVolumes,
89 const bool doGroupOf0DElems,
90 const bool doGroupOfBalls,
91 const bool doAllInGroups);
94 template<
class LowLevelWriter>
96 GetFamilyInfo(
const LowLevelWriter& theWrapper,
106 void SetId (
const int theId);
115 void AddGroupName(std::string theGroupName);
121 bool MemberOf(std::string theGroupName)
const;
123 int GetGroupAttributVal()
const;
124 void SetGroupAttributVal(
int theValue);
146 bool IsEmpty ()
const;
167 template<
class LowLevelWriter>
172 std::ostringstream aStr;
173 aStr <<
"FAM_" <<
myId;
174 std::set<std::string>::const_iterator aGrIter =
myGroupNames.begin();
176 aStr <<
"_" << *aGrIter;
178 std::string aValue = aStr.str();
181 int lastCharPos = std::min( maxSize, (
int) aValue.size() ) - 1;
182 while ( isspace( aValue[ lastCharPos ] ))
183 aValue.resize( lastCharPos-- );
187 anInfo = theWrapper->CrFamilyInfo(theMeshInfo,
195 anInfo = theWrapper->CrFamilyInfo(theMeshInfo,
boost::shared_ptr< DriverMED_Family > DriverMED_FamilyPtr
Definition: DriverMED.hxx:30
std::map< int, SMESHDS_SubMesh * > SMESHDS_SubMeshPtrMap
Definition: DriverMED_Family.h:63
std::list< DriverMED_FamilyPtr > DriverMED_FamilyPtrList
Definition: DriverMED_Family.h:62
boost::container::flat_set< SMDSAbs_ElementType > ElemTypeSet
Definition: DriverMED_Family.h:66
std::set< const SMDS_MeshElement *, TIDCompare > ElementsSet
Definition: DriverMED_Family.h:65
std::list< SMESHDS_GroupBase * > SMESHDS_GroupBasePtrList
Definition: DriverMED_Family.h:64
SMDSAbs_ElementType
Type (node, edge, face or volume) of elements.
Definition: SMDSAbs_ElementType.hxx:34
boost::shared_ptr< SMESHDS_SubMeshIterator > SMESHDS_SubMeshIteratorPtr
Definition: SMESHDS_SubMesh.hxx:43
#define MESHDRIVERMED_EXPORT
Definition: SMESH_DriverMED.hxx:37
Definition: DriverMED_Family.h:69
MED::PFamilyInfo GetFamilyInfo(const LowLevelWriter &theWrapper, const MED::PMeshInfo &theMeshInfo) const
Create TFamilyInfo for this family.
Definition: DriverMED_Family.h:169
MED::TStringSet myGroupNames
Definition: DriverMED_Family.h:153
SMDSAbs_ElementType myType
Definition: DriverMED_Family.h:151
int myId
Definition: DriverMED_Family.h:150
ElemTypeSet myTypes
Definition: DriverMED_Family.h:155
ElementsSet myElements
Definition: DriverMED_Family.h:152
int myGroupAttributVal
Definition: DriverMED_Family.h:154
To extend the boost::shared_ptr to support such features automatic dynamic cast.
Definition: MED_SharedPtr.hxx:37
Main purpose to introduce the class was to customize operator [].
Definition: MED_Vector.hxx:36
Base class for elements.
Definition: SMDS_MeshElement.hxx:56
Definition: SMESHDS_GroupBase.hxx:42
Definition: SMESHDS_SubMesh.hxx:48
TInt GetNOMLength()
Definition: MED_Common.cxx:41
std::set< std::string > TStringSet
Definition: MED_Common.hxx:84