Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/time/control-impl.hpp"
Implementation building block: impose changes to a Time element.
The purpose of the Mutator is to attach a target time entity, which then will be subject to any received value changes, offsets and grid nudging. The actual attachment is to be performed in a subclass, by using the Mutation interface. When attaching to a target, the Mutator will be outfitted with a set of suitable functors, incorporating the specific behaviour for the concrete combination of input changes ("source values") and target object type. This works by binding to the appropriate implementation functionality, guided by a templated policy class. After installing these functors, these decisions remains opaque and encapsulated within the functor objects, so the mutator object doesn't need to carry this type information on the interface
Definition at line 82 of file control-impl.hpp.
Protected Member Functions | |
template<class TAR > | |
void | bind_to (TAR &target) const |
void | ensure_isArmed () const |
void | unbind () |
Protected Attributes | |
Nudger | nudge_ |
Ofsetter | offset_ |
ValueSetter | setVal_ |
Private Types | |
typedef function< TI(int)> | Nudger |
typedef function< TI(Offset const &)> | Ofsetter |
typedef function< TI(TI const &)> | ValueSetter |
Additional Inherited Members | |
Public Member Functions inherited from Mutation | |
virtual void | change (Duration &) const =0 |
virtual void | change (TimeSpan &) const =0 |
virtual void | change (QuTime &) const =0 |
Static Public Member Functions inherited from Mutation | |
static EncapsulatedMutation | adjust (Offset) |
Convenience factory: simple Mutation to adjust the duration or length of a timespan. More... | |
static EncapsulatedMutation | changeDuration (Duration) |
Convenience factory: simple Mutation to adjust the duration or length of a timespan. More... | |
static EncapsulatedMutation | changeTime (Time) |
Convenience factory to yield a simple Mutation changing the absolute start time. More... | |
static EncapsulatedMutation | materialise (QuTime const &) |
Convenience factory: materialise the given quantised time into an explicit fixed internal time value, according to the underlying time grid; impose the resulting value then as new time point or start point to the target. More... | |
static EncapsulatedMutation | nudge (int adjustment) |
build a time mutation to nudge the target time value by an offset, defined as number of steps on an implicit nudge grid. More... | |
static EncapsulatedMutation | nudge (int adjustment, Symbol gridID) |
build a time mutation to nudge the target time value in steps based on a pre-defined grid. More... | |
Static Protected Member Functions inherited from Mutation | |
static TimeValue & | imposeChange (TimeValue &, TimeValue const &) |
static TimeValue & | imposeChange (TimeValue &, Offset const &) |
static TimeValue & | imposeChange (TimeValue &, int) |
static TimeValue & | imposeChange (QuTime &, int) |