Variant type that either contains and behaves as tmp object or represents a value of one. Provides multiplication and scaling operations which are optimised away if representing a value of one. More...
Public Member Functions | |
| oneOrTmp () | |
| Construct as one. More... | |
| oneOrTmp (const Type &) | |
| Construct from an object. More... | |
| oneOrTmp (const tmp< Type > &) | |
| Construct from a temporary object. More... | |
| oneOrTmp (const oneOrTmp< Type > &) | |
| Copy construct. More... | |
| ~oneOrTmp () | |
| Destructor. More... | |
| template<class Other > | |
| void | scale (Other &o) const |
| Scale an object by this value. More... | |
| void | operator= (const one &) |
| Assign to one. More... | |
| void | operator= (const tmp< Type > &) |
| Assign to a temporary object. More... | |
| oneOrTmp< Type > | operator() () const |
| Return an instance of the class which refers to this one. Used in. More... | |
| template<class Other > | |
| tmp< Other > | operator* (const Other &) |
| Multiply with an object. More... | |
| template<class Other > | |
| tmp< Other > | operator* (const tmp< Other > &) |
| Multiply with a temporary object. More... | |
| void | operator= (const oneOrTmp< Type > &)=delete |
| Disallow default bitwise assignment. More... | |
| template<class Other > | |
| Foam::tmp< Other > | operator* (const Other &o) |
| template<class Other > | |
| Foam::tmp< Other > | operator* (const tmp< Other > &to) |
Variant type that either contains and behaves as tmp object or represents a value of one. Provides multiplication and scaling operations which are optimised away if representing a value of one.
Definition at line 52 of file oneOrTmp.H.
|
inline |
Construct as one.
Definition at line 31 of file oneOrTmpI.H.
|
inline |
Construct from an object.
Definition at line 39 of file oneOrTmpI.H.
Construct from a temporary object.
Definition at line 46 of file oneOrTmpI.H.
References tmp< T >::clear().

Copy construct.
Definition at line 56 of file oneOrTmpI.H.
Destructor.
Definition at line 66 of file oneOrTmpI.H.
| void scale | ( | Other & | o | ) | const |
Scale an object by this value.
Definition at line 74 of file oneOrTmpI.H.
|
inline |
Assign to one.
Definition at line 86 of file oneOrTmpI.H.
|
inline |
Assign to a temporary object.
Definition at line 94 of file oneOrTmpI.H.
|
inline |
Return an instance of the class which refers to this one. Used in.
the same way as tmp::operator() to prevent the tmp being consumed.
Definition at line 102 of file oneOrTmpI.H.
|
inline |
Multiply with an object.
|
delete |
Disallow default bitwise assignment.
| Foam::tmp<Other> operator* | ( | const Other & | o | ) |
Definition at line 117 of file oneOrTmpI.H.
Definition at line 132 of file oneOrTmpI.H.
References tmp< T >::clear().
