oop_in_c/Figure.h

25 lines
385 B
C
Raw Normal View History

2012-04-30 18:59:30 +04:00
#ifndef __FIGURE_H__
#define __FIGURE_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 11:30:29 +04:00
const char* (*type) (const struct Figure *this);
void (*draw) (const struct Figure *this);
double (*area) (const struct Figure *this);
2012-04-30 18:59:30 +04:00
} Figure_interface;
typedef struct Figure
{
Figure_interface *vtable;
} Figure;
#endif // __FIGURE_H__