Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/time/digxel.hpp"
A number element for building structured numeric displays.
The purpose is to represent parts of a numeric format, like e.g. the sexagesimal "digits" of a timecode display. A Digxel
NUM | numeric type to be used for the value |
FMT | a formatter and buffer holder type |
Definition at line 226 of file digxel.hpp.
Public Member Functions | |
template<typename FUN , class THIS > | |
void | installMutator (FUN mutate, THIS &self) |
install an external functor to be applied on any new digxel value. More... | |
size_t | maxlen () const |
operator NUM () const | |
operator string () const | |
Digxel & | operator++ () |
NUM | operator++ (int) |
Digxel & | operator+= (NUM inc) |
Digxel & | operator-- () |
NUM | operator-- (int) |
Digxel & | operator-= (NUM dec) |
bool | operator< (Digxel const &o) const |
void | operator= (NUM n) |
bool | operator== (Digxel const &o) const |
void | setValueRaw (NUM newVal) |
digxel::CBuf | show () const |
Private Types | |
typedef Digxel< NUM, FMT > | _Digxel |
typedef function< void(NUM)> | _Mutator |
Private Attributes | |
FMT | buffer_ |
_Mutator | mutator |
Functor for setting a new digxel value. | |
NUM | value_ |
|
inline |
install an external functor to be applied on any new digxel value.
This allows individual instances to limit the possible digxel values, or to update an compound value (e.g. a time comprised of hour, minute and second digxel elements). The installed functor needs to accept a "this" pointer and actually perform any desired state change as sideeffect. The default is to accept any value as-is.
Definition at line 252 of file digxel.hpp.
Referenced by lib::time::anonymous_namespace{timecode.cpp}::setupComponentNormalisation().