Public Member Functions | List of all members
PtrListDetail< T > Class Template Reference

A rudimentary list of pointers used for PtrList, UPtrList, etc. This class is considered implementation detail and should not normally be used other than by OpenFOAM container classes. More...

Inheritance diagram for PtrListDetail< T >:
Inheritance graph
[legend]
Collaboration diagram for PtrListDetail< T >:
Collaboration graph
[legend]

Public Member Functions

constexpr PtrListDetail () noexcept
 
 PtrListDetail (const label len)
 
 PtrListDetail (const UList< T * > &list)
 
 PtrListDetail (const PtrListDetail< T > &list)
 
 PtrListDetail (PtrListDetail< T > &&list)
 
 PtrListDetail (PtrListDetail< T > &list, bool reuse)
 
label count () const
 
label findNull () const
 
void setNull ()
 
void free ()
 
template<class... Args>
PtrListDetail< Tclone (Args &&... args) const
 
void resize (const label newLen)
 
void setAddressableSize (const label n) noexcept
 
Ostreamwrite (Ostream &os, const bool trimNull=false) const
 
void operator= (const PtrListDetail< T > &list)
 
void operator= (PtrListDetail< T > &&list)
 
void setSize (const label)=delete
 
void setSize (const label, const T &)=delete
 
void setSize (const label, const T *)=delete
 
void resize_nocopy (const label)=delete
 
template<class... Args>
Foam::Detail::PtrListDetail< Tclone (Args &&... args) const
 
- Public Member Functions inherited from List< T * >
constexpr List () noexcept
 
 List (const label len)
 
 List (const label len, const T &val)
 
 List (const label len, const Foam::zero)
 
 List (const Foam::one, const T &val)
 
 List (const Foam::one, T &&val)
 
 List (const Foam::one, const Foam::zero)
 
 List (const List< T > &a)
 
 List (const UList< T > &a)
 
 List (List< T > &a, bool reuse)
 
 List (const UList< T > &list, const labelUList &indices)
 
 List (const UList< T > &list, const FixedList< label, N > &indices)
 
 List (const FixedList< T, N > &list)
 
 List (const PtrList< T > &list)
 
 List (const SLList< T > &list)
 
 List (const IndirectListBase< T, Addr > &list)
 
 List (std::initializer_list< T > list)
 
 List (List< T > &&list)
 
 List (DynamicList< T, SizeMin > &&list)
 
 List (SortableList< T > &&list)
 
 List (SLList< T > &&list)
 
 List (Istream &is)
 
 List (const label len)
 
 List (const label len, const T &val)
 
 List (const label len, const Foam::zero)
 
 List (const Foam::one, const T &val)
 
 List (const Foam::one, T &&val)
 
 List (const Foam::one, const Foam::zero)
 
 List (const UList< T > &a)
 
 List (const List< T > &a)
 
 List (List< T > &a, bool reuse)
 
 List (const UList< T > &list, const labelUList &indices)
 
 List (const PtrList< T > &list)
 
 List (const SLList< T > &list)
 
 List (std::initializer_list< T > list)
 
 List (List< T > &&list)
 
 List (SortableList< T > &&list)
 
 List (SLList< T > &&list)
 
constexpr List () noexcept
 
 List (Istream &is)
 
autoPtr< List< T > > clone () const
 
 ~List ()
 
void clear ()
 
void resize (const label len)
 
void resize (const label len, const T &val)
 
void resize (const label newLen)
 
void resize_nocopy (const label len)
 
void setSize (const label n)
 
void setSize (const label n, const T &val)
 
void append (const T &val)
 
void append (T &&val)
 
void append (const UList< T > &list)
 
void append (const IndirectListBase< T, Addr > &list)
 
void append (const T &val)
 
void append (T &&val)
 
void append (const UList< T > &list)
 
label appendUniq (const T &val)
 
void transfer (List< T > &list)
 
void transfer (DynamicList< T, SizeMin > &list)
 
void transfer (SortableList< T > &list)
 
void transfer (List< T > &list)
 
void transfer (SortableList< T > &list)
 
TnewElmt (const label i)
 
void operator= (const UList< T > &a)
 
void operator= (const List< T > &list)
 
void operator= (const SLList< T > &list)
 
void operator= (const IndirectListBase< T, Addr > &list)
 
void operator= (const FixedList< T, N > &list)
 
void operator= (std::initializer_list< T > list)
 
void operator= (const T &val)
 
void operator= (const Foam::zero)
 
void operator= (List< T > &&list)
 
void operator= (DynamicList< T, SizeMin > &&list)
 
void operator= (SortableList< T > &&list)
 
void operator= (SLList< T > &&list)
 
void operator= (const UList< T > &a)
 
void operator= (const List< T > &list)
 
