A class for managing temporary objects without reference counting. More...
Public Types | |
typedef T | element_type |
Type of object being managed. More... | |
typedef T * | pointer |
Pointer to type of object being managed. More... | |
typedef Foam::refCount::zero | refCount |
Null reference counter class. More... | |
Public Member Functions | |
constexpr | tmpNrc () noexcept |
Construct with no managed pointer. More... | |
constexpr | tmpNrc (std::nullptr_t) noexcept |
Construct with no managed pointer. More... | |
tmpNrc (T *p) noexcept | |
Construct, taking ownership of the pointer. More... | |
tmpNrc (const T &obj) noexcept | |
Construct for a const reference to an object. More... | |
tmpNrc (tmpNrc< T > &&t) noexcept | |
Move construct, transferring ownership. More... | |
tmpNrc (const tmpNrc< T > &t) | |
Copy construct. More... | |
tmpNrc (const tmpNrc< T > &t, bool reuse) | |
Copy construct. Optionally reusing pointer. More... | |
~tmpNrc () | |
Destructor: deletes managed pointer. More... | |
bool | isTmp () const noexcept |
True if this is a managed pointer (not a const reference) More... | |
bool | empty () const noexcept |
True if this is a non-null managed pointer. More... | |
bool | valid () const noexcept |
bool | movable () const noexcept |
True if this is a non-null managed pointer with a unique ref-count. More... | |
word | typeName () const |
Return type-name of the tmp, constructed from type-name of T. More... | |
T * | get () noexcept |
Return pointer without nullptr checking. More... | |
const T * | get () const noexcept |
Return const pointer without nullptr checking. More... | |
const T & | cref () const |
T & | ref () const |
T & | constCast () const |
Non-const dereference, even if the object is const. More... | |
T * | ptr () const |
void | clear () const noexcept |
void | reset () noexcept |
Release ownership of managed temporary object. More... | |
void | reset (T *p) noexcept |
Delete managed temporary object and set to new given pointer. More... | |
void | reset (tmpNrc< T > &&other) noexcept |
Clear existing and transfer ownership. More... | |
void | cref (const T &obj) noexcept |
Delete managed temporary object and set to const reference. More... | |
void | swap (tmpNrc< T > &other) noexcept |
Swaps the managed object with other. More... | |
const T & | operator() () const |
Return const reference to the object. More... | |
operator const T & () const | |
Cast to underlying data type, using the cref() method. More... | |
const T * | operator-> () const |
Dereferences (const) pointer to the managed object. More... | |
T * | operator-> () |
Dereferences (non-const) pointer to the managed object. More... | |
operator bool () const noexcept | |
Is non-null managed pointer or const object reference : valid() More... | |
void | operator= (T *p) |
Take ownership of the pointer. More... | |
void | operator= (const tmpNrc< T > &t) |
Transfer ownership of the managed pointer. More... | |
void | operator= (tmpNrc< T > &&other) noexcept |
Clear existing and transfer ownership. More... | |
operator tmp< T > () | |
Conversion to tmp. More... | |
void | operator= (std::nullptr_t)=delete |
No assignment from literal nullptr. More... | |
template<class... Args> | |
Foam::tmpNrc< T > | New (Args &&... args) |
template<class U , class... Args> | |
Foam::tmpNrc< T > | NewFrom (Args &&... args) |
Static Public Member Functions | |
template<class... Args> | |
static tmpNrc< T > | New (Args &&... args) |
Construct tmpNrc of T with forwarding arguments. More... | |
template<class U , class... Args> | |
static tmpNrc< T > | NewFrom (Args &&... args) |
Construct tmpNrc from derived type with forwarding arguments. More... | |
A class for managing temporary objects without reference counting.
typedef T element_type |
typedef Foam::refCount::zero refCount |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Construct tmpNrc of T with forwarding arguments.
args | list of arguments with which an instance of T will be constructed. |
Referenced by AMIInterpolation::calculate().
Construct tmpNrc from derived type with forwarding arguments.
args | list of arguments with which an instance of U will be constructed. |
|
inlinenoexcept |
True if this is a managed pointer (not a const reference)
Definition at line 156 of file tmpNrcI.H.
Referenced by tmpNrc< Foam::PrimitivePatch >::operator=().
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineexplicitnoexcept |
|
inline |
|
delete |
No assignment from literal nullptr.
Consistent with run-time check for nullptr on assignment.
|
inline |
|
inline |