YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
PolyDriver.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef YARP_DEV_POLYDRIVER_H
8#define YARP_DEV_POLYDRIVER_H
9
10#include <yarp/dev/api.h>
11#include <yarp/dev/Drivers.h>
12
13namespace yarp::dev {
14
15
22 public DeviceDriver
23{
24public:
25 using DeviceDriver::open;
26
30 PolyDriver();
31
36 PolyDriver(const std::string& txt);
37
47
51 virtual ~PolyDriver();
52
53 PolyDriver(const PolyDriver& alt) = delete;
54 const PolyDriver& operator=(const PolyDriver& alt) = delete;
55
61 bool open(const std::string& txt);
62
72 bool open(yarp::os::Searchable& config) override;
73
81 bool link(PolyDriver& alt);
82
83
89 DeviceDriver *take();
90
98 bool give(DeviceDriver *dd, bool own);
99
100 bool close() override;
101
106 bool isValid() const;
107
108 DeviceDriver *getImplementation() override;
109
110private:
111 DeviceDriver *m_dd;
112
113 bool coreOpen(yarp::os::Searchable& config);
114
115#ifndef DOXYGEN_SHOULD_SKIP_THIS
116 class Private;
117 Private* m_Priv;
118#endif
119};
120
121} // namespace yarp::dev
122
123#endif // YARP_DEV_POLYDRIVER_H
Interface implemented by all device drivers.
A container for a device driver.
Definition PolyDriver.h:23
PolyDriver(const PolyDriver &alt)=delete
const PolyDriver & operator=(const PolyDriver &alt)=delete
A base class for nested structures that can be searched.
Definition Searchable.h:31
For streams capable of holding different kinds of content, check what they actually have.
Definition jointData.cpp:13
#define YARP_dev_API
Definition api.h:18