29#include "Configuration.h"
31#include "Identified.h"
33#include "spat/Frame.h"
46 enum class Type :
char{
55 static dclspc std::unique_ptr<Indicator>
Make( Type type )
noexcept;
59 virtual const char*
TypeName() const noexcept = 0;
112 virtual void Toggle(
bool pulse =
true ) = 0;
184 static dclspc std::unique_ptr<BinaryIndicator>
Make( Type type )
noexcept;
float Real
Underlying floating point type to be used with the dim library.
Definition DimensionedValues.h:190
Namespace of all the trax track libraries classes and methods.
Definition Collection.h:17
dclspc Indicator::Status ToIndicatorStatus(const std::string &status)
Makes a status value from a status string.
A Frame ("TNBFrame") describes a location in 3d space and an orientation using a right handed coordin...
Definition Frame.h:52
An Indicator with two states.
Definition Indicator.h:181
static dclspc std::unique_ptr< BinaryIndicator > Make(Type type) noexcept
Makes a BinaryIndicator object.
virtual Plug & PlugToOne() noexcept=0
Gets a Plug that sets the BinaryIndicator to one.
virtual Plug & PlugToTwo() noexcept=0
Gets a Plug that sets the BinaryIndicator to zero.
virtual Jack & JackOnOne() noexcept=0
Gets a Jack that pulses its Plug if the BinaryIndicator is set to one.
virtual Jack & JackOnTwo() noexcept=0
Gets a Jack that pulses its Plug if the BinaryIndicator is set to zero.
Interface for objects that indicates system states somehow.
Definition Indicator.h:45
virtual void RotateWithStatus(Status status, Real angle)=0
Set an angle to rotate the indicator by with its status.
virtual const char * TypeName() const noexcept=0
virtual Plug & PlugToToggle() noexcept=0
virtual Status Get() const =0
Gets the setting of the indicator.
virtual void UnregisterSockets(SocketRegistry ®istry)=0
Removes all references to Plugs and Jacks from the module.
virtual void Get(spat::Frame< Length, One > &frame) const =0
Gets the pose of the Indicator in global coordinates.
virtual bool IsValidState(Status status) const =0
virtual Plug & PlugTo(Status status)=0
Gets a Plug that switches to the specified Status.
virtual Jack & JackOnChange() noexcept=0
virtual void Toggle(bool pulse=true)=0
Sets the indicator to the next setting.
virtual Status Set(Status status, bool pulse=true)=0
Turns the indicator to the specified setting.
virtual Jack & JackOn(Status status)=0
Gets a Jack that pulses its Plug if the specified Status is set.
virtual void SetFrame(const spat::Frame< Length, One > &frame)=0
Set frame of reference.
Status
Possible Indicator states:
Definition Indicator.h:63
@ toggle
status toggle
Definition Indicator.h:80
@ count
Number of valid status.
Definition Indicator.h:79
@ change
status change
Definition Indicator.h:81
virtual Real RotateWithStatus(Status status) const =0
virtual const spat::Frame< Length, One > & GetFrame() const =0
Get frame of reference.
virtual void RegisterSockets(SocketRegistry ®istry)=0
Registers all the Plugs with the module and supplies the Jacks with plug ids for connecting.
static dclspc std::unique_ptr< Indicator > Make(Type type) noexcept
Makes a Indicator object.
A jack a plug can get connected with.
Definition Jack.h:83
A Plug of some object can get plugged into a jack of some object, specific to a certain event.
Definition Plug.h:57
Interface for a registry that reconnects Plugs and Jacks according to their IDs.
Definition SocketRegistry.h:40