Lumiera  0.pre.03
»edit your freedom«
Control< TI > Class Template Reference

#include "lib/time/control.hpp"

Description

template<class TI>
class lib::time::Control< TI >

Frontend/Interface: controller-element to retrieve and change running time values.

time::Control is a mediator element, which can be attached to some time value entities as mutation, and at the same time allows to register listeners. When configured this way, changes may be fed to the function operator(s). These changes will be imposed to the connected target and the result propagated to the listeners.

See also
time::Mutation
time::TimeSpan::accept(Mutation const&)

Definition at line 134 of file control.hpp.

Public Member Functions

template<class SIG >
void connectChangeNotification (SIG const &toNotify)
 install a callback functor to be invoked as notification for any changes imposed onto the observed time entity. More...
 
void disconnect ()
 disconnect from observed entity and cease any change notification
 
void operator() (TI const &) const
 impose a new value to the connected target. More...
 
void operator() (Offset const &) const
 impose an offset to the connected target. More...
 
void operator() (int) const
 nudge the connected target by the given offset steps, using either the target's own grid (when quantised), or a 'natural' nudge grid More...
 

Private Member Functions

virtual void change (Duration &) const
 
virtual void change (TimeSpan &) const
 
virtual void change (QuTime &) const
 

Private Attributes

mutation::Propagator< TI > notifyListeners_
 

Additional Inherited Members

- 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...
 
- Protected Member Functions inherited from Mutator< TI >
template<class TAR >
void bind_to (TAR &target) const
 
void ensure_isArmed () const
 
void unbind ()
 
- Static Protected Member Functions inherited from Mutation
static TimeValueimposeChange (TimeValue &, TimeValue const &)
 
static TimeValueimposeChange (TimeValue &, Offset const &)
 
static TimeValueimposeChange (TimeValue &, int)
 
static TimeValueimposeChange (QuTime &, int)
 
- Protected Attributes inherited from Mutator< TI >
Nudger nudge_
 
Ofsetter offset_
 
ValueSetter setVal_
 

Member Function Documentation

◆ operator()() [1/3]

void operator() ( TI const &  newValue) const

impose a new value to the connected target.

If applicable, the target will afterwards reflect that change, and listeners will be notified, passing the target's new state.

Exceptions
error::Stateif not connected to a target
Note
the actual change in the target also depends on the concrete target type and the type of the change. By default, the time value is changed; this may include grid alignment.

Definition at line 177 of file control.hpp.

◆ operator()() [2/3]

void operator() ( Offset const &  adjustment) const

impose an offset to the connected target.

If applicable, the target will be adjusted by the time offset, and listeners will be notified.

Exceptions
error::Stateif not connected to a target

Definition at line 191 of file control.hpp.

◆ operator()() [3/3]

void operator() ( int  offset_by_steps) const

nudge the connected target by the given offset steps, using either the target's own grid (when quantised), or a 'natural' nudge grid

Exceptions
error::Stateif not connected to a target

Definition at line 205 of file control.hpp.

◆ connectChangeNotification()

void connectChangeNotification ( SIG const &  toNotify)

install a callback functor to be invoked as notification for any changes imposed onto the observed time entity.

Parameters
toNotifyobject with operator()(TI const&)

Definition at line 224 of file control.hpp.

Referenced by TimelineState::setPlaybackPoint().

+ Here is the caller graph for this function:
+ Inheritance diagram for Control< TI >:
+ Collaboration diagram for Control< TI >:

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