From bca20c5db4b991f6404050bd79a1c354295ceb7f Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Sat, 9 Jul 2011 23:25:28 +0200 Subject: Make FbTk::Command inherit from FbTk::Slot Command offers a subset of functionality and could be completely removed at some point. --- src/FbTk/Command.hh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/FbTk/Command.hh b/src/FbTk/Command.hh index f1eb8f2..6a15d33 100644 --- a/src/FbTk/Command.hh +++ b/src/FbTk/Command.hh @@ -22,14 +22,19 @@ #ifndef FBTK_COMMAND_HH #define FBTK_COMMAND_HH +#include "Slot.hh" + namespace FbTk { -/// Interface class for commands +/** Interface class for commands + * Actually, it's very similar to Slot (execute instead of operator()) and could be removed at + * some point. + */ template -class Command { +class Command: public Slot { public: - virtual ~Command() { } virtual Ret execute() = 0; + virtual Ret operator()() { return execute(); } }; } // end namespace FbTk -- cgit v0.11.2