|
|
@ -42,10 +42,37 @@ TR_INTERFACE(TR_Iterable) { |
|
|
TR_iterableRewind((this)); \ |
|
|
TR_iterableRewind((this)); \ |
|
|
for (; TR_iterableValid((this)); TR_iterableNext((this))) |
|
|
for (; TR_iterableValid((this)); TR_iterableNext((this))) |
|
|
|
|
|
|
|
|
extern void * TR_iterableCurrent(void *); |
|
|
|
|
|
extern void TR_iterableNext(void *); |
|
|
|
|
|
extern void TR_iterableRewind(void *); |
|
|
|
|
|
extern int TR_iterableValid(void *); |
|
|
|
|
|
|
|
|
inline |
|
|
|
|
|
void * |
|
|
|
|
|
TR_iterableCurrent(void * iterable) |
|
|
|
|
|
{ |
|
|
|
|
|
void * ret; |
|
|
|
|
|
TR_RETCALL(iterable, TR_Iterable, current, ret); |
|
|
|
|
|
return ret; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
inline |
|
|
|
|
|
void |
|
|
|
|
|
TR_iterableNext(void * iterable) |
|
|
|
|
|
{ |
|
|
|
|
|
TR_CALL(iterable, TR_Iterable, next); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
inline |
|
|
|
|
|
void |
|
|
|
|
|
TR_iterableRewind(void * iterable) |
|
|
|
|
|
{ |
|
|
|
|
|
TR_CALL(iterable, TR_Iterable, rewind); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
inline |
|
|
|
|
|
int |
|
|
|
|
|
TR_iterableValid(void * iterable) |
|
|
|
|
|
{ |
|
|
|
|
|
int ret; |
|
|
|
|
|
TR_RETCALL(iterable, TR_Iterable, valid, ret); |
|
|
|
|
|
return ret; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
#endif // __TR_INTERFACE_ITERABLE_H__ |
|
|
#endif // __TR_INTERFACE_ITERABLE_H__ |
|
|
|
|
|
|
|
|
|