diff --git a/Makefile b/Makefile index c51b7d6..f66945d 100644 --- a/Makefile +++ b/Makefile @@ -96,7 +96,9 @@ clean: #________________________________| target_objs0 = \ main.o \ - Figure.o + Figure.o \ + Polygon.o \ + Rhomb.o $(TARGET0): $(target_objs0) $(CC) $(LDFLAGS) -o $@ $(target_objs0) @@ -109,6 +111,19 @@ main.o: \ Polygon.h \ Rhomb.h +Rhomb.o: \ + Rhomb.c \ + Figure.h \ + Object.h \ + Polygon.h \ + Rhomb.h + +Polygon.o: \ + Polygon.c \ + Figure.h \ + Object.h \ + Polygon.h + Figure.o: \ Figure.c \ Figure.h \ diff --git a/Polygon.c b/Polygon.c new file mode 100644 index 0000000..ca00ac1 --- /dev/null +++ b/Polygon.c @@ -0,0 +1,54 @@ +#include "Polygon.h" + +/* private */ +static const char* __Polygon_type () +{ + return "Polygon"; +} + +static Polygon* __Polygon_clone (const Polygon *this) +{ + +} + +static void __Polygon_destroy (Polygon *this) +{ + +} + +static void __Polygon_draw (const Polygon *this) +{ + +} + +static double __Polygon_area (const Polygon *this) +{ + +} + +static double __Polygon_max_diag (const Polygon *this) +{ + +} + +/* public */ +Polygon* Polygon_new (const struct point *points) +{ + +} + +/* considered to be protected */ +void Polygon_constructor (Polygon *this, const struct point *points) +{ + +} + +void Polygon_destructor (Polygon *this) +{ + +} + +void Polygon_copy (Polygon *dest, const Polygon *src) +{ + +} diff --git a/Polygon.h b/Polygon.h index 0100c3a..1176904 100644 --- a/Polygon.h +++ b/Polygon.h @@ -63,7 +63,7 @@ static inline double Polygon_max_diag (const Polygon *this) } /* considered to be protected */ -void Polygon_constructor (Polygon *this); +void Polygon_constructor (Polygon *this, const struct point *points); void Polygon_destructor (Polygon *this); void Polygon_copy (Polygon *dest, const Polygon *src); diff --git a/Rhomb.c b/Rhomb.c new file mode 100644 index 0000000..3a21248 --- /dev/null +++ b/Rhomb.c @@ -0,0 +1,59 @@ +#include "Rhomb.h" + +/* private */ +static const char* __Rhomb_type () +{ + return "Rhomb"; +} + +static Rhomb* __Rhomb_clone (const Rhomb *this) +{ + +} + +static void __Rhomb_destroy (Rhomb *this) +{ + +} + +static void __Rhomb_draw (const Rhomb *this) +{ + +} + +static double __Rhomb_area (const Rhomb *this) +{ + +} + +static double __Rhomb_max_diag (const Rhomb *this) +{ + +} + +static int __Rhomb_is_square (const Rhomb *this) +{ + +} + +/* public */ +Rhomb* Rhomb_new (const struct point *points) +{ + +} + +/* considered to be protected */ +void Rhomb_constructor (Rhomb *this, const struct point *points) +{ + +} + +void Rhomb_destructor (Rhomb *this) +{ + +} + +void Rhomb_copy (Rhomb *dest, const Rhomb *src) +{ + +} diff --git a/Rhomb.h b/Rhomb.h index 31890ca..5ba5c0b 100644 --- a/Rhomb.h +++ b/Rhomb.h @@ -67,7 +67,7 @@ static inline int Rhomb_is_square (const Rhomb *this) } /* considered to be protected */ -void Rhomb_constructor (Rhomb *this); +void Rhomb_constructor (Rhomb *this, const struct point *points); void Rhomb_destructor (Rhomb *this); void Rhomb_copy (Rhomb *dest, const Rhomb *src); diff --git a/main.c b/main.c index 8f05298..370413c 100644 --- a/main.c +++ b/main.c @@ -4,6 +4,7 @@ int main (void) { + Polygon_destroy (NULL); /* unsigned long i = 0; Figure *fig[3];