diff options
author | Pavel Labath <pavelo@centrum.sk> | 2011-07-09 21:25:28 (GMT) |
---|---|---|
committer | Pavel Labath <pavelo@centrum.sk> | 2011-09-14 17:39:10 (GMT) |
commit | bca20c5db4b991f6404050bd79a1c354295ceb7f (patch) | |
tree | 54c3e95e7be27a43ca68ab1f76cb9b67d5d22254 /src | |
parent | 3ad611928a86db3fdb4a8818da1394aa53eaeac7 (diff) | |
download | fluxbox_pavel-bca20c5db4b991f6404050bd79a1c354295ceb7f.zip fluxbox_pavel-bca20c5db4b991f6404050bd79a1c354295ceb7f.tar.bz2 |
Make FbTk::Command inherit from FbTk::Slot
Command offers a subset of functionality and could be completely removed at some point.
Diffstat (limited to 'src')
-rw-r--r-- | src/FbTk/Command.hh | 11 |
1 files 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 @@ | |||
22 | #ifndef FBTK_COMMAND_HH | 22 | #ifndef FBTK_COMMAND_HH |
23 | #define FBTK_COMMAND_HH | 23 | #define FBTK_COMMAND_HH |
24 | 24 | ||
25 | #include "Slot.hh" | ||
26 | |||
25 | namespace FbTk { | 27 | namespace FbTk { |
26 | 28 | ||
27 | /// Interface class for commands | 29 | /** Interface class for commands |
30 | * Actually, it's very similar to Slot (execute instead of operator()) and could be removed at | ||
31 | * some point. | ||
32 | */ | ||
28 | template <typename Ret=void> | 33 | template <typename Ret=void> |
29 | class Command { | 34 | class Command: public Slot<Ret> { |
30 | public: | 35 | public: |
31 | virtual ~Command() { } | ||
32 | virtual Ret execute() = 0; | 36 | virtual Ret execute() = 0; |
37 | virtual Ret operator()() { return execute(); } | ||
33 | }; | 38 | }; |
34 | 39 | ||
35 | } // end namespace FbTk | 40 | } // end namespace FbTk |