![]() |
Low-Level Abstraction of Memory Access
|
#include <RecordRef.hpp>
Public Types | |
using | value_type = typename internal::ValueOf< Reference >::type |
Public Member Functions | |
ScopedUpdate (Reference r) | |
Loads a copy of the value referenced by r. Stores r and the loaded value. More... | |
ScopedUpdate (const ScopedUpdate &)=delete | |
auto | operator= (const ScopedUpdate &) -> ScopedUpdate &=delete |
ScopedUpdate (ScopedUpdate &&) noexcept=default | |
auto | operator= (ScopedUpdate &&) noexcept -> ScopedUpdate &=default |
~ScopedUpdate () | |
Stores the internally stored value back to the referenced value. More... | |
auto | get () -> value_type & |
Get access to the stored value. More... | |
auto | get () const -> const value_type & |
Get access to the stored value. More... | |
Scope guard type. ScopedUpdate takes a copy of a value through a reference and stores it internally during construction. The stored value is written back when ScopedUpdate is destroyed. ScopedUpdate tries to act like the stored value as much as possible, exposing member functions of the stored value and acting like a proxy reference if the stored value is a primitive type.
Definition at line 888 of file RecordRef.hpp.
using llama::ScopedUpdate< Reference, typename >::value_type = typename internal::ValueOf<Reference>::type |
Definition at line 890 of file RecordRef.hpp.
|
inlineexplicit |
Loads a copy of the value referenced by r. Stores r and the loaded value.
Definition at line 893 of file RecordRef.hpp.
|
delete |
|
defaultnoexcept |
|
inline |
Stores the internally stored value back to the referenced value.
Definition at line 906 of file RecordRef.hpp.
|
inline |
Get access to the stored value.
Definition at line 912 of file RecordRef.hpp.
|
inline |
Get access to the stored value.
Definition at line 918 of file RecordRef.hpp.
|
delete |
|
defaultnoexcept |