blob: 311d64d2badff229168a06bdade5744c54bd298d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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
|