From 84ad096896e9948c722a957d07ed6868e252a9f7 Mon Sep 17 00:00:00 2001 From: Jonas Kohl Date: Thu, 29 Aug 2024 17:00:11 +0200 Subject: Initial commit --- includes/point.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 includes/point.h (limited to 'includes/point.h') diff --git a/includes/point.h b/includes/point.h new file mode 100644 index 0000000..311d64d --- /dev/null +++ b/includes/point.h @@ -0,0 +1,27 @@ +#ifndef POINT_H +#define POINT_H + +#include "oo.h" + +#define TYPE Point + +DEFINE_OBJECT(TYPE); + +// Constructor +CONSTRUCTOR(TYPE); + +// Methods +void METHOD_ARG(TYPE, init, float x, float y); + +int METHOD_ARG(TYPE, toString, char* buffer); + +// Properties (getters & setters) +GETTER(TYPE, float, x); +SETTER(TYPE, float, x); + +GETTER(TYPE, float, y); +SETTER(TYPE, float, y); + +#undef TYPE + +#endif -- cgit v1.2.3