AbstractController.h
Go to the documentation of this file.
1/*
2* This file is part of ArmarX.
3*
4* ArmarX is free software; you can redistribute it and/or modify
5* it under the terms of the GNU General Public License version 2 as
6* published by the Free Software Foundation.
7*
8* ArmarX is distributed in the hope that it will be useful, but
9* WITHOUT ANY WARRANTY; without even the implied warranty of
10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11* GNU General Public License for more details.
12*
13* You should have received a copy of the GNU General Public License
14* along with this program. If not, see <http://www.gnu.org/licenses/>.
15*
16* \package RobotTrajectoryDesigner::gui-plugins::Controller::AbstractController
17* \author Max Beddies
18* \date 2018
19* \copyright http://www.gnu.org/licenses/gpl-2.0.txt
20* GNU General Public License
21*/
22#ifndef ABSTRACTCONTROLLER_H
23#define ABSTRACTCONTROLLER_H
24#include <memory>
25
26#include <QErrorMessage>
27#include <QObject>
28
30
31namespace armarx
32{
33 /**
34 * @brief Abstract controller providing a set of methods which must be
35 * implemented by every controller
36 */
37 class AbstractController : public QObject
38 {
39 Q_OBJECT
40
41 public:
42 /**
43 * @brief Initializes the controller
44 */
45 virtual void onInitComponent() = 0;
46
47 /**
48 * @brief Connects all signals and slots of the controller
49 */
50 virtual void onConnectComponent() = 0;
51
52 /**
53 * @brief Called whenever a component is disconnected
54 */
55 virtual void onDisconnectComponent() = 0;
56
57 /**
58 * @brief Called on exit, cleans
59 */
60 virtual void onExitComponent() = 0;
61 };
62
63 using AbstractControllerPtr = std::shared_ptr<AbstractController>;
64} // namespace armarx
65
66#endif // ABSTRACTCONTROLLER_H
Abstract controller providing a set of methods which must be implemented by every controller.
virtual void onConnectComponent()=0
Connects all signals and slots of the controller.
virtual void onExitComponent()=0
Called on exit, cleans.
virtual void onInitComponent()=0
Initializes the controller.
virtual void onDisconnectComponent()=0
Called whenever a component is disconnected.
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::shared_ptr< AbstractController > AbstractControllerPtr