OWLNext 7.0
Borland's Object Windows Library for the modern age
|
Maps between application-specific value and a selection index, such as a radio-button group index or a list box selection. More...
#include <owl/transfer.h>
Public Member Functions | |
template<int N, class TGet , class TSet > | |
TSelectionIndexMapper (const TValue(&values)[N], TGet get, TSet set) | |
Constructs a new mapper given an array of values, a getter and a setter. | |
template<int N, class D , class R , class A > | |
TSelectionIndexMapper (const TValue(&values)[N], D *d, R(D::*get)() const, void(D::*set)(A)) | |
Overload; specialized for member functions. | |
int | Get () const |
Uses the stored getter to get the application-specific value, then converts it to a selection index. | |
void | Set (int index) |
Converts the given selection index to an application-specific value, then calls the stored setter, passing the value as an argument. | |
Maps between application-specific value and a selection index, such as a radio-button group index or a list box selection.
Definition at line 1561 of file transfer.h.
|
inline |
Constructs a new mapper given an array of values, a getter and a setter.
The order of the values passed determines the mapping of the selection indexes.
Definition at line 1570 of file transfer.h.
|
inline |
Overload; specialized for member functions.
Definition at line 1578 of file transfer.h.
|
inline |
Uses the stored getter to get the application-specific value, then converts it to a selection index.
Returns N, the size of the value array, if the conversion can not be done.
Definition at line 1588 of file transfer.h.
Converts the given selection index to an application-specific value, then calls the stored setter, passing the value as an argument.
Does nothing if the conversion can not be done.
Definition at line 1595 of file transfer.h.