Gromacs
2025-dev-20241003-bd59e46
|
Assigns a temporary value for a selection element.
This class implements RAII semantics for temporarily assigning the value pointer of a selection element to point to a different location.
Public Member Functions | |
SelelemTemporaryValueAssigner () | |
Constructs an assigner without an initial assignment. | |
SelelemTemporaryValueAssigner (const SelectionTreeElementPointer &sel, const SelectionTreeElement &vsource) | |
Constructs an assigner with an initial assignment. More... | |
~SelelemTemporaryValueAssigner () | |
Undoes any temporary assignment done using this assigner. | |
void | assign (const SelectionTreeElementPointer &sel, const SelectionTreeElement &vsource) |
Assigns a temporary value pointer. More... | |
|
inline |
Constructs an assigner with an initial assignment.
[in,out] | sel | Selection element for which to assign. |
[in] | vsource | Element to which sel values will point to. |
|
inline |
Assigns a temporary value pointer.
[in,out] | sel | Selection element for which to assign. |
[in] | vsource | Element to which sel values will point to. |
Assigns the value pointer in sel
to point to the values in vsource
, i.e., any access/modification to values in sel
actually accesses values in vsource
.