UPtrList< T >::value_compare< Compare > Struct Template Reference

A wrapper for a binary comparison of values that interjects pointer dereferencing with null pointer guards. More...

Public Member Functions

 value_compare (const Compare &cmp)
 
bool operator() (const T *const a, const T *const b) const
 Compare dereferenced pointers. More...
 

Public Attributes

const Compare & comp
 

Detailed Description

template<class T>
template<class Compare>
struct Foam::UPtrList< T >::value_compare< Compare >

A wrapper for a binary comparison of values that interjects pointer dereferencing with null pointer guards.

It will also sort any null pointers to the end (eg, rubbish that can be truncated)

Definition at line 173 of file UPtrList.H.

Constructor & Destructor Documentation

◆ value_compare()

value_compare ( const Compare &  cmp)
inline

Definition at line 177 of file UPtrList.H.

Member Function Documentation

◆ operator()()

bool operator() ( const T *const  a,
const T *const  b 
) const
inline

Compare dereferenced pointers.

Definition at line 185 of file UPtrList.H.

References Foam::constant::physicoChemical::b, and UPtrList< T >::value_compare< Compare >::comp.

Member Data Documentation

◆ comp

const Compare& comp

Definition at line 175 of file UPtrList.H.

Referenced by UPtrList< T >::value_compare< Compare >::operator()().


The documentation for this struct was generated from the following file: