v2.0.0
Loading...
Searching...
No Matches
commandpattern.h
Go to the documentation of this file.
1//=============================================================================================================
25
26#ifndef COMMANDPATTERN_H
27#define COMMANDPATTERN_H
28
29//=============================================================================================================
30// INCLUDES
31//=============================================================================================================
32
33#include "../utils_global.h"
34
35//=============================================================================================================
36// QT INCLUDES
37//=============================================================================================================
38
39#include <QSharedPointer>
40#include <QString>
41
42//=============================================================================================================
43// DEFINE NAMESPACE UTILSLIB
44//=============================================================================================================
45
46namespace UTILSLIB
47{
48
49//=============================================================================================================
58{
59public:
60 typedef QSharedPointer<ICommand> SPtr;
61 typedef QSharedPointer<const ICommand> ConstSPtr;
62
63 //=========================================================================================================
67 virtual ~ICommand() {};
68
69 //=========================================================================================================
73 virtual void execute() = 0;
74};
75
76//Invoker
77//--> Use signal/slot
78
79//Receiver
80//--> Use signal/slot
81
82} // Namespace
83
84#endif // COMMANDPATTERN_H
Public umbrella header for UTILSLIB exposing the UTILSSHARED_EXPORT macro and build-info accessors.
Shared utilities (I/O helpers, spectral analysis, layout management, warp algorithms).
The ICommand interface provides the base class of every command of the command design pattern.
virtual void execute()=0
QSharedPointer< const ICommand > ConstSPtr
QSharedPointer< ICommand > SPtr