Skip to content

Commit

Permalink
Completely removed useless IOpenClose.h interface
Browse files Browse the repository at this point in the history
  • Loading branch information
randaz81 committed Dec 9, 2023
1 parent 2152e58 commit 60a779c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 52 deletions.
9 changes: 4 additions & 5 deletions src/libYARP_dev/src/yarp/dev/DeviceDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <yarp/os/ConnectionWriter.h>
#include <yarp/os/BufferedPort.h>
#include <yarp/os/Property.h>
#include <yarp/os/IConfig.h>

#include <yarp/dev/api.h>

Expand All @@ -26,7 +25,7 @@ class DeviceResponder;
*
* Interface implemented by all device drivers.
*/
class YARP_dev_API yarp::dev::DeviceDriver : public yarp::os::IOpenClose
class YARP_dev_API yarp::dev::DeviceDriver
{
public:
DeviceDriver();
Expand All @@ -35,7 +34,7 @@ class YARP_dev_API yarp::dev::DeviceDriver : public yarp::os::IOpenClose
DeviceDriver& operator=(const DeviceDriver& other) = delete;
DeviceDriver& operator=(DeviceDriver&& other) noexcept = delete;

~DeviceDriver() override;
~DeviceDriver();

/**
* Open the DeviceDriver.
Expand All @@ -50,13 +49,13 @@ class YARP_dev_API yarp::dev::DeviceDriver : public yarp::os::IOpenClose
* yarp developers to add documentation for your device).
* @return true/false upon success/failure
*/
bool open(yarp::os::Searchable& config) override { YARP_UNUSED(config); return true; }
virtual bool open(yarp::os::Searchable& config) { YARP_UNUSED(config); return true; }

/**
* Close the DeviceDriver.
* @return true/false on success/failure.
*/
bool close() override { return true; }
virtual bool close() { return true; }


/**
Expand Down
2 changes: 1 addition & 1 deletion src/libYARP_dev/src/yarp/dev/Drivers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ class StubDriver : public DeviceDriver {
init();
}

~StubDriver() override = default;
~StubDriver() = default;

void init() {
if (plugin.open(settings)) {
Expand Down
1 change: 0 additions & 1 deletion src/libYARP_os/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ set(YARP_os_HDRS
yarp/os/Event.h
yarp/os/Face.h
yarp/os/Header.h
yarp/os/IOpenClose.h
yarp/os/InputProtocol.h
yarp/os/InputStream.h
yarp/os/LocalReader.h
Expand Down
44 changes: 0 additions & 44 deletions src/libYARP_os/src/yarp/os/IOpenClose.h

This file was deleted.

2 changes: 1 addition & 1 deletion src/libYARP_robotinterface/tests/RobotinterfaceTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class yarp::dev::RobotInterfaceTestMockDriver :
public yarp::dev::DeviceDriver
{
public:
~RobotInterfaceTestMockDriver() override;
~RobotInterfaceTestMockDriver();

//DEVICE DRIVER
bool open(yarp::os::Searchable& config) override;
Expand Down

0 comments on commit 60a779c

Please sign in to comment.