YARP
Yet Another Robot Platform
xmlmodloader.h
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 
6 #ifndef YARP_MANAGER_XMLMODLOADER
7 #define YARP_MANAGER_XMLMODLOADER
8 
10 #include <yarp/manager/module.h>
11 #include <yarp/manager/data.h>
13 
14 namespace yarp {
15 namespace manager {
16 
17 class TextParser;
21 class XmlModLoader : public ModuleLoader {
22 
23 public:
24  XmlModLoader(const char* szFileName);
25  XmlModLoader(const char* szPath, const char* szModuleName);
26  ~XmlModLoader() override;
27  bool init() override;
28  void reset() override;
29  void fini() override;
30  Module* getNextModule() override;
31 
32 protected:
33 
34 private:
35  std::string strName;
36  std::string strPath;
37  std::string strFileName;
38  std::vector<std::string> fileNames;
39  TextParser* parser;
40  Module module;
41  Module* parsXml(const char* szFile);
42 };
43 
44 } // namespace yarp
45 } // namespace manager
46 
47 
48 #endif // __YARP_MANAGER_XMLMODLOADER__
Abstract Class ModuleLoader.
Class Module.
Definition: module.h:100
Class XmlModLoader.
Definition: xmlmodloader.h:21
Module * getNextModule() override
XmlModLoader(const char *szFileName)
load only one module indicated by its xml file name
The main, catch-all namespace for YARP.
Definition: dirs.h:16