YARP
Yet Another Robot Platform
RobotInterfaceDTD.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef YARP_ROBOTINTERFACE_IMPL_ROBOTINTERFACEDTD_H
10 #define YARP_ROBOTINTERFACE_IMPL_ROBOTINTERFACEDTD_H
11 
19 
20 #include <yarp/os/LogStream.h>
21 #include <yarp/os/Network.h>
22 #include <yarp/os/Property.h>
23 
24 #include <algorithm>
25 #include <iterator>
26 #include <sstream>
27 #include <string>
28 #include <vector>
29 
30 class TiXmlUnknown;
31 
32 namespace yarp {
33 namespace robotinterface {
34 
35 // Represent something like this in the xml file
36 // <!DOCTYPE robot PUBLIC "-//YARP//DTD yarprobotinterface 1.0//EN" "http://www.yarp.it/DTD/yarprobotinterfaceV1.0.dtd">
38 {
39 public:
40  enum DocType
41  {
47  };
48 
51  identifier(""),
52  uri(""),
53  majorVersion(0),
54  minorVersion(0)
55  {
56  }
57 
58  bool parse(TiXmlUnknown* unknownNode, const std::string& curr_filename);
59 
60  bool valid();
61 
62  void setDefault();
63 
65  std::string identifier;
66  std::string uri;
67  unsigned int majorVersion;
68  unsigned int minorVersion;
69 
70  static const std::string baseUri;
71  static const std::string ext;
72 };
73 
74 
75 std::string DocTypeToString(RobotInterfaceDTD::DocType doctype);
76 
77 } // namespace robotinterface
78 } // namespace yarp
79 
80 #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: environment.h:18