Код:
class C1;
class C2;
class FunctorA : public Functor {
public:
virtual void Call( C1 & smth) { smth->RunA(); }
};
class FunctorB : public Functor {
public:
virtual void Call(C2 & smth) { smth->RunB(); }
};
...
Functor fTable[2];
... fill table here
...
fTable[0].Call(); // вызов RunA();
fTable[1].Call();// вызов RunВ();
что-то в этом роде ?