YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
singleapploader.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
8
9
10using namespace yarp::manager;
11
12
13SingleAppLoader::SingleAppLoader(const char* szModule, const char* szHost)
14{
15 if (szModule) {
16 strModule = szModule;
17 }
18 if (szHost) {
19 strHost = szHost;
20 }
21}
22
23
25
26
28{
30 app.clear();
31 if(strModule.empty())
32 {
33 logger->addError("Empty module name.");
34 return false;
35 }
36
37 app.setName(strModule.c_str());
38 ModuleInterface module(strModule.c_str());
39 module.setHost(strHost.c_str());
40 app.addImodule(module);
41 return true;
42}
43
44
46{
47 app.clear();
48}
49
50
Class Application.
void setName(const char *szName)
bool addImodule(ModuleInterface &imod)
Singleton class ErrorLogger.
Definition utility.h:58
void addError(const char *szError)
Definition utility.cpp:126
static ErrorLogger * Instance()
Singleton class ErrorLogger.
Definition utility.cpp:98
Class ModuleInterface.
SingleAppLoader(const char *szModule, const char *strHost)
Application * getNextApplication() override