YARP
Yet Another Robot Platform
Types.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_TYPES_H
7 #define YARP_ROBOTINTERFACE_TYPES_H
8 
10 
11 #include <iosfwd>
12 #include <list>
13 #include <string>
14 #include <vector>
15 
16 namespace yarp {
17 
18 namespace os {
19 class Thread;
20 class LogStream;
21 } // namespace os
22 
23 namespace robotinterface {
24 
25 class Param;
26 class Action;
27 class Device;
28 class Robot;
29 
30 typedef std::vector<robotinterface::Param> ParamList;
31 typedef std::vector<robotinterface::Action> ActionList;
32 typedef std::vector<robotinterface::Device> DeviceList;
33 typedef std::list<yarp::os::Thread*> ThreadList;
34 
35 YARP_robotinterface_API bool hasParam(const robotinterface::ParamList& list, const std::string& name);
36 YARP_robotinterface_API std::string findParam(const robotinterface::ParamList& list, const std::string& name);
37 YARP_robotinterface_API bool hasGroup(const robotinterface::ParamList& list, const std::string& name);
38 YARP_robotinterface_API std::string findGroup(const robotinterface::ParamList& list, const std::string& name);
40 
42 {
50 
51  ActionPhaseReserved = 0xFF
52 };
53 
56 // Required by TiXmlElement::QueryValueAttribute<robotinterface::ActionPhase>
57 YARP_robotinterface_API void operator>>(const std::stringstream& sstream, robotinterface::ActionPhase& actionphase);
58 
59 
61 {
63 
70 
71  ActionTypeCustom = 0xFF
72 };
73 
76 // Required by TiXmlElement::QueryValueAttribute<robotinterface::ActionType>
77 YARP_robotinterface_API void operator>>(const std::stringstream& sstream, robotinterface::ActionType& actiontype);
78 
79 } // namespace robotinterface
80 } // namespace yarp
81 
82 #endif // YARP_ROBOTINTERFACE_TYPES_H
yarp::robotinterface::Param Param
Definition: Param.h:26
yarp::robotinterface::Device Device
Definition: Device.h:31
yarp::robotinterface::Action Action
Definition: Action.h:26
robotinterface::ParamList mergeDuplicateGroups(const robotinterface::ParamList &list)
Definition: Types.cpp:58
std::vector< robotinterface::Action > ActionList
Definition: Types.h:31
std::string ActionTypeToString(robotinterface::ActionType actiontype)
Definition: Types.cpp:147
void operator>>(const std::stringstream &sstream, robotinterface::ActionPhase &actionphase)
Definition: Types.cpp:120
bool hasParam(const robotinterface::ParamList &list, const std::string &name)
Definition: Types.cpp:16
std::vector< robotinterface::Param > ParamList
Definition: Types.h:28
std::string findGroup(const robotinterface::ParamList &list, const std::string &name)
Definition: Types.cpp:47
robotinterface::ActionPhase StringToActionPhase(const std::string &phase)
Definition: Types.cpp:81
robotinterface::ActionType StringToActionType(const std::string &type)
Definition: Types.cpp:126
bool hasGroup(const robotinterface::ParamList &list, const std::string &name)
Definition: Types.cpp:37
std::string findParam(const robotinterface::ParamList &list, const std::string &name)
Definition: Types.cpp:26
std::vector< robotinterface::Device > DeviceList
Definition: Types.h:32
std::list< yarp::os::Thread * > ThreadList
Definition: Types.h:33
std::string ActionPhaseToString(robotinterface::ActionPhase actionphase)
Definition: Types.cpp:99
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_robotinterface_API
Definition: api.h:18