1 // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/
30 #include "MEDMEM_Family.hxx"
35 This class describe a group of elements on an entity.\n
36 It inherits from SUPPORT.\n
37 It is a blending of some FAMILY class.\n\n
43 class GROUP : virtual public SUPPORT
48 Number of families in the group.
51 int _numberOfFamilies ;
54 Vector of families in the group.
55 Note that Families are numbered from 1 to N.
58 vector<FAMILY*> _family ;
64 GROUP(const string & name, const list<FAMILY*> & family) throw (MEDEXCEPTION) ;
65 /*! Copy Constructor. */
66 GROUP(const GROUP & m);
71 // PN ATTention il n y a pas de copie du vecteur Family ????
72 GROUP & operator=(const GROUP &group);
75 friend ostream & operator<<(ostream &os, GROUP &my) ;
77 inline void setNumberOfFamilies(int numberOfFamilies);
78 inline void setFamilies(vector<FAMILY*> Family);
80 inline int getNumberOfFamilies() const ;
81 inline vector<FAMILY*> getFamilies() const ;
82 inline FAMILY * getFamily(int i) const ;
88 /*! set the attribut _numberOfFamilies to numberOfFamilies */
89 //----------------------------------------------------------
90 inline void GROUP::setNumberOfFamilies(int numberOfFamilies)
91 //----------------------------------------------------------
93 _numberOfFamilies = numberOfFamilies;
97 /*! set the attribut _family to Family */
98 //----------------------------------------------------
99 inline void GROUP::setFamilies(vector<FAMILY*> Family)
100 //----------------------------------------------------
105 /*! returns number of families in the group */
106 //--------------------------------------------
107 inline int GROUP::getNumberOfFamilies() const
108 //-------------------------------------------
110 return _numberOfFamilies;
113 /*! returns the vector of families in the group */
114 //------------------------------------------------
115 inline vector<FAMILY*> GROUP::getFamilies() const
116 //------------------------------------------------
121 /*! returns a reference on family I of the group */
122 //--------------------------------------------------
123 FAMILY * GROUP::getFamily(int i) const
124 //--------------------------------------------------
128 }//End namespace MEDMEM
130 #endif /* GROUP_HXX */