YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
yarp::dev::DriverCreatorOf< T > Class Template Reference

A factory for creating driver objects of a particular type. More...

#include <yarp/dev/Drivers.h>

+ Inheritance diagram for yarp::dev::DriverCreatorOf< T >:

Public Member Functions

 DriverCreatorOf (const char *name, const char *wrap, const char *code)
 Constructor.
 
std::string toString () const override
 Returns a simple description of devices the factory can make.
 
std::string getName () const override
 Get the common name of the device.
 
std::string getWrapper () const override
 Get the common name of a device that can wrap this one.
 
std::string getCode () const override
 Get the name of the C++ class associated with this device.
 
DeviceDrivercreate () const override
 Create a device.
 
- Public Member Functions inherited from yarp::dev::DriverCreator
virtual ~DriverCreator ()
 Destructor.
 
virtual PolyDriverowner ()
 For "links" to other devices.
 

Detailed Description

template<class T>
class yarp::dev::DriverCreatorOf< T >

A factory for creating driver objects of a particular type.

Examples
dev/fake_motor/fake_motor.cpp.

Definition at line 81 of file Drivers.h.

Constructor & Destructor Documentation

◆ DriverCreatorOf()

template<class T >
yarp::dev::DriverCreatorOf< T >::DriverCreatorOf ( const char *  name,
const char *  wrap,
const char *  code 
)
inline

Constructor.

Sets up the name by which the device will be known.

Parameters
nameThe "common name" of the device. This is the name that will be used when naming the device externally, for example from the command line.
wrapThe "common name" of another device which can wrap this device up for network access. If there is no such device, use an empty name: ""
codeThe name of a class associated with this device. This is to give the user an entry point into the relevant code documentation.

Definition at line 98 of file Drivers.h.

Member Function Documentation

◆ create()

template<class T >
DeviceDriver * yarp::dev::DriverCreatorOf< T >::create ( ) const
inlineoverridevirtual

Create a device.

Implements yarp::dev::DriverCreator.

Definition at line 119 of file Drivers.h.

◆ getCode()

template<class T >
std::string yarp::dev::DriverCreatorOf< T >::getCode ( ) const
inlineoverridevirtual

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

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

Implements yarp::dev::DriverCreator.

Definition at line 115 of file Drivers.h.

◆ getName()

template<class T >
std::string yarp::dev::DriverCreatorOf< T >::getName ( ) const
inlineoverridevirtual

Get the common name of the device.

Returns
the common name of the device this creates.

Implements yarp::dev::DriverCreator.

Definition at line 107 of file Drivers.h.

◆ getWrapper()

template<class T >
std::string yarp::dev::DriverCreatorOf< T >::getWrapper ( ) const
inlineoverridevirtual

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.

Implements yarp::dev::DriverCreator.

Definition at line 111 of file Drivers.h.

◆ toString()

template<class T >
std::string yarp::dev::DriverCreatorOf< T >::toString ( ) const
inlineoverridevirtual

Returns a simple description of devices the factory can make.

Returns
a description of what this factory makes

Implements yarp::dev::DriverCreator.

Definition at line 103 of file Drivers.h.


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