void operator= (const SLList< T > &list)
 
void operator= (std::initializer_list< T > list)
 
void operator= (List< T > &&list)
 
void operator= (SortableList< T > &&list)
 
void operator= (SLList< T > &&list)
 
void operator= (const T &val)
 
void operator= (const Foam::zero)
 
IstreamreadList (Istream &is)
 
IstreamreadList (Istream &is)
 
IstreamreadList (Istream &is)
 
void shallowCopy (const UList< T > &)=delete
 
std::enable_if< std::is_same< bool, TypeT >::value, bool >::type set (const label i, bool val=true)
 

Additional Inherited Members

- Public Types inherited from List< T * >
typedef SubList< TsubList
 
- Static Public Member Functions inherited from List< T * >
static const List< T > & null ()
 

Detailed Description

template<class T>
class Foam::Detail::PtrListDetail< T >

A rudimentary list of pointers used for PtrList, UPtrList, etc. This class is considered implementation detail and should not normally be used other than by OpenFOAM container classes.

It stores a list of pointers, but makes leaves memory management to the caller or sub-class. The free() method can be used explicitly as required.

Source files

Definition at line 57 of file PtrListDetail.H.

Constructor & Destructor Documentation

◆ PtrListDetail() [1/6]

constexpr PtrListDetail
inlineconstexprnoexcept

Definition at line 24 of file PtrListDetailI.H.

◆ PtrListDetail() [2/6]

PtrListDetail ( const label  len)
inlineexplicit

Definition at line 31 of file PtrListDetailI.H.

◆ PtrListDetail() [3/6]

PtrListDetail ( const UList< T * > &  list)
inlineexplicit

Definition at line 39 of file PtrListDetailI.H.

◆ PtrListDetail() [4/6]

PtrListDetail ( const PtrListDetail< T > &  list)
inline

Definition at line 49 of file PtrListDetailI.H.

◆ PtrListDetail() [5/6]

PtrListDetail ( PtrListDetail< T > &&  list)
inline

Definition at line 59 of file PtrListDetailI.H.

◆ PtrListDetail() [6/6]

PtrListDetail ( PtrListDetail< T > &  list,
bool  reuse 
)
inline

Definition at line 69 of file PtrListDetailI.H.

Member Function Documentation

◆ count()

Foam::label count

Definition at line 27 of file PtrListDetail.C.

References T.

◆ findNull()

Foam::label findNull

Definition at line 44 of file PtrListDetail.C.

References T.

Referenced by UPtrList< const Foam::UList >::reorder(), and UPtrList< const Foam::UList >::sortOrder().

Here is the caller graph for this function:

◆ setNull()

void setNull

Definition at line 63 of file PtrListDetail.C.

◆ free()

void free

Definition at line 76 of file PtrListDetail.C.

References T.

◆ clone() [1/2]

PtrListDetail<T> clone ( Args &&...  args) const

Referenced by PtrListDetail< T >::clone().

Here is the caller graph for this function:

◆ resize()

void resize ( const label  newLen)
inline

Definition at line 91 of file PtrListDetailI.H.

References List::clear(), List::resize(), and Foam::T().

Here is the call graph for this function:

◆ setAddressableSize()

void setAddressableSize ( const label  n)
inlinenoexcept

Definition at line 82 of file PtrListDetailI.H.

References n.

◆ write()

Foam::Ostream & write ( Ostream os,
const bool  trimNull = false 
) const

Definition at line 29 of file PtrListDetailIO.C.

References Foam::abort(), Foam::BitOps::count(), Foam::decrIndent(), Foam::FatalError, FatalErrorInFunction, FUNCTION_NAME, Foam::incrIndent(), Foam::indent(), Foam::nl, os(), and T.

Here is the call graph for this function:

◆ operator=() [1/2]

void operator= ( const PtrListDetail< T > &  list)
inline

Definition at line 109 of file PtrListDetailI.H.

References List::operator=().

Here is the call graph for this function:

◆ operator=() [2/2]

void operator= ( PtrListDetail< T > &&  list)
inline

Definition at line 119 of file PtrListDetailI.H.

References List::transfer().

Here is the call graph for this function:

◆ setSize() [1/3]

void setSize ( const  label)
delete

◆ setSize() [2/3]

void setSize ( const  label,
const T  
)
delete

◆ setSize() [3/3]

void setSize ( const  label,
const T  
)
delete

◆ resize_nocopy()

void resize_nocopy ( const  label)
delete

◆ clone() [2/2]

Foam::Detail::PtrListDetail<T> clone ( Args &&...  args) const

Definition at line 98 of file PtrListDetail.C.

References args, PtrListDetail< T >::clone(), and T.

Here is the call graph for this function:

The documentation for this class was generated from the following files: