Make FbTk::Command inherit from FbTk::Slot
Command offers a subset of functionality and could be completely removed at some point.
This commit is contained in:
parent
3ad611928a
commit
bca20c5db4
1 changed files with 8 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue