aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Command.hh
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-07-09 21:25:28 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-07-10 12:16:35 (GMT)
commite983f45d19b79cbbeadeb1945166125dd5336fff (patch)
tree61606e7e4c39439788d41b70e6852699d70a4492 /src/FbTk/Command.hh
parent76c5d4de56ccbec67c7baebc46af58750312c340 (diff)
downloadfluxbox_pavel-e983f45d19b79cbbeadeb1945166125dd5336fff.zip
fluxbox_pavel-e983f45d19b79cbbeadeb1945166125dd5336fff.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/FbTk/Command.hh')
-rw-r--r--src/FbTk/Command.hh11
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
25namespace FbTk { 27namespace 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 */
28template <typename Ret=void> 33template <typename Ret=void>
29class Command { 34class Command: public Slot<Ret> {
30public: 35public:
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