|
libkeepass 0.2.0
KeePass key database importer/exporter library
|
Template class for keeping track of when a variable is modified. More...
#include <temporal.hh>
Public Member Functions | |
| temporal ()=default | |
| Default-constructs an empty temporal wrapper. | |
| temporal (const T &value, std::time_t time) | |
| Constructs a temporal wrapper with an explicit timestamp. | |
| temporal (const temporal< T > &other) | |
| Copy-constructs from another temporal wrapper. | |
| temporal (temporal< T > &&other) noexcept | |
| Move-constructs from another temporal wrapper. | |
| const T & | value () const |
| Returns a const reference to the stored value. | |
| std::time_t | time () const |
| Returns the modification timestamp. | |
| void | set_time (std::time_t time) |
| Sets the modification timestamp without changing the value. | |
| void | Set (const T &val) |
| Replaces the stored value and updates the timestamp to now. | |
| temporal< T > & | operator= (const T &value) |
| Assigns a plain value, updating the timestamp to now. | |
| temporal< T > & | operator= (const temporal< T > &other) |
| Copy-assigns from another temporal wrapper. | |
| temporal< T > & | operator= (temporal< T > &&other) noexcept |
| Move-assigns from another temporal wrapper. | |
| operator const T & () const | |
| Explicit conversion operator to the wrapped type. | |
| const T * | operator-> () const |
| Arrow operator forwarding to the stored value. | |
| const T & | operator* () const |
| Dereference operator forwarding to the stored value. | |
Template class for keeping track of when a variable is modified.
| T | The type of the tracked value. |
|
inline |
Constructs a temporal wrapper with an explicit timestamp.
| [in] | value | Initial value. |
| [in] | time | Timestamp of the value. |
|
inline |
Copy-constructs from another temporal wrapper.
| [in] | other | Source wrapper. |
|
inlinenoexcept |
Move-constructs from another temporal wrapper.
| [in,out] | other | Source wrapper (moved from). |
|
inlineexplicit |
Explicit conversion operator to the wrapped type.
|
inline |
Dereference operator forwarding to the stored value.
|
inline |
Arrow operator forwarding to the stored value.
|
inline |
Assigns a plain value, updating the timestamp to now.
| [in] | value | New value. |
|
inline |
Copy-assigns from another temporal wrapper.
| [in] | other | Source wrapper. |
|
inlinenoexcept |
Move-assigns from another temporal wrapper.
| [in,out] | other | Source wrapper (moved from). |
|
inline |
Replaces the stored value and updates the timestamp to now.
| [in] | val | New value. |
|
inline |
Sets the modification timestamp without changing the value.
| [in] | time | New timestamp. |
|
inline |
Returns the modification timestamp.
|
inline |
Returns a const reference to the stored value.