5 #include "MEDMEM_Support.hxx"
9 This class describe a family of elements on an entity.\n
10 It inherits from support. \n
11 It contains a list of elements (by SUPPORT class inheritance)
12 and a description of some attributs.\n
14 All families on one entity represent a mesh partition for this entity.
18 class FAMILY : virtual public SUPPORT
23 Identifier of the family in the mesh
24 Note : There is precisely one for each family.
30 Number of attribute of the family .\n
31 Note that attributes are numbered from 1 to N.
34 int _numberOfAttribute ;
37 Array of all attributes' identifiers.
38 There is one for each attribute.
41 int * _attributeIdentifier ;
44 Array of all attributes' values.
45 There is one for each attribute.
48 int * _attributeValue ;
51 Array of all attributes' descriptions.
52 There is one for each attribute.
55 string * _attributeDescription ;
58 Number of the group the family belongs to.
64 Name of the group the family belongs to.
74 Constructor to use with med driver.
77 FAMILY( MESH* Mesh, int Identifier, string Name,
78 int NumberOfAttribute, int *AttributeIdentifier,
79 int *AttributeValue, string AttributeDescription,
80 int NumberOfGroup, string GroupName,
81 int * MEDArrayNodeFamily,
82 int ** MEDArrayCellFamily,
83 int ** MEDArrayFaceFamily,
84 int ** MEDArrayEdgeFamily
87 /*! Copy Constructor. */
88 FAMILY(const FAMILY & m);
90 /*! Constructor with SUPPORT entry. */
91 FAMILY(const SUPPORT & s);
95 FAMILY & operator=(const FAMILY &fam);
96 friend ostream & operator<<(ostream &os, FAMILY &my) ;
98 friend ostream & operator<<(ostream &os, const FAMILY &my) ;
100 bool build(MED_EN::medEntityMesh Entity,int **FamilyNumber);
102 inline void setIdentifier (int Identifier);
103 inline void setNumberOfAttributes (int NumberOfAttribute);
104 inline void setAttributesIdentifiers (int * AttributeIdentifier);
105 inline void setAttributesValues (int * AttributeValue);
106 inline void setAttributesDescriptions (string * AttributeDescription);
107 inline void setNumberOfGroups (int NumberOfGroups);
108 inline void setGroupsNames (string * GroupName);
110 inline int getIdentifier() const;
111 inline int getNumberOfAttributes() const;
112 inline int * getAttributesIdentifiers() const;
113 inline int * getAttributesValues() const;
114 inline string * getAttributesDescriptions() const;
115 inline int getNumberOfGroups() const;
116 inline string * getGroupsNames() const;
118 // A FAIRE : VERIFIER LA VALIDITE DES PARAMETRES !
119 inline int getAttributeIdentifier(int i) const;
120 inline int getAttributeValue(int i) const;
121 inline string getAttributeDescription(int i) const;
122 inline string getGroupName(int i) const;
126 /*! Sets the attribute _identifier to Identifier. */
127 //----------------------------------------------
128 inline void FAMILY::setIdentifier(int Identifier)
129 //----------------------------------------------
131 _identifier = Identifier;
134 /*! Sets the attribute _numberOfAttribute to NumberOfAttribute. */
135 //--------------------------------------------------------------
136 inline void FAMILY::setNumberOfAttributes(int NumberOfAttribute)
137 //--------------------------------------------------------------
139 _numberOfAttribute = NumberOfAttribute;
142 /*! Sets the attribute _attributeIdentifier to AttributeIdentifier. */
143 //---------------------------------------------------------------------
144 inline void FAMILY::setAttributesIdentifiers(int * AttributeIdentifier)
145 //---------------------------------------------------------------------
147 _attributeIdentifier = AttributeIdentifier ;
150 /*! Sets the attribute _attributeValue to AttributeValue. */
151 //-----------------------------------------------------------
152 inline void FAMILY::setAttributesValues(int * AttributeValue)
153 //-----------------------------------------------------------
155 _attributeValue = AttributeValue ;
158 /*! Sets the attribute _attributeDescription to AttributeDescription. */
159 //--------------------------------------------------------------------------
160 inline void FAMILY::setAttributesDescriptions(string * AttributeDescription)
161 //--------------------------------------------------------------------------
163 _attributeDescription = AttributeDescription ;
166 /*! Sets the attribute _numberOfGroup to NumberOfGroups. */
167 //-------------------------------------------------------
168 inline void FAMILY::setNumberOfGroups(int NumberOfGroups)
169 //-------------------------------------------------------
171 _numberOfGroup = NumberOfGroups ;
174 /*! Sets the attribute _groupName to GroupName. */
175 //----------------------------------------------------
176 inline void FAMILY::setGroupsNames(string * GroupName)
177 //----------------------------------------------------
179 _groupName = GroupName ;
181 /*! Returns the attribute _identifier.\n
182 Note that there is one identifier precisely for each family. */
183 //--------------------------------------
184 inline int FAMILY::getIdentifier() const
185 //--------------------------------------
190 /*! Returns the number of attributes of the family. */
191 //----------------------------------------------
192 inline int FAMILY::getNumberOfAttributes() const
193 //----------------------------------------------
195 return _numberOfAttribute ;
197 /*! Returns a pointer to attributes identifiers .
198 (There are _numberOfAttribute attributes) */
199 //---------------------------------------------------
200 inline int * FAMILY::getAttributesIdentifiers() const
201 //---------------------------------------------------
203 return _attributeIdentifier ;
205 /*! Returns identifer of the Ith attribute of the family.\n
206 Note that they are numbered from 1 to N */
207 //----------------------------------------------------
208 inline int FAMILY::getAttributeIdentifier(int i) const
209 //----------------------------------------------------
211 return _attributeIdentifier[i-1] ;
213 /*! Returns a pointer to attributes values.
214 (There are _numberOfAttribute attributes)*/
215 //----------------------------------------------
216 inline int * FAMILY::getAttributesValues() const
217 //----------------------------------------------
219 return _attributeValue ;
221 /*! Returns value of the Ith attribute of the family.\n
222 Note that they are numbered from 1 to N */
223 //-----------------------------------------------
224 inline int FAMILY::getAttributeValue(int i) const
225 //-----------------------------------------------
227 return _attributeValue[i-1] ;
229 //-------------------------------------------------------
230 inline string * FAMILY::getAttributesDescriptions() const
231 //-------------------------------------------------------
233 return _attributeDescription ;
235 /*! Returns description of the Ith attribute of the family\n
236 Note that they are numbered from 1 to N */
237 //--------------------------------------------------------
238 inline string FAMILY::getAttributeDescription(int i) const
239 //--------------------------------------------------------
241 return _attributeDescription[i-1] ;
243 /*! Returns the number of groups the family belongs to.*/
244 //------------------------------------------
245 inline int FAMILY::getNumberOfGroups() const
246 //------------------------------------------
248 return _numberOfGroup;
250 /*! Returns a pointer to the names of the groups the family belongs to */
251 //--------------------------------------------
252 inline string * FAMILY::getGroupsNames() const
253 //--------------------------------------------
257 /*! Returns the name of the Ith group the family belongs to.\n
258 Note that they are numbered from 1 to N*/
259 //---------------------------------------------
260 inline string FAMILY::getGroupName(int i) const
261 //---------------------------------------------
263 return _groupName[i-1] ;
266 }//End namespace MEDMEM
267 #endif /* FAMILY_HXX */