Listing 2: Sample input file

# File: shapes.txt
[ Line(Point(20,20),Point(60,80)),
  Line(Point(60,80),Point(100,20)),
  Line(Point(60,80),Point(60,140)),
  Line(Point(60,140),Point(20,100)),
  Line(Point(60,140),Point(100,100)), Circle(Point(60,160),20),
  Circle(Point(51,163),3), Circle(Point(69,163),3),
  Arc(Point(50,154), Point(60,144), Point(70,154)),
  Polygon([ Point(60,160),Point(56,154),Point(64,154) ])
# Note we can use the [,] syntax to pass vectors 
# as constructor arguments (here std::vector<Point> is
# the constructor argument expected by Polygon)
]
— End of Listing —