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
18namespace yarp::robotinterface {
19
26{
27public:
29 {
30 XMLReaderResult result;
31 result.parsingIsSuccessful = false;
32 return result;
33 }
34
38 bool parsingIsSuccessful = false;
39
44};
45
52{
53public:
54 XMLReader();
55 virtual ~XMLReader();
56
63 XMLReaderResult getRobotFromFile(const std::string& filename,
65
72 XMLReaderResult getRobotFromString(const std::string& filename,
74
75 void setVerbose(bool verbose);
76 void setEnableDeprecated(bool enab);
77
78private:
79 class Private;
80 Private* const mPriv;
81
82}; // class XMLReader
83
84} // namespace yarp::robotinterface
85
86#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:56
Result of the parsing of yarp::robotinterface::XMLReader.
Definition: XMLReader.h:26
bool parsingIsSuccessful
True if the parsing was successful, false otherwise.
Definition: XMLReader.h:38
Robot robot
If parsingIsSuccessful is true, contains a valid robot instance.
Definition: XMLReader.h:43
static XMLReaderResult ParsingFailed()
Definition: XMLReader.h:28
Class to read an XML file.
Definition: XMLReader.h:52
yarp::robotinterface::XMLReader XMLReader
Definition: XMLReader.h:30
#define YARP_robotinterface_API
Definition: api.h:18