abstract factory: thick crust dough

This commit is contained in:
Alexander Zhirov 2022-11-14 00:45:45 +03:00
parent 0aabb39e79
commit 9a7cf7f6f8
2 changed files with 17 additions and 1 deletions

View File

@ -2,7 +2,7 @@ module abstractfactory.chicagopizzaingredientfactory;
import abstractfactory.pizzaingredientfactory; import abstractfactory.pizzaingredientfactory;
import abstractfactory.dough; import abstractfactory.dough;
import abstractfactory.thincrustdough; import abstractfactory.thickcrustdough;
import abstractfactory.sauce; import abstractfactory.sauce;
import abstractfactory.plumtomatosauce; import abstractfactory.plumtomatosauce;
import abstractfactory.cheese; import abstractfactory.cheese;

View File

@ -0,0 +1,16 @@
module abstractfactory.thickcrustdough;
import abstractfactory.dough;
class ThinCrustDough : Dough
{
override string toString() const @safe pure nothrow
{
return "ThickCrust style extra thick crust dough";
}
string opBinary(string op : "~")(string s)
{
return (cast(Object)this).toString() ~ s;
}
}