YARP
Yet Another Robot Platform
xmlresloader.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef YARP_MANAGER_XMLRESLOADER
10 #define YARP_MANAGER_XMLRESLOADER
11 
12 #include <yarp/manager/ymm-types.h>
13 #include <yarp/manager/resource.h>
16 
17 namespace yarp {
18 namespace manager {
19 class TextParser;
20 
25 {
26 public:
27  XmlResLoader(const char* szFileName);
28  XmlResLoader(const char* szPath, const char* szResName);
29  ~XmlResLoader() override;
30  bool init() override;
31  void reset() override;
32  void fini() override;
33  GenericResource* getNextResource() override;
34 
35 protected:
36 
37 private:
38  std::string strName;
39  std::string strPath;
40  std::string strFileName;
41  std::vector<std::string> fileNames;
42  TextParser* parser;
43  ComputerContainer computers;
44  Computer dummyComputer;
45  bool parsXml(const char* szFile);
46 };
47 
48 } // namespace yarp
49 } // namespace manager
50 
51 
52 #endif // __YARP_MANAGER_XMLRESLOADER__
yarp::manager::XmlResLoader::reset
void reset() override
Definition: xmlresloader.cpp:121
yarp::manager::Computer
Definition: primresource.h:155
yarp::manager::XmlResLoader::XmlResLoader
XmlResLoader(const char *szFileName)
load only one module indicated by its xml file name
Definition: xmlresloader.cpp:47
yarp::manager::ResourceLoader
Abstract Class ResourceLoader.
Definition: manifestloader.h:77
yarp::manager::XmlResLoader
Class XmlResLoader.
Definition: xmlresloader.h:25
yarp::manager::XmlResLoader::fini
void fini() override
Definition: xmlresloader.cpp:128
yarp::manager::TextParser
Definition: textparser.h:24
primresource.h
resource.h
manifestloader.h
ymm-types.h
yarp::manager::XmlResLoader::getNextResource
GenericResource * getNextResource() override
Definition: xmlresloader.cpp:134
yarp::manager::XmlResLoader::init
bool init() override
Definition: xmlresloader.cpp:65
yarp::manager::XmlResLoader::~XmlResLoader
~XmlResLoader() override
Definition: xmlresloader.cpp:56
yarp::manager::GenericResource
Definition: resource.h:21
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18
yarp::manager::ComputerContainer
std::vector< Computer > ComputerContainer
Definition: primresource.h:206