1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
28 inline Foam::PackedBoolList::PackedBoolList()
34 inline Foam::PackedBoolList::PackedBoolList(const label size)
40 inline Foam::PackedBoolList::PackedBoolList
46 PackedList<1>(size, (val ? 1u : 0u))
50 inline Foam::PackedBoolList::PackedBoolList(const PackedBoolList& lst)
56 inline Foam::PackedBoolList::PackedBoolList(const PackedList<1>& lst)
62 inline Foam::PackedBoolList::PackedBoolList(const Xfer<PackedBoolList>& lst)
70 inline Foam::PackedBoolList::PackedBoolList(const Xfer<PackedList<1> >& lst)
76 inline Foam::PackedBoolList::PackedBoolList(const Foam::UList<bool>& lst)
84 inline Foam::PackedBoolList::PackedBoolList(const labelUList& indices)
86 PackedList<1>(indices.size(), 0u)
92 inline Foam::PackedBoolList::PackedBoolList(const UIndirectList<label>& indices)
94 PackedList<1>(indices.size(), 0u)
100 inline Foam::autoPtr<Foam::PackedBoolList>
101 Foam::PackedBoolList::clone() const
103 return autoPtr<PackedBoolList>(new PackedBoolList(*this));
107 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
109 inline void Foam::PackedBoolList::transfer(PackedBoolList& lst)
111 PackedList<1>::transfer(static_cast<PackedList<1>&>(lst));
115 inline void Foam::PackedBoolList::transfer(PackedList<1>& lst)
117 PackedList<1>::transfer(lst);
121 inline Foam::Xfer<Foam::PackedBoolList> Foam::PackedBoolList::xfer()
123 return xferMove(*this);
127 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
129 inline Foam::PackedBoolList&
130 Foam::PackedBoolList::operator=(const bool val)
132 PackedList<1>::operator=(val);
137 inline Foam::PackedBoolList&
138 Foam::PackedBoolList::operator=(const PackedBoolList& lst)
140 PackedList<1>::operator=(lst);
145 inline Foam::PackedBoolList&
146 Foam::PackedBoolList::operator=(const PackedList<1>& lst)
148 PackedList<1>::operator=(lst);
153 inline Foam::PackedBoolList&
154 Foam::PackedBoolList::operator=(const labelUList& indices)
163 inline Foam::PackedBoolList&
164 Foam::PackedBoolList::operator=(const UIndirectList<label>& indices)
173 inline Foam::PackedBoolList
174 Foam::PackedBoolList::operator~() const
176 PackedBoolList result(*this);
183 inline Foam::PackedBoolList&
184 Foam::PackedBoolList::operator&=(const PackedList<1>& lst)
191 inline Foam::PackedBoolList&
192 Foam::PackedBoolList::operator&=(const labelUList& indices)
199 inline Foam::PackedBoolList&
200 Foam::PackedBoolList::operator&=(const UIndirectList<label>& indices)
207 inline Foam::PackedBoolList&
208 Foam::PackedBoolList::operator|=(const PackedList<1>& lst)
215 inline Foam::PackedBoolList&
216 Foam::PackedBoolList::operator|=(const labelUList& indices)
223 inline Foam::PackedBoolList&
224 Foam::PackedBoolList::operator|=(const UIndirectList<label>& indices)
231 inline Foam::PackedBoolList&
232 Foam::PackedBoolList::operator+=(const PackedList<1>& lst)
234 return operator|=(lst);
238 inline Foam::PackedBoolList&
239 Foam::PackedBoolList::operator+=(const labelUList& indices)
241 return operator|=(indices);
245 inline Foam::PackedBoolList&
246 Foam::PackedBoolList::operator+=(const UIndirectList<label>& indices)
248 return operator|=(indices);
252 inline Foam::PackedBoolList&
253 Foam::PackedBoolList::operator-=(const PackedList<1>& lst)
260 inline Foam::PackedBoolList&
261 Foam::PackedBoolList::operator-=(const labelUList& indices)
268 inline Foam::PackedBoolList&
269 Foam::PackedBoolList::operator-=(const UIndirectList<label>& indices)
276 // ************************************************************************* //