56template<
class T>
class List;
57template<
class T,
unsigned N>
class FixedList;
81 inline void doAlloc(
const label len);
84 template<
class ListType>
85 inline void copyList(
const ListType& list);
89 template<
class ListType,
class ListIndices>
90 inline void copyList(
const ListType& list,
const ListIndices& indices);
94 template<
class InputIterator>
98 InputIterator inputEnd,
104 bool readBracketList(
Istream& is);
125 static const List<T>&
null()
noexcept
137 explicit List(const label len);
140 List(const label len, const
T& val);
155 List(const List<
T>& list);
158 explicit List(const
UList<
T>& list);
161 List(List<
T>& list,
bool reuse);
182 List(std::initializer_list<
T> list);
188 template<
int SizeMin>
214 void resize(const label len, const
T& val);
239 template<
int SizeMin>
252 template<class... Args>
286 void operator=(const List<
T>& list);
297 void operator=(std::initializer_list<
T> list);
300 inline
void operator=(const
T& val);
306 void operator=(List<
T>&& list);
309 template<
int SizeMin>
344 class = std::enable_if_t<
stdFoam::is_bool_v<TypeT>>
346 inline
bool set(const label i,
bool val = true)
352 else if (i >= this->
size())
409 expr.evaluate(*
this);
416 expr.evaluate(*
this);
446template<
class IntType>
462template<
class T,
class ListComparePredicate>
467 const ListComparePredicate& comp
Forward declarations for SLList.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Expression templates for List.
A 1D vector of objects of type <T> with a fixed length <N>.
Base for lists with indirect addressing, templated on the list contents type and the addressing type....
An interval of (signed) integers defined by a start and a size.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void transfer(List< block_type > &list)
block_type & newElmt(const label i)
SubList< block_type > subList
autoPtr< List< block_type > > clone() const
label appendUniq(const block_type &val)
void resize_nocopy(const label len)
Adjust allocated size of list without necessarily.
void operator=(const UList< T > &list)
Assignment to UList operator. Takes linear time.
block_type & emplace_back(Args &&... args)
bool set(const label i, bool val=true)
void append(const IndirectListBase< T, Addr > &list)
Append IndirectList contents at the end of this list.
List(const Expression::ListExpression< E > &expr)
Construct from value expression.
constexpr List() noexcept
Default construct.
void resize_copy(label count, const label len)
void append(const T &val)
Append an element at the end of the list.
void shallowCopy(const UList< block_type > &)=delete
void append(T &&val)
Move append an element at the end of the list.
label push_uniq(const block_type &val)
void operator=(const Expression::ListExpression< E > &expr)
Assign values from expression.
void push_back(const block_type &val)
void setSize(label n)
Alias for resize().
void resize(const label len)
void resize_fill(const label len, const block_type &val)
Istream & readList(Istream &is)
void setSize(label n, const T &val)
Alias for resize().
void append(const UList< T > &list)
Append a List to the end of this list.
static const List< T > & null() noexcept
Return a null List (reference to a nullObject). Behaves like an empty List.
A non-owning sub-view of a List (allocated or unallocated storage).
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
auto expr() const
Wrap value as expression.
UList(const UList< T > &) noexcept=default
Copy construct, shallow copy.
label size() const noexcept
The number of elements in the container.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
const T & NullObjectRef() noexcept
Const reference (of type T) to the nullObject.
List< label > labelList
A List of labels.
Istream & operator>>(Istream &, directionInfo &)
labelList sortedOrder(const UList< T > &input)
Return the (stable) sort order for the list.
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i), works like std::iota() but returning a...
List< bool > boolList
A List of bools.
UList< label > labelUList
A UList of labels.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
List< char > charList
A List of chars.
Namespace for std templates that are are part of future C++ standards or that are in a state of chang...
Foam::argList args(argc, argv)
#define FOAM_DEPRECATED_FOR(since, replacement)
Hash function class. The default definition is for primitives. Non-primitives used to hash entries on...
Deprecated(2021-04) hashing functor. Use hasher().
Hashing functor for UList.
const Vector< label > N(dict.get< Vector< label > >("N"))