yaze 0.2.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::util::NotifyValue< T > Class Template Reference

A class to manage a value that can be modified and notify when it changes. More...

#include <notify.h>

Inheritance diagram for yaze::util::NotifyValue< T >:

Public Member Functions

 NotifyValue ()
 
 NotifyValue (const T &value)
 
void set (const T &value)
 
void set (T &&value)
 
const T & get ()
 
T & edit ()
 
void commit ()
 
bool consume_modified ()
 
 operator T ()
 
void operator= (const T &value)
 
bool modified () const
 

Private Attributes

value_
 
temp_value_
 
bool modified_
 

Detailed Description

template<typename T>
class yaze::util::NotifyValue< T >

A class to manage a value that can be modified and notify when it changes.

Definition at line 13 of file notify.h.

Constructor & Destructor Documentation

◆ NotifyValue() [1/2]

template<typename T>
yaze::util::NotifyValue< T >::NotifyValue ( )
inline

Definition at line 15 of file notify.h.

References modified_, temp_value_, and value_.

◆ NotifyValue() [2/2]

template<typename T>
yaze::util::NotifyValue< T >::NotifyValue ( const T & value)
inline

Definition at line 16 of file notify.h.

References modified_, temp_value_, and value_.

Member Function Documentation

◆ set() [1/2]

template<typename T>
void yaze::util::NotifyValue< T >::set ( const T & value)
inline

Definition at line 19 of file notify.h.

References modified_, and value_.

Referenced by operator=().

◆ set() [2/2]

template<typename T>
void yaze::util::NotifyValue< T >::set ( T && value)
inline

Definition at line 26 of file notify.h.

References modified_, and value_.

◆ get()

template<typename T>
const T & yaze::util::NotifyValue< T >::get ( )
inline

Definition at line 33 of file notify.h.

References modified_, and value_.

Referenced by operator T().

◆ edit()

template<typename T>
T & yaze::util::NotifyValue< T >::edit ( )
inline

Definition at line 38 of file notify.h.

References modified_, temp_value_, and value_.

◆ commit()

template<typename T>
void yaze::util::NotifyValue< T >::commit ( )
inline

Definition at line 44 of file notify.h.

References modified_, temp_value_, and value_.

◆ consume_modified()

template<typename T>
bool yaze::util::NotifyValue< T >::consume_modified ( )
inline

Definition at line 51 of file notify.h.

References modified(), and modified_.

Here is the call graph for this function:

◆ operator T()

template<typename T>
yaze::util::NotifyValue< T >::operator T ( )
inline

Definition at line 57 of file notify.h.

References get().

Here is the call graph for this function:

◆ operator=()

template<typename T>
void yaze::util::NotifyValue< T >::operator= ( const T & value)
inline

Definition at line 58 of file notify.h.

References set().

Here is the call graph for this function:

◆ modified()

template<typename T>
bool yaze::util::NotifyValue< T >::modified ( ) const
inline

Definition at line 59 of file notify.h.

References modified_.

Referenced by consume_modified().

Member Data Documentation

◆ value_

template<typename T>
T yaze::util::NotifyValue< T >::value_
private

Definition at line 62 of file notify.h.

Referenced by commit(), edit(), get(), NotifyValue(), NotifyValue(), set(), and set().

◆ temp_value_

template<typename T>
T yaze::util::NotifyValue< T >::temp_value_
private

Definition at line 63 of file notify.h.

Referenced by commit(), edit(), NotifyValue(), and NotifyValue().

◆ modified_

template<typename T>
bool yaze::util::NotifyValue< T >::modified_
private

Definition at line 64 of file notify.h.

Referenced by commit(), consume_modified(), edit(), get(), modified(), NotifyValue(), NotifyValue(), set(), and set().


The documentation for this class was generated from the following file: