all repos — fluxbox @ bca20c5db4b991f6404050bd79a1c354295ceb7f

custom fork of the fluxbox windowmanager

Make FbTk::Command inherit from FbTk::Slot

Command offers a subset of functionality and could be completely removed at some point.
Pavel Labath pavelo@centrum.sk
commit

bca20c5db4b991f6404050bd79a1c354295ceb7f

parent

3ad611928a86db3fdb4a8818da1394aa53eaeac7

1 files changed, 8 insertions(+), 3 deletions(-)

jump to
M src/FbTk/Command.hhsrc/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 <typename Ret=void> -class Command { +class Command: public Slot<Ret> { public: - virtual ~Command() { } virtual Ret execute() = 0; + virtual Ret operator()() { return execute(); } }; } // end namespace FbTk