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