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 
27 class TiXmlUnknown;
28 
29 namespace yarp {
30 namespace robotinterface {
31 
32 // Represent something like this in the xml file
33 // <!DOCTYPE robot PUBLIC "-//YARP//DTD yarprobotinterface 1.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV1.0.dtd">
35 {
36 public:
37  enum DocType
38  {
44  };
45 
46  RobotInterfaceDTD() = default;
47 
48  bool parse(TiXmlUnknown* unknownNode, const std::string& curr_filename);
49 
50  bool valid() const;
51 
52  void setDefault();
53 
55  std::string identifier;
56  std::string uri;
57  unsigned int majorVersion {0};
58  unsigned int minorVersion {0};
59 
60  static const std::string baseUri;
61  static const std::string ext;
62 };
63 
64 
65 std::string DocTypeToString(RobotInterfaceDTD::DocType doctype);
66 
67 } // namespace robotinterface
68 } // namespace yarp
69 
70 #endif // YARP_ROBOTINTERFACE_ROBOTINTERFACEDTD_H
bool parse(TiXmlUnknown *unknownNode, const std::string &curr_filename)
std::string DocTypeToString(RobotInterfaceDTD::DocType doctype)
The main, catch-all namespace for YARP.
Definition: dirs.h:16