FixedList.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2017-2019 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::FixedList
29 
30 Description
31  A 1D vector of objects of type <T> with a fixed length <N>.
32 
33 SourceFiles
34  FixedList.C
35  FixedListI.H
36  FixedListIO.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef FixedList_H
41 #define FixedList_H
42 
43 #include "bool.H"
44 #include "label.H"
45 #include "uLabel.H"
46 #include "zero.H"
47 #include "contiguous.H"
48 #include "autoPtr.H"
49 #include "Swap.H"
50 #include "HashFwd.H"
51 #include "SLListFwd.H"
52 #include "ListPolicy.H"
53 
54 #include <initializer_list>
55 #include <iterator>
56 #include <type_traits>
57 #include <limits>
58 
59 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60 
61 namespace Foam
62 {
63 
64 // Forward Declarations
65 
66 template<class T, unsigned N> class FixedList;
67 template<class T> class UList;
68 
69 template<class T, unsigned N>
70 Istream& operator>>(Istream& is, FixedList<T, N>& list);
71 
72 
73 /*---------------------------------------------------------------------------*\
74  Class FixedList Declaration
75 \*---------------------------------------------------------------------------*/
76 
77 template<class T, unsigned N>
78 class FixedList
79 {
80  static_assert
81  (
83  "Size must be positive (non-zero) and fit as a signed int value"
84  );
85 
86  // Private Data
87 
88  //- Vector of values of type T of length N.
89  T v_[N];
90 
91 
92 protected:
93 
94  // Protected Member Functions
95 
96  //- Write the FixedList with its compound type
97  void writeEntry(Ostream& os) const;
98 
99 
100 public:
101 
102  // STL Type Definitions
103 
104  //- The value type the FixedList contains
105  typedef T value_type;
106 
107  //- The pointer type for non-const access to value_type items
108  typedef T* pointer;
109 
110  //- The pointer type for const access to value_type items
111  typedef const T* const_pointer;
112 
113  //- The type used for storing into value_type objects
114  typedef T& reference;
115 
116  //- The type used for reading from constant value_type objects.
117  typedef const T& const_reference;
118 
119  //- Random access iterator for traversing FixedList
120  typedef T* iterator;
121 
122  //- Random access iterator for traversing FixedList
123  typedef const T* const_iterator;
124 
125  //- The type to represent the size of a FixedList
126  typedef label size_type;
127 
128  //- The difference between iterator objects
129  typedef label difference_type;
130 
131  //- Reverse iterator (non-const access)
132  typedef std::reverse_iterator<iterator> reverse_iterator;
133 
134  //- Reverse iterator (const access)
135  typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
136 
137 
138  // Static Member Functions
139 
140  //- Return a null FixedList
141  inline static const FixedList<T, N>& null();
142 
143 
144  // Constructors
145 
146  //- Null constructor
147  inline FixedList() = default;
148 
149  //- Construct and initialize all entries to given value
150  inline explicit FixedList(const T& val);
151 
152  //- Construct and initialize all entries to zero
153  inline explicit FixedList(const zero);
154 
155  //- Copy construct from C-array
156  inline explicit FixedList(const T list[N]);
157 
158  //- Copy constructor
159  inline FixedList(const FixedList<T, N>& list);
160 
161  //- Move construct by using move assignment for the individual
162  //- list elements
163  inline FixedList(FixedList<T, N>&& list);
164 
165  //- Construct given begin/end iterators
166  // Uses std::distance when verifying the size.
167  template<class InputIterator>
168  inline FixedList(InputIterator begIter, InputIterator endIter);
169 
170  //- Construct from an initializer list
171  inline FixedList(std::initializer_list<T> list);
172 
173  //- Construct from UList
174  inline explicit FixedList(const UList<T>& list);
175 
176  //- Construct from SLList
177  inline explicit FixedList(const SLList<T>& list);
178 
179  //- Construct from Istream
180  explicit FixedList(Istream& is);
181 
182  //- Clone
183  inline autoPtr<FixedList<T, N>> clone() const;
184 
185 
186  // Member Functions
187 
188  // Access
189 
190  //- Return a const pointer to the first data element.
191  // Similar to the STL front() method and the string::data() method
192  // This can be used (with caution) when interfacing with C code
193  inline const T* cdata() const noexcept;
194 
195  //- Return a pointer to the first data element.
196  // Similar to the STL front() method and the string::data() method
197  // This can be used (with caution) when interfacing with C code
198  inline T* data() noexcept;
199 
200  //- The first element of the list, position [0]
201  inline T& first() noexcept;
202 
203  //- The first element of the list, position [0]
204  inline const T& first() const noexcept;
205 
206  //- The last element of the list, position [N-1]
207  inline T& last() noexcept;
208 
209  //- The last element of the list, position [N-1]
210  inline const T& last() const noexcept;
211 
212 
213  //- Return the forward circular index, i.e. next index
214  //- which returns to the first at the end of the list
215  inline label fcIndex(const label i) const;
216 
217  //- Return forward circular value (ie, next value in the list)
218  inline const T& fcValue(const label i) const;
219 
220  //- Return forward circular value (ie, next value in the list)
221  inline T& fcValue(const label i);
222 
223  //- Return the reverse circular index, i.e. previous index
224  //- which returns to the last at the beginning of the list
225  inline label rcIndex(const label i) const;
226 
227  //- Return reverse circular value (ie, previous value in the list)
228  inline const T& rcValue(const label i) const;
229 
230  //- Return reverse circular value (ie, previous value in the list)
231  inline T& rcValue(const label i);
232 
233 
234  // Check
235 
236  //- Check start is within valid range [0,size)
237  inline void checkStart(const label start) const;
238 
239  //- Check size is identical to template parameter N
240  inline void checkSize(const label size) const;
241 
242  //- Check index is within valid range [0,N)
243  inline void checkIndex(const label i) const;
244 
245  //- True if all entries have identical values, and list is non-empty
246  inline bool uniform() const;
247 
248 
249  // Search
250 
251  //- Find index of the first occurence of the value.
252  // Linear search.
253  // \return -1 if not found.
254  label find(const T& val, const label start=0) const;
255 
256  //- True if the value if found in the list. Linear search.
257  inline bool found(const T& val, const label start=0) const;
258 
259 
260  // Edit
261 
262  //- Dummy resize function, to make FixedList consistent with List
263  inline void resize(const label n);
264 
265  //- Dummy setSize function, to make FixedList consistent with List
266  inline void setSize(const label n);
267 
268  //- Move element to the first position.
269  void moveFirst(const label i);
270 
271  //- Move element to the last position.
272  void moveLast(const label i);
273 
274  //- Swap element with the first element.
275  void swapFirst(const label i);
276 
277  //- Swap element with the last element.
278  void swapLast(const label i);
279 
280  //- Transfer by swapping using a move assignment for the content
281  //- of the individual list elements
282  inline void transfer(FixedList<T, N>& list);
283 
284 
285  // Member Operators
286 
287  //- Return element of FixedList
288  inline T& operator[](const label i);
289 
290  //- Return element of constant FixedList
291  inline const T& operator[](const label i) const;
292 
293  //- Assignment to array operator. Takes linear time
294  inline void operator=(const T list[N]);
295 
296  //- Assignment to UList operator. Takes linear time
297  inline void operator=(const UList<T>& list);
298 
299  //- Assignment to SLList operator. Takes linear time
300  inline void operator=(const SLList<T>& list);
301 
302  //- Assignment to an initializer list. Takes linear time
303  inline void operator=(std::initializer_list<T> list);
304 
305  //- Assignment of all entries to the given value
306  inline void operator=(const T& val);
307 
308  //- Copy assignment
309  inline void operator=(const FixedList<T, N>& list);
310 
311  //- Move assignment
312  inline void operator=(FixedList<T, N>&& list);
313 
314 
315  // Random access iterator (non-const)
316 
317  //- Return an iterator to begin traversing the FixedList
318  inline iterator begin();
319 
320  //- Return an iterator to end traversing the FixedList
321  inline iterator end();
322 
323 
324  // Random access iterator (const)
325 
326  //- Return const_iterator to begin traversing the constant FixedList
327  inline const_iterator cbegin() const;
328 
329  //- Return const_iterator to end traversing the constant FixedList
330  inline const_iterator cend() const;
331 
332  //- Return const_iterator to begin traversing the constant FixedList
333  inline const_iterator begin() const;
334 
335  //- Return const_iterator to end traversing the constant FixedList
336  inline const_iterator end() const;
337 
338 
339  // Reverse iterator (non-const)
340 
341  //- Return reverse_iterator to begin reverse traversing the FixedList
342  inline reverse_iterator rbegin();
343 
344  //- Return reverse_iterator to end reverse traversing the FixedList
345  inline reverse_iterator rend();
346 
347 
348  // Reverse iterator (const)
349 
350  //- Return const_reverse_iterator to begin reverse traversing FixedList
351  inline const_reverse_iterator crbegin() const;
352 
353  //- Return const_reverse_iterator to end reverse traversing FixedList
354  inline const_reverse_iterator crend() const;
355 
356  //- Return const_reverse_iterator to begin reverse traversing FixedList
357  inline const_reverse_iterator rbegin() const;
358 
359  //- Return const_reverse_iterator to end reverse traversing FixedList
360  inline const_reverse_iterator rend() const;
361 
362 
363  // STL Member Functions
364 
365  //- Always false since zero-sized FixedList is compile-time disabled.
366  static constexpr bool empty() noexcept { return !N; }
367 
368  //- Return the number of elements in the FixedList
369  static constexpr label size() noexcept { return N; }
370 
371  //- The dimensioned size (template parameter N) of the FixedList
372  static constexpr unsigned max_size() noexcept { return N; }
373 
374  //- Swap lists by swapping the content of the individual list elements
375  inline void swap(FixedList<T, N>& list);
376 
377 
378  // STL Member Operators
379 
380  //- Equality operation on FixedLists of the same type.
381  // Returns true when the FixedLists are element-wise equal
382  // (using FixedList::value_type::operator==). Takes linear time
383  bool operator==(const FixedList<T, N>& list) const;
384 
385  //- The opposite of the equality operation. Takes linear time
386  bool operator!=(const FixedList<T, N>& list) const;
387 
388  //- Compare two FixedLists lexicographically. Takes linear time
389  bool operator<(const FixedList<T, N>& list) const;
390 
391  //- Compare two FixedLists lexicographically. Takes linear time
392  bool operator>(const FixedList<T, N>& list) const;
393 
394  //- Return true if !(a > b). Takes linear time
395  bool operator<=(const FixedList<T, N>& list) const;
396 
397  //- Return true if !(a < b). Takes linear time
398  bool operator>=(const FixedList<T, N>& list) const;
399 
400 
401  // Writing
402 
403  //- Write the list as a dictionary entry with keyword
404  void writeEntry(const word& keyword, Ostream& os) const;
405 
406  //- Write List, with line-breaks in ASCII when length exceeds shortLen.
407  // Using '0' suppresses line-breaks entirely.
408  Ostream& writeList(Ostream& os, const label shortLen=0) const;
409 
410 
411  // IOstream Operators
412 
413  //- Read from Istream, discarding contents of existing List
414  friend Istream& operator>> <T, N>
415  (
416  Istream& is,
417  FixedList<T, N>& list
418  );
419 
420 
421  // Hashing
422 
423  //- Hashing function class for FixedList
424  // Normally use the global Hash specialization, but can also use
425  // this one for inheritance in sub-classes
426  template<class HashT=Foam::Hash<T>>
427  struct Hash
428  {
429  inline unsigned operator()
430  (
431  const FixedList<T, N>& obj,
432  unsigned seed=0
433  ) const
434  {
436  {
437  return Hasher(obj.cdata(), N*sizeof(T), seed);
438  }
439 
440  for (const T& val : obj)
441  {
442  seed = HashT()(val, seed);
443  }
444  return seed;
445  }
446  };
447 };
448 
449 // * * * * * * * * * * * * * * * * * Traits * * * * * * * * * * * * * * * * //
450 
451 //- FixedList is contiguous if the type is contiguous
452 template<class T, unsigned N>
453 struct is_contiguous<FixedList<T, N>> : is_contiguous<T> {};
454 
455 //- Check for FixedList of labels
456 template<class T, unsigned N>
458 
459 //- Check for FixedList of scalars
460 template<class T, unsigned N>
462 
463 
464 // * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * * //
465 
466 //- Swap FixedList contents - see FixedList::swap().
467 // Internally this actually swaps the individual list elements
468 template<class T, unsigned N>
469 inline void Swap(FixedList<T, N>& lhs, FixedList<T, N>& rhs);
470 
471 
472 //- Hashing for FixedList data, which uses Hasher for contiguous data and
473 //- element-wise incrementally hashing otherwise.
474 template<class T, unsigned N>
475 struct Hash<FixedList<T, N>>
476 {
477  inline unsigned operator()
478  (
479  const FixedList<T, N>& obj,
480  unsigned seed=0
481  ) const
482  {
484  {
485  return Hasher(obj.cdata(), N*sizeof(T), seed);
486  }
487 
488  for (const T& val : obj)
489  {
490  seed = Hash<T>()(val, seed);
491  }
492  return seed;
493  }
494 };
495 
496 
497 // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
498 
499 //- Write List to Ostream, as per FixedList::writeList() with default length.
500 // The default short-length is given by Detail::ListPolicy::short_length
501 template<class T, unsigned N>
502 Ostream& operator<<(Ostream& os, const FixedList<T, N>& list)
503 {
504  return list.writeList(os, Detail::ListPolicy::short_length<T>::value);
505 }
506 
507 
508 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
509 
510 } // End namespace Foam
511 
512 
513 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
514 
515 #include "FixedListI.H"
516 
517 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
518 
519 #ifdef NoRepository
520  #include "FixedList.C"
521 #endif
522 
523 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
524 
525 #endif
526 
527 // ************************************************************************* //
Foam::FixedList::fcValue
const T & fcValue(const label i) const
Return forward circular value (ie, next value in the list)
Definition: FixedListI.H:215
Foam::FixedList::clone
autoPtr< FixedList< T, N > > clone() const
Clone.
Definition: FixedListI.H:155
Foam::val
label ListType::const_reference val
Definition: ListOps.H:407
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::FixedList::writeEntry
void writeEntry(Ostream &os) const
Write the FixedList with its compound type.
Definition: FixedListIO.C:37
Foam::FixedList::swapLast
void swapLast(const label i)
Swap element with the last element.
Definition: FixedList.C:95
Foam::FixedList::begin
iterator begin()
Return an iterator to begin traversing the FixedList.
Definition: FixedListI.H:473
Foam::FixedList::crbegin
const_reverse_iterator crbegin() const
Return const_reverse_iterator to begin reverse traversing FixedList.
Definition: FixedListI.H:537
Foam::FixedList::checkIndex
void checkIndex(const label i) const
Check index is within valid range [0,N)
Definition: FixedListI.H:275
Foam::Hasher
unsigned Hasher(const void *data, size_t len, unsigned seed=0)
Bob Jenkins's 96-bit mixer hashing function (lookup3)
Definition: Hasher.C:473
Foam::FixedList::transfer
void transfer(FixedList< T, N > &list)
Definition: FixedListI.H:347
Foam::FixedList::last
T & last() noexcept
The last element of the list, position [N-1].
Definition: FixedListI.H:194
Foam::FixedList::operator<=
bool operator<=(const FixedList< T, N > &list) const
Return true if !(a > b). Takes linear time.
Definition: FixedList.C:169
Foam::FixedList::const_pointer
const typedef T * const_pointer
The pointer type for const access to value_type items.
Definition: FixedList.H:110
Foam::FixedList::max_size
static constexpr unsigned max_size() noexcept
The dimensioned size (template parameter N) of the FixedList.
Definition: FixedList.H:371
Foam::FixedList::cdata
const T * cdata() const noexcept
Return a const pointer to the first data element.
Definition: FixedListI.H:165
Foam::FixedList::checkStart
void checkStart(const label start) const
Check start is within valid range [0,size)
Definition: FixedListI.H:250
Foam::FixedList::pointer
T * pointer
The pointer type for non-const access to value_type items.
Definition: FixedList.H:107
Foam::FixedList::size
static constexpr label size() noexcept
Return the number of elements in the FixedList.
Definition: FixedList.H:368
Foam::FixedList::size_type
label size_type
The type to represent the size of a FixedList.
Definition: FixedList.H:125
FixedListI.H
Foam::operator>>
Istream & operator>>(Istream &, directionInfo &)
Definition: directionInfo.C:228
Foam::FixedList::operator!=
bool operator!=(const FixedList< T, N > &list) const
The opposite of the equality operation. Takes linear time.
Definition: FixedList.C:155
Foam::FixedList::resize
void resize(const label n)
Dummy resize function, to make FixedList consistent with List.
Definition: FixedListI.H:315
ListPolicy.H
Foam::Swap
void Swap(DynamicList< T, SizeMin1 > &a, DynamicList< T, SizeMin2 > &b)
Definition: DynamicListI.H:909
Foam::FixedList::difference_type
label difference_type
The difference between iterator objects.
Definition: FixedList.H:128
Foam::FixedList::fcIndex
label fcIndex(const label i) const
Definition: FixedListI.H:208
Foam::is_contiguous_label
A template class to specify if a data type is composed solely of Foam::label elements.
Definition: contiguous.H:83
Foam::FixedList::reference
T & reference
The type used for storing into value_type objects.
Definition: FixedList.H:113
Swap.H
Swap arguments as per std::swap, but in Foam namespace.
Foam::FixedList::first
T & first() noexcept
The first element of the list, position [0].
Definition: FixedListI.H:180
Foam::LList
Template class for non-intrusive linked lists.
Definition: LList.H:54
Foam::FixedList::found
bool found(const T &val, const label start=0) const
True if the value if found in the list. Linear search.
Definition: FixedListI.H:305
Foam::uniform
Definition: uniform.H:50
n
label n
Definition: TABSMDCalcMethod2.H:31
Foam::Hash
Hash function class. The default definition is for primitives, non-primitives used to hash entries on...
Definition: Hash.H:55
Foam::FixedList::operator==
bool operator==(const FixedList< T, N > &list) const
Equality operation on FixedLists of the same type.
Definition: FixedList.C:111
SLListFwd.H
Forward declarations for SLList.
Foam::FixedList::operator<
bool operator<(const FixedList< T, N > &list) const
Compare two FixedLists lexicographically. Takes linear time.
Definition: FixedList.C:131
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:62
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::FixedList::iterator
T * iterator
Random access iterator for traversing FixedList.
Definition: FixedList.H:119
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
Foam::Detail::ListPolicy::short_length
Number of items before requiring line-breaks in the list ouput.
Definition: ListPolicy.H:61
Foam::FixedList::rcValue
const T & rcValue(const label i) const
Return reverse circular value (ie, previous value in the list)
Definition: FixedListI.H:236
Foam::FixedList::cend
const_iterator cend() const
Return const_iterator to end traversing the constant FixedList.
Definition: FixedListI.H:513
Foam::FixedList::const_reference
const typedef T & const_reference
The type used for reading from constant value_type objects.
Definition: FixedList.H:116
Foam::FixedList::find
label find(const T &val, const label start=0) const
Find index of the first occurence of the value.
Definition: FixedList.C:36
bool.H
System bool.
zero.H
Foam::max
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:47
Foam::FixedList::crend
const_reverse_iterator crend() const
Return const_reverse_iterator to end reverse traversing FixedList.
Definition: FixedListI.H:561
Foam::FixedList::moveFirst
void moveFirst(const label i)
Move element to the first position.
Definition: FixedList.C:59
Foam::FixedList::value_type
T value_type
The value type the FixedList contains.
Definition: FixedList.H:104
Foam::FixedList::rend
reverse_iterator rend()
Return reverse_iterator to end reverse traversing the FixedList.
Definition: FixedListI.H:545
Foam::FixedList::setSize
void setSize(const label n)
Dummy setSize function, to make FixedList consistent with List.
Definition: FixedListI.H:323
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::is_contiguous_scalar
A template class to specify if a data type is composed solely of Foam::scalar elements.
Definition: contiguous.H:91
Foam::FixedList::const_reverse_iterator
std::reverse_iterator< const_iterator > const_reverse_iterator
Reverse iterator (const access)
Definition: FixedList.H:134
Foam::FixedList::end
iterator end()
Return an iterator to end traversing the FixedList.
Definition: FixedListI.H:497
Foam::FixedList::cbegin
const_iterator cbegin() const
Return const_iterator to begin traversing the constant FixedList.
Definition: FixedListI.H:489
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::FixedList::operator>
bool operator>(const FixedList< T, N > &list) const
Compare two FixedLists lexicographically. Takes linear time.
Definition: FixedList.C:162
Foam::FixedList::writeList
Ostream & writeList(Ostream &os, const label shortLen=0) const
Write List, with line-breaks in ASCII when length exceeds shortLen.
Definition: FixedListIO.C:68
Foam::FixedList::operator>=
bool operator>=(const FixedList< T, N > &list) const
Return true if !(a < b). Takes linear time.
Definition: FixedList.C:176
Foam::FixedList::Hash
Hashing function class for FixedList.
Definition: FixedList.H:426
label.H
contiguous.H
Foam::FixedList::swapFirst
void swapFirst(const label i)
Swap element with the first element.
Definition: FixedList.C:83
Foam::start
label ListType::const_reference const label start
Definition: ListOps.H:408
Foam::FixedList
A 1D vector of objects of type <T> with a fixed length <N>.
Definition: HashTable.H:104
Foam::UList
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition: HashTable.H:103
Foam::FixedList::FixedList
FixedList()=default
Null constructor.
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
N
const Vector< label > N(dict.get< Vector< label >>("N"))
Foam::FixedList::const_iterator
const typedef T * const_iterator
Random access iterator for traversing FixedList.
Definition: FixedList.H:122
Foam::FixedList::empty
static constexpr bool empty() noexcept
Always false since zero-sized FixedList is compile-time disabled.
Definition: FixedList.H:365
uLabel.H
Foam::FixedList::checkSize
void checkSize(const label size) const
Check size is identical to template parameter N.
Definition: FixedListI.H:263
Foam::FixedList::reverse_iterator
std::reverse_iterator< iterator > reverse_iterator
Reverse iterator (non-const access)
Definition: FixedList.H:131
Foam::FixedList::rcIndex
label rcIndex(const label i) const
Definition: FixedListI.H:229
Foam::data
Database for solution data, solver performance and other reduced data.
Definition: data.H:54
HashFwd.H
Forward definition for Hash function class and the definition for the Hasher function.
Foam::operator<<
Ostream & operator<<(Ostream &, const boundaryPatch &)
Definition: boundaryPatch.C:102
FixedList.C
Foam::FixedList::rbegin
reverse_iterator rbegin()
Return reverse_iterator to begin reverse traversing the FixedList.
Definition: FixedListI.H:521
Foam::is_contiguous
A template class to specify that a data type can be considered as being contiguous in memory.
Definition: contiguous.H:75
Foam::FixedList::swap
void swap(FixedList< T, N > &list)
Swap lists by swapping the content of the individual list elements.
Definition: FixedListI.H:332
Foam::zero
A class representing the concept of 0 (zero), which can be used to avoid manipulating objects that ar...
Definition: zero.H:61
Foam::FixedList::moveLast
void moveLast(const label i)
Move element to the last position.
Definition: FixedList.C:71
autoPtr.H