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