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
12
#include <
yarp/robotinterface/api.h
>
13
#include <
yarp/robotinterface/experimental/Action.h
>
14
#include <
yarp/robotinterface/experimental/Device.h
>
15
#include <
yarp/robotinterface/experimental/Param.h
>
16
#include <
yarp/robotinterface/experimental/Robot.h
>
17
#include <
yarp/robotinterface/experimental/Types.h
>
18
#include <
yarp/robotinterface/experimental/XMLReader.h
>
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">
37
class
RobotInterfaceDTD
38
{
39
public
:
40
enum
DocType
41
{
42
DocTypeUnknown
= 0,
43
DocTypeRobot
,
44
DocTypeDevices
,
45
DocTypeParams
,
46
DocTypeActions
,
47
};
48
49
RobotInterfaceDTD
() :
50
type
(
DocTypeUnknown
),
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
64
DocType
type
;
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
Action.h
Device.h
LogStream.h
Network.h
Param.h
Property.h
Robot.h
Types.h
XMLReader.h
yarp::robotinterface::RobotInterfaceDTD
Definition:
RobotInterfaceDTD.h:38
yarp::robotinterface::RobotInterfaceDTD::valid
bool valid()
Definition:
RobotInterfaceDTD.cpp:72
yarp::robotinterface::RobotInterfaceDTD::identifier
std::string identifier
Definition:
RobotInterfaceDTD.h:65
yarp::robotinterface::RobotInterfaceDTD::majorVersion
unsigned int majorVersion
Definition:
RobotInterfaceDTD.h:67
yarp::robotinterface::RobotInterfaceDTD::uri
std::string uri
Definition:
RobotInterfaceDTD.h:66
yarp::robotinterface::RobotInterfaceDTD::type
DocType type
Definition:
RobotInterfaceDTD.h:64
yarp::robotinterface::RobotInterfaceDTD::parse
bool parse(TiXmlUnknown *unknownNode, const std::string &curr_filename)
Definition:
RobotInterfaceDTD.cpp:86
yarp::robotinterface::RobotInterfaceDTD::DocType
DocType
Definition:
RobotInterfaceDTD.h:41
yarp::robotinterface::RobotInterfaceDTD::DocTypeUnknown
@ DocTypeUnknown
Definition:
RobotInterfaceDTD.h:42
yarp::robotinterface::RobotInterfaceDTD::DocTypeActions
@ DocTypeActions
Definition:
RobotInterfaceDTD.h:46
yarp::robotinterface::RobotInterfaceDTD::DocTypeRobot
@ DocTypeRobot
Definition:
RobotInterfaceDTD.h:43
yarp::robotinterface::RobotInterfaceDTD::DocTypeParams
@ DocTypeParams
Definition:
RobotInterfaceDTD.h:45
yarp::robotinterface::RobotInterfaceDTD::DocTypeDevices
@ DocTypeDevices
Definition:
RobotInterfaceDTD.h:44
yarp::robotinterface::RobotInterfaceDTD::RobotInterfaceDTD
RobotInterfaceDTD()
Definition:
RobotInterfaceDTD.h:49
yarp::robotinterface::RobotInterfaceDTD::setDefault
void setDefault()
Definition:
RobotInterfaceDTD.cpp:77
yarp::robotinterface::RobotInterfaceDTD::ext
static const std::string ext
Definition:
RobotInterfaceDTD.h:71
yarp::robotinterface::RobotInterfaceDTD::minorVersion
unsigned int minorVersion
Definition:
RobotInterfaceDTD.h:68
yarp::robotinterface::RobotInterfaceDTD::baseUri
static const std::string baseUri
Definition:
RobotInterfaceDTD.h:70
yarp::robotinterface::DocTypeToString
std::string DocTypeToString(RobotInterfaceDTD::DocType doctype)
Definition:
RobotInterfaceDTD.cpp:56
yarp
The main, catch-all namespace for YARP.
Definition:
environment.h:18
api.h
YARP
3.4.6
src
libYARP_robotinterface
src
yarp
robotinterface
impl
RobotInterfaceDTD.h
Generated on Sat Jul 3 2021 02:17:05 for YARP by
1.9.1