#ifndef __SHAPES_H__ #define __SHAPES_H__ /* Copyright (C) 2001,2002,2003 Ronnie Maor and Michael Brand */ #include struct Point { int x,y; Point(void) {} Point(int _x, int _y) : x(_x), y(_y) {} }; class Shape { public: virtual bool in_point(const Point& p) const=0; void draw(const Point& p) const; }; class Composite : public Shape { private: std::vector shapes; public: Composite(const std::vector& _shapes) : shapes(_shapes) {} virtual bool in_point(const Point& p) const; const std::vector& get_shapes(void) const { return shapes; } }; #endif