YARP
Yet Another Robot Platform
Types.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_TYPES_H
10 #define YARP_ROBOTINTERFACE_TYPES_H
11 
13 
14 #include <iosfwd>
15 #include <list>
16 #include <string>
17 #include <vector>
18 
19 namespace yarp {
20 
21 namespace os {
22 class Thread;
23 class LogStream;
24 } // namespace os
25 
26 namespace robotinterface {
27 namespace experimental {
28 
29 class Param;
30 class Action;
31 class Device;
32 class Robot;
33 
34 typedef std::vector<robotinterface::experimental::Param> ParamList;
35 typedef std::vector<robotinterface::experimental::Action> ActionList;
36 typedef std::vector<robotinterface::experimental::Device> DeviceList;
37 typedef std::list<yarp::os::Thread*> ThreadList;
38 
39 YARP_robotinterface_API bool hasParam(const robotinterface::experimental::ParamList& list, const std::string& name);
40 YARP_robotinterface_API std::string findParam(const robotinterface::experimental::ParamList& list, const std::string& name);
41 YARP_robotinterface_API bool hasGroup(const robotinterface::experimental::ParamList& list, const std::string& name);
42 YARP_robotinterface_API std::string findGroup(const robotinterface::experimental::ParamList& list, const std::string& name);
44 
46 {
54 
55  ActionPhaseReserved = 0xFF
56 };
57 
60 // Required by TiXmlElement::QueryValueAttribute<robotinterface::ActionPhase>
61 YARP_robotinterface_API void operator>>(const std::stringstream& sstream, robotinterface::experimental::ActionPhase& actionphase);
62 
63 
65 {
67 
74 
75  ActionTypeCustom = 0xFF
76 };
77 
80 // Required by TiXmlElement::QueryValueAttribute<robotinterface::ActionType>
81 YARP_robotinterface_API void operator>>(const std::stringstream& sstream, robotinterface::experimental::ActionType& actiontype);
82 
83 } // namespace experimental
84 } // namespace robotinterface
85 } // namespace yarp
86 
87 #endif // YARP_ROBOTINTERFACE_TYPES_H
std::string findParam(const robotinterface::experimental::ParamList &list, const std::string &name)
Definition: Types.cpp:29
robotinterface::experimental::ActionType StringToActionType(const std::string &type)
Definition: Types.cpp:128
robotinterface::experimental::ParamList mergeDuplicateGroups(const robotinterface::experimental::ParamList &list)
Definition: Types.cpp:61
bool hasParam(const robotinterface::experimental::ParamList &list, const std::string &name)
Definition: Types.cpp:19
bool hasGroup(const robotinterface::experimental::ParamList &list, const std::string &name)
Definition: Types.cpp:40
std::string ActionPhaseToString(robotinterface::experimental::ActionPhase actionphase)
Definition: Types.cpp:101
robotinterface::experimental::ActionPhase StringToActionPhase(const std::string &phase)
Definition: Types.cpp:83
std::vector< robotinterface::experimental::Action > ActionList
Definition: Types.h:35
std::vector< robotinterface::experimental::Device > DeviceList
Definition: Types.h:36
std::string ActionTypeToString(robotinterface::experimental::ActionType actiontype)
Definition: Types.cpp:149
std::vector< robotinterface::experimental::Param > ParamList
Definition: Types.h:32
std::list< yarp::os::Thread * > ThreadList
Definition: Types.h:37
void operator>>(const std::stringstream &sstream, robotinterface::experimental::ActionPhase &actionphase)
Definition: Types.cpp:122
std::string findGroup(const robotinterface::experimental::ParamList &list, const std::string &name)
Definition: Types.cpp:50
The main, catch-all namespace for YARP.
Definition: environment.h:18
#define YARP_robotinterface_API
Definition: api.h:19