00001 // This file is part of ff3d - http://www.freefem.org/ff3d 00002 // Copyright (C) 2001, 2002, 2003 Stéphane Del Pino 00003 00004 // This program is free software; you can redistribute it and/or modify 00005 // it under the terms of the GNU General Public License as published by 00006 // the Free Software Foundation; either version 2, or (at your option) 00007 // any later version. 00008 00009 // This program 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 00012 // GNU General Public License for more details. 00013 00014 // You should have received a copy of the GNU General Public License 00015 // along with this program; if not, write to the Free Software Foundation, 00016 // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 00018 // $Id: FacesSet.hpp,v 1.2 2006/04/08 10:43:20 delpinux Exp $ 00019 00020 #ifndef FACES_SET_HPP 00021 #define FACES_SET_HPP 00022 00023 #include <Vector.hpp> 00024 00025 template <typename FaceType> 00026 class FacesSet 00027 { 00028 private: 00029 Vector<FaceType> __faces; 00030 public: 00031 00037 inline const size_t& numberOfFaces() const 00038 { 00039 return __faces.size(); 00040 } 00041 00049 inline void setNumberOfFaces(const size_t& size) 00050 { 00051 __faces.resize(size); 00052 } 00053 00061 inline const FaceType& operator[](const size_t& i) const 00062 { 00063 return __faces[i]; 00064 } 00065 00073 inline FaceType& operator[](const size_t& i) 00074 { 00075 return __faces[i]; 00076 } 00077 00085 size_t number(const FaceType& f) const 00086 { 00087 return __faces.number(f); 00088 } 00089 00095 FacesSet(const size_t& s) 00096 : __faces(s) 00097 { 00098 ; 00099 } 00100 00106 FacesSet(const FacesSet& F) 00107 : __faces(F.__faces) 00108 { 00109 ; 00110 } 00115 ~FacesSet() 00116 { 00117 ; 00118 } 00119 }; 00120 00121 #endif // FACES_SET_HPP
1.5.6