Lumiera  0.pre.03
»edityourfreedom«
control-impl.hpp File Reference

Go to the source code of this file.

Description

Implementation building blocks for time modification and propagation.

The time::Control element allows to impose modifications to a connected time value entity and at the same time publish the changes to registered listeners. Due to the various flavours of actual time value entities, this is a complex undertaking, which is implemented here based on policies and template metaprogramming. This header/include defines two building blocks:

  • the actual Mutator to apply the changes to the target entity
  • a Propagator to register listeners and forward the changes.
implementation technique

The Mutator uses functor objects to encapsulate the actual modification operations. When attaching to a target time entity to be manipulated, these functor objects will be configured by binding them to the appropriate implementation function. And picking this actual implementation is done through a time::mutation::Policy element, using the concrete time entity types as template parameter. Thus, the actual implementation to be used is determined by the compiler, through the template specialisations contained in control-policy.hpp

Note
the header control-policy.hpp with the template specialisations is included way down, after the class definitions. This is done so for sake of readability
See also
TimeControl_test

Definition in file control-impl.hpp.

#include "lib/error.hpp"
#include "lib/time/mutation.hpp"
#include "lib/time/timevalue.hpp"
#include <functional>
#include <vector>
#include "lib/time/control-policy.hpp"

Classes

class  Mutator< TI >
 Implementation building block: impose changes to a Time element. More...
 
class  Propagator< TI >
 Implementation building block: propagate changes to listeners. More...
 

Namespaces

 lib
 Implementation namespace for support and library code.
 
 lib::time
 
 lib::time::mutation