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
28
29
30
31
32
33
34
35
|
#ifndef RECT_H
#define RECT_H
#include "oo.h"
#define TYPE Rect
DEFINE_OBJECT(TYPE);
// Constructor
CONSTRUCTOR(TYPE);
// Methods
void METHOD_ARG(TYPE, init, int l, int t, int w, int h);
int METHOD_ARG(TYPE, toString, char* buffer);
// Properties (getters & setters)
GETTER(TYPE, int, left);
SETTER(TYPE, int, left);
GETTER(TYPE, int, top);
SETTER(TYPE, int, top);
GETTER(TYPE, int, width);
SETTER(TYPE, int, width);
GETTER(TYPE, int, height);
SETTER(TYPE, int, height);
GETTER(TYPE, int, right);
GETTER(TYPE, int, bottom);
#undef TYPE
#endif
|