00001 // This file is part of ff3d - http://www.freefem.org/ff3d 00002 // Copyright (C) 2003 Pascal Havé 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: BoundaryList.hpp,v 1.2 2006/11/02 15:41:25 delpinux Exp $ 00019 00020 #ifndef BOUNDARY_LIST_HPP 00021 #define BOUNDARY_LIST_HPP 00022 00023 #include <Boundary.hpp> 00024 #include <list> 00025 00035 class BoundaryList 00036 : public Boundary 00037 { 00038 public: 00039 typedef std::list<ReferenceCounting<Boundary> > List; 00040 00041 private: 00042 std::list<ReferenceCounting<Boundary> > __list; 00043 00044 void put(std::ostream& os) const 00045 { 00046 for (List::const_iterator i = __list.begin(); 00047 i != __list.end(); ++i) { 00048 os << **i << ','; 00049 } 00050 os << "\b "; 00051 } 00052 00053 public: 00054 const List& list() const 00055 { 00056 return __list; 00057 } 00058 00059 void add(ReferenceCounting<Boundary> b) 00060 { 00061 __list.push_back(b); 00062 } 00063 00064 BoundaryList(const BoundaryList& B) 00065 : Boundary(B), 00066 __list(B.__list) 00067 { 00068 ; 00069 } 00070 00071 BoundaryList() 00072 : Boundary(Boundary::list) 00073 { 00074 ; 00075 } 00076 00077 ~BoundaryList() 00078 { 00079 ; 00080 } 00081 }; 00082 00083 #endif // BOUNDARY_LIST_HPP
1.5.6