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 bool build(medEntityMesh Entity,int **FamilyNumber);
100 inline void setIdentifier (int Identifier);
101 inline void setNumberOfAttributes (int NumberOfAttribute);
102 inline void setAttributesIdentifiers (int * AttributeIdentifier);
103 inline void setAttributesValues (int * AttributeValue);
104 inline void setAttributesDescriptions (string * AttributeDescription);
105 inline void setNumberOfGroups (int NumberOfGroups);
106 inline void setGroupsNames (string * GroupName);
108 inline int getIdentifier() const;
109 inline int getNumberOfAttributes() const;
110 inline int * getAttributesIdentifiers() const;
111 inline int * getAttributesValues() const;
112 inline string * getAttributesDescriptions() const;
113 inline int getNumberOfGroups() const;
114 inline string * getGroupsNames() const;
116 // A FAIRE : VERIFIER LA VALIDITE DES PARAMETRES !
117 inline int getAttributeIdentifier(int i) const;
118 inline int getAttributeValue(int i) const;
119 inline string getAttributeDescription(int i) const;
120 inline string getGroupName(int i) const;
125 /*! Sets the attribute _identifier to Identifier. */
126 //----------------------------------------------
127 inline void FAMILY::setIdentifier(int Identifier)
128 //----------------------------------------------
130 _identifier = Identifier;
133 /*! Sets the attribute _numberOfAttribute to NumberOfAttribute. */
134 //--------------------------------------------------------------
135 inline void FAMILY::setNumberOfAttributes(int NumberOfAttribute)
136 //--------------------------------------------------------------
138 _numberOfAttribute = NumberOfAttribute;
141 /*! Sets the attribute _attributeIdentifier to AttributeIdentifier. */
142 //---------------------------------------------------------------------
143 inline void FAMILY::setAttributesIdentifiers(int * AttributeIdentifier)
144 //---------------------------------------------------------------------
146 _attributeIdentifier = AttributeIdentifier ;
149 /*! Sets the attribute _attributeValue to AttributeValue. */
150 //-----------------------------------------------------------
151 inline void FAMILY::setAttributesValues(int * AttributeValue)
152 //-----------------------------------------------------------
154 _attributeValue = AttributeValue ;
157 /*! Sets the attribute _attributeDescription to AttributeDescription. */
158 //--------------------------------------------------------------------------
159 inline void FAMILY::setAttributesDescriptions(string * AttributeDescription)
160 //--------------------------------------------------------------------------
162 _attributeDescription = AttributeDescription ;
165 /*! Sets the attribute _numberOfGroup to NumberOfGroups. */
166 //-------------------------------------------------------
167 inline void FAMILY::setNumberOfGroups(int NumberOfGroups)
168 //-------------------------------------------------------
170 _numberOfGroup = NumberOfGroups ;
173 /*! Sets the attribute _groupName to GroupName. */
174 //----------------------------------------------------
175 inline void FAMILY::setGroupsNames(string * GroupName)
176 //----------------------------------------------------
178 _groupName = GroupName ;
180 /*! Returns the attribute _identifier./n
181 Note that there is one identifier precisely for each family. */
182 //--------------------------------------
183 inline int FAMILY::getIdentifier() const
184 //--------------------------------------
189 /*! Returns the number of attributes of the family. */
190 //----------------------------------------------
191 inline int FAMILY::getNumberOfAttributes() const
192 //----------------------------------------------
194 return _numberOfAttribute ;
196 /*! Returns a pointer to attributes identifiers .
197 (There are _numberOfAttribute attributes) */
198 //---------------------------------------------------
199 inline int * FAMILY::getAttributesIdentifiers() const
200 //---------------------------------------------------
202 return _attributeIdentifier ;
204 /*! Returns identifer of the Ith attribute of the family./n
205 Note that they are numbered from 1 to N */
206 //----------------------------------------------------
207 inline int FAMILY::getAttributeIdentifier(int i) const
208 //----------------------------------------------------
210 return _attributeIdentifier[i-1] ;
212 /*! Returns a pointer to attributes values.
213 (There are _numberOfAttribute attributes)*/
214 //----------------------------------------------
215 inline int * FAMILY::getAttributesValues() const
216 //----------------------------------------------
218 return _attributeValue ;
220 /*! Returns value of the Ith attribute of the family./n
221 Note that they are numbered from 1 to N */
222 //-----------------------------------------------
223 inline int FAMILY::getAttributeValue(int i) const
224 //-----------------------------------------------
226 return _attributeValue[i-1] ;
228 //-------------------------------------------------------
229 inline string * FAMILY::getAttributesDescriptions() const
230 //-------------------------------------------------------
232 return _attributeDescription ;
234 /*! Returns description of the Ith attribute of the family/n
235 Note that they are numbered from 1 to N */
236 //--------------------------------------------------------
237 inline string FAMILY::getAttributeDescription(int i) const
238 //--------------------------------------------------------
240 return _attributeDescription[i-1] ;
242 /*! Returns the number of groups the family belongs to.*/
243 //------------------------------------------
244 inline int FAMILY::getNumberOfGroups() const
245 //------------------------------------------
247 return _numberOfGroup;
249 /*! Returns a pointer to the names of the groups the family belongs to */
250 //--------------------------------------------
251 inline string * FAMILY::getGroupsNames() const
252 //--------------------------------------------
256 /*! Returns the name of the Ith group the family belongs to./n
257 Note that they are numbered from 1 to N*/
258 //---------------------------------------------
259 inline string FAMILY::getGroupName(int i) const
260 //---------------------------------------------
262 return _groupName[i-1] ;
266 #endif /* FAMILY_HXX */