src/MEDMEM/MEDMEM_Group.hxx

Go to the documentation of this file.
00001 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00002 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00003 // 
00004 // This library is free software; you can redistribute it and/or
00005 // modify it under the terms of the GNU Lesser General Public
00006 // License as published by the Free Software Foundation; either 
00007 // version 2.1 of the License.
00008 // 
00009 // This library is distributed in the hope that it will be useful 
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
00012 // Lesser General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU Lesser General Public  
00015 // License along with this library; if not, write to the Free Software 
00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00017 //
00018 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00019 //
00020 /*
00021  File Group.hxx
00022  $Header: /home/server/cvs/MED/MED_SRC/src/MEDMEM/MEDMEM_Group.hxx,v 1.9 2006/06/01 11:21:17 jfa Exp $
00023 */
00024 
00025 #ifndef GROUP_HXX
00026 #define GROUP_HXX
00027 
00028 #include <vector>
00029 #include <list>
00030 #include "MEDMEM_Family.hxx"
00031 
00032 
00041 namespace MEDMEM {
00042 class FAMILY;
00043 class GROUP : virtual public SUPPORT
00044 {
00045 protected :
00051   int             _numberOfFamilies ;
00058   vector<FAMILY*> _family ;
00059   
00060 public:
00062   GROUP();
00064   GROUP(const string & name, const list<FAMILY*> & family) throw (MEDEXCEPTION) ;
00066   GROUP(const GROUP & m);
00068   virtual ~GROUP();
00069 
00071   // PN ATTention il n y a pas de copie du vecteur Family ????
00072   GROUP & operator=(const GROUP &group);
00073 
00075   friend ostream & operator<<(ostream &os, GROUP &my) ;
00076 
00077   inline void setNumberOfFamilies(int numberOfFamilies);
00078   inline void setFamilies(vector<FAMILY*> Family);
00079   
00080   inline int            getNumberOfFamilies() const ;
00081   inline vector<FAMILY*> getFamilies() const ;
00082   inline FAMILY *    getFamily(int i) const ;
00083 
00084 };
00085 
00086 // inline method :
00087 
00089 //----------------------------------------------------------
00090 inline void GROUP::setNumberOfFamilies(int numberOfFamilies) 
00091 //----------------------------------------------------------
00092 {
00093   _numberOfFamilies = numberOfFamilies; 
00094 };
00095 
00096 
00098 //----------------------------------------------------
00099 inline void GROUP::setFamilies(vector<FAMILY*> Family) 
00100 //----------------------------------------------------
00101 { 
00102   _family = Family; 
00103 };
00104 
00106 //--------------------------------------------
00107 inline int GROUP::getNumberOfFamilies() const        
00108 //-------------------------------------------
00109 { 
00110   return _numberOfFamilies; 
00111 };
00112 
00114 //------------------------------------------------
00115 inline vector<FAMILY*> GROUP::getFamilies() const 
00116 //------------------------------------------------
00117 { 
00118   return _family; 
00119 };
00120 
00122 //--------------------------------------------------
00123 FAMILY * GROUP::getFamily(int i) const   
00124 //--------------------------------------------------
00125 { 
00126   return _family[i-1]; 
00127 };
00128 }//End namespace MEDMEM
00129 
00130 #endif /* GROUP_HXX */