Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > by-pkgid > df9ea7795df4854489abb269f13c9938 > files > 31

ksquirrel-libs-0.8.0-3mdv2009.0.i586.rpm

#ifndef POLYGON_HPP
#define POLYGON_HPP

class polygon
{
	protected:
		double side_length_;

	public:
		polygon() : side_length_(0)
		{}

		void set_side_length(double side_length)
		{
			side_length_ = side_length;
		}

		virtual double area() const = 0;
};

// the types of the class factories
typedef polygon* create_t();
typedef void destroy_t(polygon*);

#endif