YARP
Yet Another Robot Platform
Loading...
Searching...
No Matches
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
9
#include <
yarp/robotinterface/api.h
>
10
#include <
yarp/robotinterface/Action.h
>
11
#include <
yarp/robotinterface/Device.h
>
12
#include <
yarp/robotinterface/Param.h
>
13
#include <
yarp/robotinterface/Robot.h
>
14
#include <
yarp/robotinterface/Types.h
>
15
#include <
yarp/robotinterface/XMLReader.h
>
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::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">
33
class
RobotInterfaceDTD
34
{
35
public
:
36
enum
DocType
37
{
38
DocTypeUnknown
= 0,
39
DocTypeRobot
,
40
DocTypeDevices
,
41
DocTypeParams
,
42
DocTypeActions
,
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
53
DocType
type
{
DocTypeUnknown
};
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
64
std::string
DocTypeToString
(
RobotInterfaceDTD::DocType
doctype);
65
66
}
// namespace yarp::robotinterface
67
68
#endif
// YARP_ROBOTINTERFACE_ROBOTINTERFACEDTD_H
Action.h
Device.h
LogStream.h
Network.h
Param.h
Property.h
Robot.h
Types.h
XMLReader.h
yarp::robotinterface::RobotInterfaceDTD
Definition
RobotInterfaceDTD.h:34
yarp::robotinterface::RobotInterfaceDTD::valid
bool valid() const
Definition
RobotInterfaceDTD.cpp:71
yarp::robotinterface::RobotInterfaceDTD::identifier
std::string identifier
Definition
RobotInterfaceDTD.h:54
yarp::robotinterface::RobotInterfaceDTD::majorVersion
unsigned int majorVersion
Definition
RobotInterfaceDTD.h:56
yarp::robotinterface::RobotInterfaceDTD::uri
std::string uri
Definition
RobotInterfaceDTD.h:55
yarp::robotinterface::RobotInterfaceDTD::type
DocType type
Definition
RobotInterfaceDTD.h:53
yarp::robotinterface::RobotInterfaceDTD::parse
bool parse(TiXmlUnknown *unknownNode, const std::string &curr_filename)
Definition
RobotInterfaceDTD.cpp:85
yarp::robotinterface::RobotInterfaceDTD::RobotInterfaceDTD
RobotInterfaceDTD()=default
yarp::robotinterface::RobotInterfaceDTD::DocType
DocType
Definition
RobotInterfaceDTD.h:37
yarp::robotinterface::RobotInterfaceDTD::DocTypeUnknown
@ DocTypeUnknown
Definition
RobotInterfaceDTD.h:38
yarp::robotinterface::RobotInterfaceDTD::DocTypeActions
@ DocTypeActions
Definition
RobotInterfaceDTD.h:42
yarp::robotinterface::RobotInterfaceDTD::DocTypeRobot
@ DocTypeRobot
Definition
RobotInterfaceDTD.h:39
yarp::robotinterface::RobotInterfaceDTD::DocTypeParams
@ DocTypeParams
Definition
RobotInterfaceDTD.h:41
yarp::robotinterface::RobotInterfaceDTD::DocTypeDevices
@ DocTypeDevices
Definition
RobotInterfaceDTD.h:40
yarp::robotinterface::RobotInterfaceDTD::setDefault
void setDefault()
Definition
RobotInterfaceDTD.cpp:76
yarp::robotinterface::RobotInterfaceDTD::ext
static const std::string ext
Definition
RobotInterfaceDTD.h:60
yarp::robotinterface::RobotInterfaceDTD::minorVersion
unsigned int minorVersion
Definition
RobotInterfaceDTD.h:57
yarp::robotinterface::RobotInterfaceDTD::baseUri
static const std::string baseUri
Definition
RobotInterfaceDTD.h:59
yarp::robotinterface
Definition
Action.h:11
yarp::robotinterface::DocTypeToString
std::string DocTypeToString(RobotInterfaceDTD::DocType doctype)
Definition
RobotInterfaceDTD.cpp:55
api.h
YARP
3.10.1+46-20250115.7+gitffb7a7e8b
src
libYARP_robotinterface
src
yarp
robotinterface
impl
RobotInterfaceDTD.h
Generated on Sat Jan 18 2025 02:26:56 for YARP by
1.9.8