#include <shapefactory.h>
Static Public Member Functions | |
static Shape * | createShape (std::string name) |
static Shape* RandomSizeShapeFactory::createShape | ( | std::string | name | ) | [static] |
Static factory method for creating shapes. Takes in a string representation of a shape and returns a pointer to that particular shape. Only works for shapes that derive from the Shape object. Center points for returned shapes will always be (0,0).
name | The name of the shape to generate (e.g. "triangle", "rectangle", or "circle"). Input is case-sensitive. |