UILList.C
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #include "UILList.H"
00030
00031
00032
00033 template<class LListBase, class T>
00034 Foam::UILList<LListBase, T>::UILList(const UILList<LListBase, T>& lst)
00035 {
00036 for (const_iterator iter = lst.begin(); iter != lst.end(); ++iter)
00037 {
00038 append(&iter());
00039 }
00040 }
00041
00042
00043
00044
00045 template<class LListBase, class T>
00046 void Foam::UILList<LListBase, T>::operator=(const UILList<LListBase, T>& rhs)
00047 {
00048 LListBase::clear();
00049
00050 for (const_iterator iter = rhs.begin(); iter != rhs.end(); ++iter)
00051 {
00052 append(&iter());
00053 }
00054 }
00055
00056
00057 template<class LListBase, class T>
00058 bool Foam::UILList<LListBase, T>::operator==
00059 (
00060 const UILList<LListBase, T>& rhs
00061 ) const
00062 {
00063 if (this->size() != rhs.size())
00064 {
00065 return false;
00066 }
00067
00068 bool equal = true;
00069
00070 const_iterator iter1 = this->begin();
00071 const_iterator iter2 = rhs.begin();
00072
00073 for (; iter1 != this->end(); ++iter1, ++iter2)
00074 {
00075 equal = equal && iter1() == iter2();
00076 }
00077
00078 return equal;
00079 }
00080
00081
00082
00083 template<class LListBase, class T>
00084 bool Foam::UILList<LListBase, T>::operator!=
00085 (
00086 const UILList<LListBase, T>& rhs
00087 ) const
00088 {
00089 return !operator==(rhs);
00090 }
00091
00092
00093
00094
00095 #include "UILListIO.C"
00096
00097
00098
Copyright © 2000-2009 OpenCFD Ltd