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: BoundaryConditionSet.hpp,v 1.4 2007/05/20 23:02:47 delpinux Exp $ 00019 00020 #ifndef BOUNDARYCONDITIONSET_HPP 00021 #define BOUNDARYCONDITIONSET_HPP 00022 00023 #include <vector> 00024 #include <BoundaryCondition.hpp> 00025 00035 class BoundaryConditionSet 00036 { 00037 private: 00038 std::vector<ConstReferenceCounting<BoundaryCondition> > 00039 __boundaryConditionSet; 00041 public: 00047 void addBoundaryCondition(ConstReferenceCounting<BoundaryCondition> bc) 00048 { 00049 __boundaryConditionSet.push_back(bc); 00050 } 00051 00057 size_t nbBoundaryCondition() const 00058 { 00059 return __boundaryConditionSet.size(); 00060 } 00061 00069 const BoundaryCondition& operator[] (const size_t i) const 00070 { 00071 ASSERT(i<__boundaryConditionSet.size()); 00072 return *(__boundaryConditionSet[i]); 00073 } 00074 00083 friend std::ostream& 00084 operator << (std::ostream& os, 00085 const BoundaryConditionSet& bcSet) 00086 { 00087 for(size_t i=0; i<bcSet.__boundaryConditionSet.size(); ++i) 00088 os << *(bcSet.__boundaryConditionSet[i]) << '\n'; 00089 return os; 00090 } 00091 00097 BoundaryConditionSet(const BoundaryConditionSet& bcSet) 00098 : __boundaryConditionSet(bcSet.__boundaryConditionSet) 00099 { 00100 ; 00101 } 00102 00107 BoundaryConditionSet() 00108 { 00109 ; 00110 } 00111 00116 ~BoundaryConditionSet() 00117 { 00118 ; 00119 } 00120 }; 00121 00122 #endif // BOUNDARYCONDITIONSET_HPP 00123
1.5.6