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
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
{
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">
34
class
RobotInterfaceDTD
35
{
36
public
:
37
enum
DocType
38
{
39
DocTypeUnknown
= 0,
40
DocTypeRobot
,
41
DocTypeDevices
,
42
DocTypeParams
,
43
DocTypeActions
,
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
54
DocType
type
{
DocTypeUnknown
};
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
Action.h
Device.h
LogStream.h
Network.h
Param.h
Property.h
Robot.h
Types.h
XMLReader.h
yarp::robotinterface::RobotInterfaceDTD
Definition:
RobotInterfaceDTD.h:35
yarp::robotinterface::RobotInterfaceDTD::valid
bool valid() const
Definition:
RobotInterfaceDTD.cpp:72
yarp::robotinterface::RobotInterfaceDTD::identifier
std::string identifier
Definition:
RobotInterfaceDTD.h:55
yarp::robotinterface::RobotInterfaceDTD::majorVersion
unsigned int majorVersion
Definition:
RobotInterfaceDTD.h:57
yarp::robotinterface::RobotInterfaceDTD::uri
std::string uri
Definition:
RobotInterfaceDTD.h:56
yarp::robotinterface::RobotInterfaceDTD::type
DocType type
Definition:
RobotInterfaceDTD.h:54
yarp::robotinterface::RobotInterfaceDTD::parse
bool parse(TiXmlUnknown *unknownNode, const std::string &curr_filename)
Definition:
RobotInterfaceDTD.cpp:86
yarp::robotinterface::RobotInterfaceDTD::RobotInterfaceDTD
RobotInterfaceDTD()=default
yarp::robotinterface::RobotInterfaceDTD::DocType
DocType
Definition:
RobotInterfaceDTD.h:38
yarp::robotinterface::RobotInterfaceDTD::DocTypeUnknown
@ DocTypeUnknown
Definition:
RobotInterfaceDTD.h:39
yarp::robotinterface::RobotInterfaceDTD::DocTypeActions
@ DocTypeActions
Definition:
RobotInterfaceDTD.h:43
yarp::robotinterface::RobotInterfaceDTD::DocTypeRobot
@ DocTypeRobot
Definition:
RobotInterfaceDTD.h:40
yarp::robotinterface::RobotInterfaceDTD::DocTypeParams
@ DocTypeParams
Definition:
RobotInterfaceDTD.h:42
yarp::robotinterface::RobotInterfaceDTD::DocTypeDevices
@ DocTypeDevices
Definition:
RobotInterfaceDTD.h:41
yarp::robotinterface::RobotInterfaceDTD::setDefault
void setDefault()
Definition:
RobotInterfaceDTD.cpp:77
yarp::robotinterface::RobotInterfaceDTD::ext
static const std::string ext
Definition:
RobotInterfaceDTD.h:61
yarp::robotinterface::RobotInterfaceDTD::minorVersion
unsigned int minorVersion
Definition:
RobotInterfaceDTD.h:58
yarp::robotinterface::RobotInterfaceDTD::baseUri
static const std::string baseUri
Definition:
RobotInterfaceDTD.h:60
yarp::robotinterface::DocTypeToString
std::string DocTypeToString(RobotInterfaceDTD::DocType doctype)
Definition:
RobotInterfaceDTD.cpp:56
yarp
The main, catch-all namespace for YARP.
Definition:
dirs.h:16
api.h
YARP
3.5.1
src
libYARP_robotinterface
src
yarp
robotinterface
impl
RobotInterfaceDTD.h
Generated on Sat Dec 25 2021 02:23:04 for YARP by
1.9.1