2012-04-30 18:59:30 +04:00
|
|
|
#ifndef __FIGURE_H__
|
|
|
|
#define __FIGURE_H__
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "Object.h"
|
|
|
|
|
2012-05-01 00:55:56 +04:00
|
|
|
struct Figure;
|
|
|
|
|
2012-04-30 18:59:30 +04:00
|
|
|
typedef struct Figure_interface
|
|
|
|
{
|
|
|
|
Object_interface;
|
|
|
|
|
2012-05-01 00:55:56 +04:00
|
|
|
const char* (*type) (struct Figure *this);
|
|
|
|
void (*draw) (struct Figure *this);
|
|
|
|
double (*area) (struct Figure *this);
|
2012-04-30 18:59:30 +04:00
|
|
|
|
|
|
|
} Figure_interface;
|
|
|
|
|
|
|
|
typedef struct Figure
|
|
|
|
{
|
|
|
|
Figure_interface *vtable;
|
|
|
|
|
|
|
|
} Figure;
|
|
|
|
|
|
|
|
#endif // __FIGURE_H__
|