6 #define AL_declare(this) ArrayList this; int this##_len = (0)
7 #define AL_init(this, n, default, T) \
10 this = buf_create(); \
12 for (int i = 0; i < this##_len; ++i) \
14 const _AL_type__##T() it = default; \
15 AL_set##T(this, i, it); \
20 #define _AL_type__s() string
21 #define AL_gets(this, idx) bufstr_get(this, idx)
22 #define AL_sets(this, idx, val) bufstr_set(this, idx, val)
24 #define _AL_type__f() float
25 #define AL_getf(this, idx) stof(AL_gets(this, idx))
26 #define AL_setf(this, idx, val) AL_sets(this, idx, ftos(val))
28 #define _AL_type__e() entity
29 #define AL_gete(this, idx) ftoe(AL_getf(this, idx))
30 #define AL_sete(this, idx, val) AL_setf(this, idx, etof(val))
32 #define AL_EACH(this, T, cond, body) \
35 const noref ArrayList _al = this; \
36 for (int i = 0, n = this##_len; i < n; ++i) \
38 const noref _AL_type__##T() it = AL_get##T(_al, i); \