YARP
Yet Another Robot Platform
Wrapper.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2019 Istituto Italiano di Tecnologia (IIT)
3  * Copyright (C) 2006-2010 RobotCub Consortium
4  * All rights reserved.
5  *
6  * This software may be modified and distributed under the terms of the
7  * BSD-3-Clause license. See the accompanying LICENSE file for details.
8  */
9 
10 #ifndef YARP_DEV_WRAPPER_H
11 #define YARP_DEV_WRAPPER_H
12 
13 #include <yarp/dev/api.h>
14 #include <yarp/dev/PolyDriver.h>
16 
19 namespace yarp {
20  namespace dev {
21  class IWrapper;
22  class IMultipleWrapper;
23  }
24 }
25 
36 {
37 public:
41  virtual ~IWrapper() {}
42 
48  virtual bool attach(PolyDriver *poly)=0;
49 
54  virtual bool detach()=0;
55 };
56 
68 {
69 public:
73  virtual ~IMultipleWrapper() {}
74 
80  virtual bool attachAll(const PolyDriverList &p)=0;
81 
86  virtual bool detachAll()=0;
87 };
88 
89 #endif // YARP_DEV_WRAPPER_H
#define YARP_dev_API
Definition: api.h:19
Interface for an object that can wrap/or "attach" to another.
Definition: Wrapper.h:35
Interface for an object that can wrap/attach to to another.
Definition: Wrapper.h:67
The main, catch-all namespace for YARP.
Definition: numeric.h:47
virtual ~IMultipleWrapper()
Destructor.
Definition: Wrapper.h:73
virtual ~IWrapper()
Destructor.
Definition: Wrapper.h:41
A container for a device driver.
Definition: PolyDriver.h:25