Go to the documentation of this file.
60 template<
class T>
class tmp;
61 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>
138 void resize(const label newLen);
141 inline
void setSize(const label newLen);
160 inline const
T*
set(const label i) const;
185 void operator=(const
PtrList<
T>& list);
188 inline
void operator=(
PtrList<
T>&& list);
205 #include "PtrListI.H"
A class for managing temporary objects.
autoPtr< T > release(const label i)
Release ownership of the pointer at the given position.
Istream & operator>>(Istream &, directionInfo &)
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
Construct null.
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.
const T * set(const label i) const
Return const pointer to element (if set) or nullptr.
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...
Foam::argList args(argc, argv)
void transfer(PtrList< T > &list)
Transfer into this list and annul the argument list.