1 // Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
34 #include "MEDMEM_Family.hxx"
39 This class describe a group of elements on an entity.\n
40 It inherits from SUPPORT.\n
41 It is a blending of some FAMILY class.\n\n
48 MEDMEM_EXPORT std::ostream & operator<<(std::ostream &os, GROUP &my) ;
50 class MEDMEM_EXPORT GROUP : virtual public SUPPORT
55 Number of families in the group.
58 int _numberOfFamilies ;
61 Vector of families in the group.
62 Note that Families are numbered from 1 to N.
65 std::vector<FAMILY*> _family ;
74 GROUP(const std::string & name, const std::list<FAMILY*> & family) throw (MEDEXCEPTION) ;
75 /*! Copy Constructor. */
76 GROUP(const GROUP & m);
79 // PN ATTention il n y a pas de copie du vecteur Family ????
80 GROUP & operator=(const GROUP &group);
83 friend std::ostream & operator<<(std::ostream &os, GROUP &my) ;
85 inline void setNumberOfFamilies(int numberOfFamilies);
86 inline void setFamilies(std::vector<FAMILY*> Family);
88 inline int getNumberOfFamilies() const ;
89 inline std::vector<FAMILY*> getFamilies() const ;
90 inline FAMILY * getFamily(int i) const ;
96 /*! set the attribut _numberOfFamilies to numberOfFamilies */
97 //----------------------------------------------------------
98 inline void GROUP::setNumberOfFamilies(int numberOfFamilies)
99 //----------------------------------------------------------
101 _numberOfFamilies = numberOfFamilies;
105 /*! set the attribut _family to Family */
106 //----------------------------------------------------
107 inline void GROUP::setFamilies(std::vector<FAMILY*> Family)
108 //----------------------------------------------------
113 /*! returns number of families in the group */
114 //--------------------------------------------
115 inline int GROUP::getNumberOfFamilies() const
116 //-------------------------------------------
118 return _numberOfFamilies;
121 /*! returns the vector of families in the group */
122 //------------------------------------------------
123 inline std::vector<FAMILY*> GROUP::getFamilies() const
124 //------------------------------------------------
129 /*! returns a reference on family I of the group */
130 //--------------------------------------------------
131 FAMILY * GROUP::getFamily(int i) const
132 //--------------------------------------------------
136 }//End namespace MEDMEM
138 #endif /* GROUP_HXX */