YARP
Yet Another Robot Platform
XMLReader.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_ROBOTINTERFACE_XMLREADER_H
7 #define YARP_ROBOTINTERFACE_XMLREADER_H
8 
11 
12 #include <yarp/os/Searchable.h>
13 #include <yarp/os/Property.h>
14 
15 #include <string>
16 
17 
18 namespace yarp::robotinterface {
19 
24 {
25 public:
27  {
28  XMLReaderResult result;
29  result.parsingIsSuccessful = false;
30  return result;
31  }
32 
36  bool parsingIsSuccessful = false;
37 
42 };
43 
45 {
46 public:
47  XMLReader();
48  virtual ~XMLReader();
49 
56  XMLReaderResult getRobotFromFile(const std::string& filename,
57  const yarp::os::Searchable& config = yarp::os::Property());
58 
65  XMLReaderResult getRobotFromString(const std::string& filename,
66  const yarp::os::Searchable& config = yarp::os::Property());
67 
68  void setVerbose(bool verbose);
69  void setEnableDeprecated(bool enab);
70 
71 private:
72  class Private;
73  Private* const mPriv;
74 
75 }; // class XMLReader
76 
77 } // namespace yarp::robotinterface
78 
79 #endif // YARP_ROBOTINTERFACE_XMLREADER_H
A class for storing options and configuration information.
Definition: Property.h:33
A base class for nested structures that can be searched.
Definition: Searchable.h:63
Result of the parsing of XMLReader.
Definition: XMLReader.h:24
bool parsingIsSuccessful
True if the parsing was successful, false otherwise.
Definition: XMLReader.h:36
Robot robot
If parsingIsSuccessful is true, contains a valid robot instance.
Definition: XMLReader.h:41
static XMLReaderResult ParsingFailed()
Definition: XMLReader.h:26
yarp::robotinterface::XMLReader XMLReader
Definition: XMLReader.h:30
#define YARP_robotinterface_API
Definition: api.h:18