The best solution I can think of is to have a method within the class that maps a string to a function, and have it called through there.

Jeff