A const Field wrapper with possible data conversion. More...
Public Types | |
typedef Container< Type > | FieldType |
The adapted field type. More... | |
Public Types inherited from tmpNrc< Container< Type > > | |
typedef Container< Type > | element_type |
Type of object being managed. More... | |
typedef Container< Type > * | pointer |
Pointer to type of object being managed. More... | |
typedef Foam::refCount::zero | refCount |
Null reference counter class. More... | |
Public Member Functions | |
ConstPrecisionAdaptor (const Container< InputType > &input) | |
Construct from Container<InputType>, copying on input as required. More... | |
ConstPrecisionAdaptor (tmp< Container< InputType >> &&input) | |
Construct from tmp Container, copy/move as required. More... | |
ConstPrecisionAdaptor (const tmp< Container< InputType >> &input) | |
Construct from tmp Container, copy/move as required. More... | |
Public Member Functions inherited from tmpNrc< Container< Type > > | |
Foam::tmpNrc< Container< Type > > | New (Args &&... args) |
Foam::tmpNrc< Container< Type > > | NewFrom (Args &&... args) |
constexpr | tmpNrc () noexcept |
Construct with no managed pointer. More... | |
constexpr | tmpNrc (std::nullptr_t) noexcept |
Construct with no managed pointer. More... | |
tmpNrc (Container< Type > *p) noexcept | |
Construct, taking ownership of the pointer. More... | |
tmpNrc (const Container< Type > &obj) noexcept | |
Construct for a const reference to an object. More... | |
tmpNrc (tmpNrc< Container< Type > > &&t) noexcept | |
Move construct, transferring ownership. More... | |
tmpNrc (const tmpNrc< Container< Type > > &t) | |
Copy construct. More... | |
tmpNrc (const tmpNrc< Container< Type > > &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... | |
Container< Type > * | get () noexcept |
Return pointer without nullptr checking. More... | |
const Container< Type > * | get () const noexcept |
Return const pointer without nullptr checking. More... | |
const Container< Type > & | cref () const |
void | cref (const Container< Type > &obj) noexcept |
Delete managed temporary object and set to const reference. More... | |
Container< Type > & | ref () const |
Container< Type > & | constCast () const |
Non-const dereference, even if the object is const. More... | |
Container< Type > * | ptr () const |
void | clear () const noexcept |
void | reset () noexcept |
Release ownership of managed temporary object. More... | |
void | reset (Container< Type > *p) noexcept |
Delete managed temporary object and set to new given pointer. More... | |
void | reset (tmpNrc< Container< Type > > &&other) noexcept |
Clear existing and transfer ownership. More... | |
void | swap (tmpNrc< Container< Type > > &other) noexcept |
Swaps the managed object with other. More... | |
const Container< Type > & | operator() () const |
Return const reference to the object. More... | |
operator const Container< Type > & () const | |
Cast to underlying data type, using the cref() method. More... | |
const Container< Type > * | operator-> () const |
Dereferences (const) pointer to the managed object. More... | |
Container< Type > * | 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= (Container< Type > *p) |
Take ownership of the pointer. More... | |
void | operator= (const tmpNrc< Container< Type > > &t) |
Transfer ownership of the managed pointer. More... | |
void | operator= (tmpNrc< Container< Type > > &&other) noexcept |
Clear existing and transfer ownership. More... | |
void | operator= (std::nullptr_t)=delete |
No assignment from literal nullptr. More... | |
operator tmp< Container< Type > > () | |
Conversion to tmp. More... | |
Static Public Member Functions | |
static const Container< Type > & | get (const Container< InputType > &input, Container< Type > &dst) |
Return the field. More... | |
Static Public Member Functions inherited from tmpNrc< Container< Type > > | |
static tmpNrc< Container< Type > > | New (Args &&... args) |
Construct tmpNrc of T with forwarding arguments. More... | |
static tmpNrc< Container< Type > > | NewFrom (Args &&... args) |
Construct tmpNrc from derived type with forwarding arguments. More... | |
A const Field wrapper with possible data conversion.
Definition at line 50 of file PrecisionAdaptor.H.
typedef Container<Type> FieldType |
The adapted field type.
Definition at line 94 of file PrecisionAdaptor.H.
|
inline |
Construct from Container<InputType>, copying on input as required.
Definition at line 100 of file PrecisionAdaptor.H.
References tmpNrc< Container< Type > >::cref().
|
inline |
Construct from tmp Container, copy/move as required.
Definition at line 116 of file PrecisionAdaptor.H.
|
inline |
Construct from tmp Container, copy/move as required.
Definition at line 125 of file PrecisionAdaptor.H.
|
inlinestatic |
Return the field.
Definition at line 137 of file PrecisionAdaptor.H.