patterns/facade/hometheater/projector.d

42 lines
715 B
D
Raw Normal View History

2022-12-05 07:38:19 +00:00
module projector;
import streamingplayer;
import std.stdio : writeln;
class Projector
{
private string description;
private StreamingPlayer player;
this(string description, StreamingPlayer player)
{
this.description = description;
this.player = player;
}
void on()
{
writeln(description ~ " on");
}
void off()
{
writeln(description ~ " off");
}
void wideScreenMode()
{
writeln(description ~ " in widescreen mode (16x9 aspect ratio)");
}
void tvMode()
{
writeln(description ~ " in tv mode (4x3 aspect ratio)");
}
override string toString() const
{
return description;
}
}