92#ifndef LIB_TIME_CONTROL_POLICY_H
93#define LIB_TIME_CONTROL_POLICY_H
98#include <boost/utility/enable_if.hpp>
108 using boost::disable_if;
111 using std::placeholders::_1;
124 return is_same<T, Duration>::value;
131 return is_same<T, TimeSpan>::value;
138 return non_grid_aligned_TimeValue;
141#ifdef LIB_TIME_TIMEQUANT_H
143 maybeMaterialise (
QuTime const& alignedTime)
145 PQuant const& grid(alignedTime);
146 return QuTime(grid->materialise(alignedTime), grid);
157 template<
class TI,
class TAR>
193#ifdef LIB_TIME_TIMEQUANT_H
195 struct Builder<
QuTime, TAR>
206 struct Builder<QuTime, QuTime>
227 template<
class TI,
class TAR>
285 template<
class TI,
class SRC,
class TAR>
288 static function<TI(SRC
const&)>
301 : __or_< is_same<T,Duration>
309 : __or_< is_same<T,Duration>
310 , is_same<T,TimeSpan>
322 template<
class TI,
class SRC>
323 struct Policy<TI,SRC, typename disable_if< canMutateDuration<SRC>,
326 static function<TI(SRC
const&)>
346 return bind ( ignore_change_and_return_Zero );
359 static function<TI(
TimeSpan const&)>
372 static function<TI(
Duration const&)>
Duration is the internal Lumiera time metric.
static const Duration NIL
constant to indicate "no duration"
Interface: an opaque change imposed onto some time value.
virtual void change(Duration &) const =0
static TimeValue & imposeChange(TimeValue &, TimeValue const &)
grid aligned time specification, referring to a specific scale.
A time interval anchored at a specific point in time.
Modifying time and timecode values.
T const & maybeMaterialise(T const &non_grid_aligned_TimeValue)
PQuant getDefaultGridFallback()
std::shared_ptr< const Quantiser > PQuant
Implementation namespace for support and library code.
static TimeSpan buildChangedValue(Duration const &targetDuration)
static TimeSpan buildChangedValue(TAR const &target)
static TimeSpan buildChangedValue(TimeSpan const &target)
Implementation policy: how to build a new notification value of type TI, given a target time value en...
static TI buildChangedValue(TAR const &target)
Policy to tie the various detail policies together for providing actual value change operations.
static TI processValueChange(TAR &target, SRC const &change)
static TI useLengthAsChange(TAR &target, TimeSpan const &change)
static TI dontChange(TAR &target)
static TI mutateLength(TimeSpan &target, Duration const &change)
static TimeSpan mutateTimeSpan(TimeSpan &target, TimeSpan const &change)
static function< Duration(Duration const &)> buildChangeHandler(TAR &)
static Duration ignore_change_and_return_Zero()
static function< TI(Duration const &)> buildChangeHandler(TimeSpan &target)
static function< TI(SRC const &)> buildChangeHandler(Duration &target)
static function< TI(TimeSpan const &)> buildChangeHandler(Duration &target)
static function< TimeSpan(TimeSpan const &)> buildChangeHandler(TimeSpan &target)
Policy how to impose changes onto a connected target time value entity This policy will be parametris...
static function< TI(SRC const &)> buildChangeHandler(TAR &target)
a family of time value like entities and their relationships.