MNE-CPP  beta 1.0
commandpattern.h
Go to the documentation of this file.
1 //=============================================================================================================
36 #ifndef COMMANDPATTERN_H
37 #define COMMANDPATTERN_H
38 
39 
40 //*************************************************************************************************************
41 //=============================================================================================================
42 // INCLUDES
43 //=============================================================================================================
44 
45 #include "generics_global.h"
46 
47 
48 //*************************************************************************************************************
49 //=============================================================================================================
50 // QT STL INCLUDES
51 //=============================================================================================================
52 
53 #include <QSharedPointer>
54 #include <QString>
55 
56 
57 //=============================================================================================================
63 class ICommand
64 {
65 public:
66  typedef QSharedPointer<ICommand> SPtr;
67  typedef QSharedPointer<const ICommand> ConstSPtr;
69  //=========================================================================================================
73  virtual ~ICommand() {};
74 
75  //=========================================================================================================
79  virtual void execute() = 0;
80 
81 };
82 
83 //Invoker
84 //--> Use signal/slot
85 
86 //Receiver
87 //--> Use signal/slot
88 
89 
90 #endif // COMMANDPATTERN_H
QSharedPointer< const ICommand > ConstSPtr
virtual ~ICommand()
virtual void execute()=0
generics library export/import macros.
QSharedPointer< ICommand > SPtr
The ICommand interface provides the base class of every command of the command design pattern...