StopStrategyFactory.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5  *
6  * ArmarX is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * ArmarX is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * @package ArmarXCore::core
19  * @author Nicola Miskowiec
20  * @date 2016
21  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22  * GNU General Public License
23  */
24 
25 
26 #pragma once
27 
28 #include "ApplicationStopper.h"
29 #include "StopStrategy.h"
30 
31 namespace ScenarioManager::Exec
32 {
33  /**
34  * @class StopStrategyFactory
35  * @ingroup exec
36  * @brief Creates different instances of StopStrategy.
37  * This Factory creates different types of stop-strategies.
38  */
40  {
41 
42  public:
43  /**
44  * Creates a StopStrategy that simply tries to stop the application.
45  * @param appStopper stopper used by the strategy to stop the application
46  * @return the created strategy
47  */
49 
50  /**
51  * Creates a StopStrategy that first tries to stop the application, the waits a certain amount of time,
52  * then kills the application.
53  * @param appStopper stopper used by the strategy to stop the application
54  * @param delay delay between stop and kill
55  * @return the created strategy
56  */
58 
60  };
61 
62 }
ScenarioManager::Exec
Definition: ApplicationStarter.h:35
ScenarioManager::Exec::ApplicationStopperPtr
std::shared_ptr< ApplicationStopper > ApplicationStopperPtr
Definition: ApplicationStopper.h:55
ScenarioManager::Exec::StopStrategyPtr
std::shared_ptr< StopStrategy > StopStrategyPtr
Definition: Executor.h:46
ScenarioManager::Exec::StopStrategyFactory
Creates different instances of StopStrategy. This Factory creates different types of stop-strategies.
Definition: StopStrategyFactory.h:39
StopStrategy.h
ScenarioManager::Exec::StopStrategyFactory::getStopStrategy
StopStrategyPtr getStopStrategy(ApplicationStopperPtr appStopper)
Creates a StopStrategy that simply tries to stop the application.
Definition: StopStrategyFactory.cpp:35
ScenarioManager::Exec::StopStrategyFactory::getKillStrategy
StopStrategyPtr getKillStrategy(ApplicationStopperPtr appStopper)
Definition: StopStrategyFactory.cpp:45
ScenarioManager::Exec::StopStrategyFactory::getStopAndKillStrategy
StopStrategyPtr getStopAndKillStrategy(ApplicationStopperPtr appStopper, int delay)
Creates a StopStrategy that first tries to stop the application, the waits a certain amount of time,...
Definition: StopStrategyFactory.cpp:40
ApplicationStopper.h