ApplicationStarter.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#pragma once
26
27#include <memory>
28
30
31namespace ScenarioManager
32{
33 class StatusManager;
34}
35
37{
38 /**
39 * @class ApplicationInstance
40 * @ingroup Exec
41 * @brief Interface for classes that handle the starting of applications
42 * Classes implementing this interface also need to implement a method to get the status of an application
43 */
45 {
46 public:
47 /**
48 * Starts an application.
49 * @param application application to be started.
50 */
52 StatusManager statusManager,
53 const std::string& commandLineParameters = "",
54 bool printOnly = false) = 0;
56 StatusManager statusManager,
57 const std::string& commandLineParameters = "",
58 bool printOnly = false) = 0;
59
60
61 /**
62 * Returns the status of an application.
63 * @param application application whose status is returned
64 * @return status of the application
65 */
66 virtual std::string getStatus(Data_Structure::ApplicationInstancePtr application,
67 StatusManager statusManager) = 0;
68
70 };
71
72 using ApplicationStarterPtr = std::shared_ptr<ApplicationStarter>;
73} // namespace ScenarioManager::Exec
virtual std::string getStatus(Data_Structure::ApplicationInstancePtr application, StatusManager statusManager)=0
Returns the status of an application.
virtual void startApplication(Data_Structure::ApplicationInstancePtr application, StatusManager statusManager, const std::string &commandLineParameters="", bool printOnly=false)=0
Starts an application.
virtual void startScenario(Data_Structure::ScenarioPtr scenario, StatusManager statusManager, const std::string &commandLineParameters="", bool printOnly=false)=0
std::shared_ptr< Scenario > ScenarioPtr
Definition Scenario.h:35
std::shared_ptr< ApplicationInstance > ApplicationInstancePtr
std::shared_ptr< ApplicationStarter > ApplicationStarterPtr