return type, default void

This commit is contained in:
fluxgen 2003-12-03 22:13:56 +00:00
parent 7238e21fc5
commit e76fda0c61

View file

@ -27,10 +27,10 @@
namespace FbTk {
/// a simple command
template <typename Receiver>
template <typename Receiver, typename ReturnType=void>
class SimpleCommand: public Command {
public:
typedef void (Receiver::* Action)();
typedef ReturnType (Receiver::* Action)();
SimpleCommand(Receiver &r, Action a):
m_receiver(r), m_action(a) { }
void execute() { (m_receiver.*m_action)(); }