a wildcard in a macro might work.
otherwise using a common parent class to swap the variables would minimalize the number of functions required
a wildcard in a macro might work.
otherwise using a common parent class to swap the variables would minimalize the number of functions required