Go to the documentation of this file.
62 template<
class T>
class tmp;
63 template<
class T>
class PtrList;
91 inline constexpr
PtrList() noexcept;
94 inline explicit
PtrList(const label len);
106 template<class CloneArg>
130 template<class... Args>
139 const
T*
set(const label i)
const {
return this->
get(i); }
149 void resize(
const label newLen);
155 template<
class... Args>
168 inline void append(std::unique_ptr<T>&& ptr);
177 template<
class... Args>
191 inline autoPtr<T> set(
const label i, std::unique_ptr<T>&& ptr);
A class for managing temporary objects.
void emplace_append(Args &&... args)
Construct and append an element to the end of the list.
void operator=(const PtrList< T > &list)
Copy assignment.
autoPtr< T > release(const label i)
Release ownership of the pointer at the given position.
Istream & operator>>(Istream &, directionInfo &)
const T * set(const label i) const
Return const pointer to element (can be nullptr),.
Forward declarations for SLPtrList.
Template class for non-intrusive linked PtrLists.
A helper class when constructing from an Istream or dictionary.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void setSize(const label newLen)
Same as resize()
constexpr PtrList() noexcept
Default construct.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
void readIstream(Istream &is, const INew &inew)
Read from Istream using Istream constructor class.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
void append(T *ptr)
Append an element to the end of the list.
PtrList< T > clone(Args &&... args) const
Make a copy by cloning each of the list elements.
void clear()
Clear the PtrList. Delete allocated entries and set size to zero.
void resize(const label newLen)
Adjust size of PtrList.
void free()
Delete the allocated entries, but retain the list size.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
autoPtr< T > emplace(const label i, Args &&... args)
Construct and set an element.
Foam::argList args(argc, argv)
void transfer(PtrList< T > &list)
Transfer into this list and annul the argument list.
A class for managing references or pointers (no reference counting)