YARP
Yet Another Robot Platform
RobotInterfaceDTD.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_IMPL_ROBOTINTERFACEDTD_H
7#define YARP_ROBOTINTERFACE_IMPL_ROBOTINTERFACEDTD_H
8
16
17#include <yarp/os/LogStream.h>
18#include <yarp/os/Network.h>
19#include <yarp/os/Property.h>
20
21#include <algorithm>
22#include <iterator>
23#include <sstream>
24#include <string>
25#include <vector>
26
27class TiXmlUnknown;
28
29namespace yarp::robotinterface {
30
31// Represent something like this in the xml file
32// <!DOCTYPE robot PUBLIC "-//YARP//DTD yarprobotinterface 1.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV1.0.dtd">
34{
35public:
37 {
43 };
44
45 RobotInterfaceDTD() = default;
46
47 bool parse(TiXmlUnknown* unknownNode, const std::string& curr_filename);
48
49 bool valid() const;
50
51 void setDefault();
52
54 std::string identifier;
55 std::string uri;
56 unsigned int majorVersion {0};
57 unsigned int minorVersion {0};
58
59 static const std::string baseUri;
60 static const std::string ext;
61};
62
63
65
66} // namespace yarp::robotinterface
67
68#endif // YARP_ROBOTINTERFACE_ROBOTINTERFACEDTD_H
bool parse(TiXmlUnknown *unknownNode, const std::string &curr_filename)
std::string DocTypeToString(RobotInterfaceDTD::DocType doctype)