Ion
|
A Field that has a limited valid range of values. More...
#include "resourceholder.h"
Public Member Functions | |
RangedField (const int change_bit, const T &initial_value, const T &min_value, const T &max_value, ResourceHolder *holder) | |
~RangedField () override | |
bool | IsValid (const T &value) override |
Check if the proposed value falls within the correct range. More... | |
const T & | Get () const |
Gets a const version of the current value. More... | |
T * | GetMutable () |
Gets an editable version of the current value. More... | |
bool | Set (const T &value) |
Sets the value of the Field if it is valid and tells the resource what has changed. More... | |
int | GetBit () const |
Get the change bit. More... | |
Protected Member Functions | |
void | OnChanged () |
void | OnChanged (const int bit) |
Trigger a change for a specific bit. More... | |
A Field that has a limited valid range of values.
Definition at line 186 of file resourceholder.h.
|
inline |
Definition at line 188 of file resourceholder.h.
|
inlineoverride |
Definition at line 196 of file resourceholder.h.
|
inlineinherited |
Gets a const version of the current value.
Definition at line 157 of file resourceholder.h.
|
inlineinherited |
Get the change bit.
Definition at line 102 of file resourceholder.h.
|
inlineinherited |
Gets an editable version of the current value.
Since the caller could do anything with the reference, also notify the resource.
Definition at line 161 of file resourceholder.h.
|
inlineoverridevirtual |
Check if the proposed value falls within the correct range.
Reimplemented from ion::gfx::ResourceHolder::Field< T >.
Definition at line 199 of file resourceholder.h.
|
inlineprotectedinherited |
Definition at line 113 of file resourceholder.h.
|
inlineprotectedinherited |
Trigger a change for a specific bit.
Definition at line 121 of file resourceholder.h.
|
inlineinherited |
Sets the value of the Field if it is valid and tells the resource what has changed.
If the value is not valid, an error message is logged. Returns whether the set occurred.
Definition at line 169 of file resourceholder.h.