Using Function objects to define valid operations on other objects
Consider that I've several objects of a token class...some of them being operands and most others being operators and functions.
How do I implement the ( ) overload , such that, when I call
..the particular operation takes place?..I thought about placing function pointers but can not do so in a good way..(i.e..which does not involve dozens of switch cases..!)..
random_object(<pointer to operand stack>) ;
Any hint is welcome..