mirror of
https://gitee.com/apaki/cmake_demo.git
synced 2025-05-18 04:11:37 +08:00
29 lines
418 B
C
29 lines
418 B
C
|
|
#ifndef _CIRCLE_H_
|
|
#define _CIRCLE_H_
|
|
|
|
#include "common.h"
|
|
#include "shape.h"
|
|
|
|
struct _circle
|
|
{
|
|
int invalid;
|
|
|
|
// super
|
|
struct _shape *shape;
|
|
|
|
// attribute
|
|
double radius;
|
|
|
|
// method
|
|
// void (*area)(void *self);
|
|
// void (*draw)(void *self);
|
|
};
|
|
|
|
struct _circle *circle_new(double radius);
|
|
|
|
double circle_area(void *self, void *parent);
|
|
void circle_draw(void *self, void *parent);
|
|
|
|
#endif
|