4 `pushdef(`$1', `$2')_forloop(`$1', `$2', `$3', `$4')popdef(`$1')')
6 `$4`'ifelse($1, `$3', ,
7 `define(`$1', incr($1))_forloop(`$1', `$2', `$3', `$4')')')
9 define(`_PRINT_ARGS',`dnl
10 ifelse($#,1,,`$2 v$1`'ifelse($#,2,,`, _PRINT_ARGS(incr($1), shift(shift($@)))')')dnl
13 define(`_PRINT_ARGS2',`dnl
14 ifelse($#,1,,`v$1`'ifelse($#,2,,`, _PRINT_ARGS2(incr($1), shift(shift($@)))')')dnl
17 dnl PX_DEFINE_FUNC(func_name, ret_type, args...)
18 define(`PX_DEFINE_FUNC',`
19 sigc::slot< $2`'ifelse($#,2,,`, shift(shift($@))') > _slot_$1;
20 $2 $1(ifelse($#,2,,`_PRINT_ARGS(1,shift(shift($@)))')) {
21 return _slot_$1(ifelse($#,2,,`_PRINT_ARGS2(1,shift(shift($@)))'));
25 dnl PX_DEFINE_FUNC_CONST(func_name, ret_type, args...)
26 define(`PX_DEFINE_FUNC_CONST',`
27 sigc::slot< $2`'ifelse($#,2,,`, shift(shift($@))') > _slot_$1_const;
28 $2 $1(ifelse($#,2,,`_PRINT_ARGS(1,shift(shift($@)))'))const {
29 return _slot_$1_const(ifelse($#,2,,`_PRINT_ARGS2(1,shift(shift($@)))'));
33 define(`PX_DEFINE_DATA', `dnl
34 PX_DEFINE_FUNC_CONST(get_$1, $2)
35 PX_DEFINE_FUNC(set_$1, void, $2)