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 <QObject>
25 #include <QErrorMessage>
26 #include <memory>
28 
29 namespace armarx
30 {
31  /**
32  * @brief Abstract controller providing a set of methods which must be
33  * implemented by every controller
34  */
35  class AbstractController : public QObject
36  {
37  Q_OBJECT
38 
39  public:
40  /**
41  * @brief Initializes the controller
42  */
43  virtual void onInitComponent() = 0;
44 
45  /**
46  * @brief Connects all signals and slots of the controller
47  */
48  virtual void onConnectComponent() = 0;
49 
50  /**
51  * @brief Called whenever a component is disconnected
52  */
53  virtual void onDisconnectComponent() = 0;
54 
55  /**
56  * @brief Called on exit, cleans
57  */
58  virtual void onExitComponent() = 0;
59  };
60 
61  using AbstractControllerPtr = std::shared_ptr<AbstractController>;
62 }
63 
64 #endif // ABSTRACTCONTROLLER_H
armarx::AbstractController::onConnectComponent
virtual void onConnectComponent()=0
Connects all signals and slots of the controller.
armarx::AbstractController::onInitComponent
virtual void onInitComponent()=0
Initializes the controller.
armarx::AbstractController::onExitComponent
virtual void onExitComponent()=0
Called on exit, cleans.
armarx::AbstractControllerPtr
std::shared_ptr< AbstractController > AbstractControllerPtr
Definition: AbstractController.h:61
armarx::AbstractController::onDisconnectComponent
virtual void onDisconnectComponent()=0
Called whenever a component is disconnected.
Logging.h
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::AbstractController
Abstract controller providing a set of methods which must be implemented by every controller.
Definition: AbstractController.h:35