Go to the documentation of this file.
42 #ifndef IndirectListBase_H
43 #define IndirectListBase_H
56 template<
class T,
class Addr>
73 template<
class ListType>
74 inline void copyList(
const ListType& rhs);
126 inline label
size() const noexcept
132 inline bool empty() const noexcept
134 return addr_.empty();
150 inline const Addr&
addressing() const noexcept
159 inline const T&
first()
const;
165 inline const T&
last()
const;
172 inline label
fcIndex(
const label i)
const;
176 inline label
rcIndex(
const label i)
const;
179 inline const T&
fcValue(
const label i)
const;
185 inline const T&
rcValue(
const label i)
const;
197 label
find(
const T& val, label
pos = 0)
const;
203 label
rfind(
const T& val, label
pos = -1)
const;
208 inline bool found(
const T& val, label
pos=0)
const;
238 template<
class AnyAddr>
248 typename addressing_type::const_iterator iter_;
261 typename addressing_type::const_iterator baseIter
270 return data_[*iter_];
281 return iter_ == rhs.iter_;
286 return (iter_ != rhs.iter_);
295 typename addressing_type::const_iterator iter_;
308 typename addressing_type::const_iterator baseIter
317 return data_[*iter_];
328 return iter_ == rhs.iter_;
333 return iter_ != rhs.iter_;
392 template<
class T,
class Addr>
const typedef T * const_pointer
The pointer type for const access to value_type items.
iterator end()
Return an iterator at end of list.
T value_type
Type of values the list contains.
const_iterator & operator++()
List< T > operator()() const
Return the addressed elements as a List.
reference operator*() const
iterator(UList< T > &list, typename addressing_type::const_iterator baseIter)
const UList< T > & values() const noexcept
The list of values (without addressing)
void copyList(const ListType &rhs)
Deep copy values from the list.
label rfind(const T &val, label pos=-1) const
Find index of the last occurrence of the value.
const typedef T & const_reference
The type used for reading from constant value_type objects.
label rcIndex(const label i) const
const_iterator(const UList< T > &list, typename addressing_type::const_iterator baseIter)
const Addr & addressing() const noexcept
The addressing used for the list.
bool operator!=(const_iterator &rhs) const
reference operator*() const
bool operator==(const_iterator &rhs) const
T * pointer
The pointer type for non-const access to value_type items.
A non-const iterator for an indirect list.
T & operator[](const label i)
Non-const access to an element in the list.
label fcIndex(const label i) const
const T & rcValue(const label i) const
Return reverse circular value (ie, previous value in the list)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
const T & last() const
The last element of the list.
T & reference
The type used for storing into value_type objects.
iterator begin() noexcept
Return an iterator to begin traversing the UList.
const_iterator cend() const noexcept
Return const_iterator to end traversing the constant UList.
IndirectListBase()=delete
No default construct.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Number of items before requiring line-breaks in the list output.
std::forward_iterator_tag iterator_category
bool empty() const noexcept
True if the list is empty (ie, size() is zero).
bool operator==(iterator &rhs) const
Addr addressing_type
The addressing type (non-stl definition)
std::forward_iterator_tag iterator_category
label find(const T &val, label pos=0) const
Find index of the first occurrence of the value.
OBJstream os(runTime.globalPath()/outputName)
label size() const noexcept
The number of elements in the list.
const_iterator end() const
Return a const_iterator at end of list.
bool operator!=(iterator &rhs) const
iterator begin()
Return an iterator at begin of list.
const T & fcValue(const label i) const
Return forward circular value (ie, next value in the list)
label size_type
The type to represent the size of a UList.
UList< T > & values() noexcept
The list of values (without addressing)
const_iterator cbegin() const noexcept
Return const_iterator to begin traversing the constant UList.
const_iterator cend() const
Return a const_iterator at end of list.
bool uniform() const
True if all entries have identical values, and list is non-empty.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const_iterator begin() const
Return a const_iterator at end of list.
void operator=(const T &val)
Assign all addressed elements to the given value.
Base for lists with indirect addressing, templated on the list contents type and the addressing type....
T * pointer
The pointer type for non-const access to value_type items.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Ostream & writeList(Ostream &os, const label shortLen=0) const
Write List, with line-breaks in ASCII when length exceeds shortLen.
A const iterator for an indirect list.
const T & first() const
The first element of the list.
const_iterator cbegin() const
Return a const_iterator at begin of list.
bool found(const T &val, label pos=0) const
True if the value if found in the list.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
label difference_type
The difference between iterator objects.
dimensionedScalar pos(const dimensionedScalar &ds)