Added sources for Polygon and Rhomb

This commit is contained in:
Kolan Sh 2012-05-02 19:02:38 +04:00
parent 4031ac31e0
commit e10bfcc75d
6 changed files with 132 additions and 3 deletions

View File

@ -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 \

54
Polygon.c Normal file
View File

@ -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)
{
}

View File

@ -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);

59
Rhomb.c Normal file
View File

@ -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)
{
}

View File

@ -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);

1
main.c
View File

@ -4,6 +4,7 @@
int main (void)
{
Polygon_destroy (NULL);
/* unsigned long i = 0;
Figure *fig[3];