29#include "Configuration.h"
31#include "Identified.h"
44 struct Timer : Identified<Timer>
47 static dclspc std::unique_ptr<Timer>
Make() noexcept;
51 virtual const
char*
TypeName() const noexcept = 0;
57 virtual
void Start() noexcept = 0;
68 virtual
void Reset() noexcept = 0;
75 virtual
void Pause() noexcept = 0;
151 virtual
void Update() = 0;
Value< Dimension< 0, 0, 1 > > Time
Time.
Definition DimensionedValues.h:329
Namespace of all the trax track libraries classes and methods.
Definition Collection.h:17
A jack a plug can get connected with.
Definition Jack.h:83
A MultiPlug provides a variable number of actual Plugs to one input slot.
Definition Plug.h:307
Interface for a registry that reconnects Plugs and Jacks according to their IDs.
Definition SocketRegistry.h:40
A timer to meassure time lapses.
Definition Timer.h:45
virtual void Lapse(Time timeLapse)=0
Sets the time span for the timer.
virtual MultiPlug & PlugToStart() noexcept=0
Plug whose pulses starts the timer.
virtual void RegisterSockets(SocketRegistry ®istry)=0
Registers all the Plugs with the registry and supplies the Jacks with plug ids for connecting.
virtual void UnregisterSockets(SocketRegistry ®istry)=0
Removes all references to Plugs and Jacks from the registry.
virtual Jack & JackOnTick() noexcept=0
If the timer decides that time is up it triggers a pulse in this Jack.
virtual void Reset() noexcept=0
Resets the timer.
virtual MultiPlug & PlugToPause() noexcept=0
Plug whose pulses pauses the timer.
virtual void Start() noexcept=0
Starts the timer.
virtual bool IsStarted() const noexcept=0
static dclspc std::unique_ptr< Timer > Make() noexcept
Makes a Timer object.
virtual Time GetTime() const =0
virtual Jack & JackOnStart() noexcept=0
If the timer is started, this Jack is triggered.
virtual const char * TypeName() const noexcept=0
virtual MultiPlug & PlugToReset() noexcept=0
Plug whose pulses resets the timer.
virtual Jack & JackOnPause() noexcept=0
If the timer is set to paused, this Jack is triggered.
virtual void Periodic(bool bPeriodic)=0
Sets wether the timer tick is happening only once or periodically.
virtual void SetTime(Time time)=0
Sets the currect time of the timer.
virtual Jack & JackOnReset() noexcept=0
If the timer is reset, this Jack is triggered.
virtual void Pause() noexcept=0
Pauses the timer.