YARP
Yet Another Robot Platform
yarp::dev::DriverCreator Class Referenceabstract

A base class for factories that create driver objects. More...

#include <yarp/dev/Drivers.h>

+ Inheritance diagram for yarp::dev::DriverCreator:

Public Member Functions

virtual ~DriverCreator ()
 Destructor. More...
 
virtual std::string toString () const =0
 Returns a simple description of devices the factory can make. More...
 
virtual DeviceDrivercreate () const =0
 Create a device. More...
 
virtual std::string getName () const =0
 Get the common name of the device. More...
 
virtual std::string getWrapper () const =0
 Get the common name of a device that can wrap this one. More...
 
virtual std::string getCode () const =0
 Get the name of the C++ class associated with this device. More...
 
virtual PolyDriverowner ()
 For "links" to other devices. More...
 

Detailed Description

A base class for factories that create driver objects.

The DriverCreatorOf class is probably what you want.

Examples
dev/file_grabber/file_grabber.cpp.

Definition at line 31 of file Drivers.h.

Constructor & Destructor Documentation

◆ ~DriverCreator()

virtual yarp::dev::DriverCreator::~DriverCreator ( )
inlinevirtual

Destructor.

Definition at line 36 of file Drivers.h.

Member Function Documentation

◆ create()

virtual DeviceDriver* yarp::dev::DriverCreator::create ( ) const
pure virtual

Create a device.

Implemented in yarp::dev::StubDriverCreator, and yarp::dev::DriverLinkCreator.

◆ getCode()

virtual std::string yarp::dev::DriverCreator::getCode ( ) const
pure virtual

Get the name of the C++ class associated with this device.

Returns
the name of the C++ class associated with this device.

Implemented in yarp::dev::StubDriverCreator, and yarp::dev::DriverLinkCreator.

◆ getName()

virtual std::string yarp::dev::DriverCreator::getName ( ) const
pure virtual

Get the common name of the device.

Returns
the common name of the device this creates.

Implemented in yarp::dev::StubDriverCreator, and yarp::dev::DriverLinkCreator.

◆ getWrapper()

virtual std::string yarp::dev::DriverCreator::getWrapper ( ) const
pure virtual

Get the common name of a device that can wrap this one.

Returns
the common name of the device that can wrap this one for the network.

Implemented in yarp::dev::StubDriverCreator, and yarp::dev::DriverLinkCreator.

◆ owner()

virtual PolyDriver* yarp::dev::DriverCreator::owner ( )
inlinevirtual

For "links" to other devices.

Default implementation returns NULL, which is correct for all real devices talking to hardware.

Returns
the object managing the device.

Reimplemented in yarp::dev::DriverLinkCreator.

Definition at line 76 of file Drivers.h.

◆ toString()

virtual std::string yarp::dev::DriverCreator::toString ( ) const
pure virtual

Returns a simple description of devices the factory can make.

Returns
a description of what this factory makes

Implemented in yarp::dev::StubDriverCreator, and yarp::dev::DriverLinkCreator.


The documentation for this class was generated from the following file: