|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
10 #ifndef YARP_DRIVERS_H
11 #define YARP_DRIVERS_H
19 template <
class T>
class DriverCreatorOf;
23 class StubDriverCreator;
87 std::string desc, wrap, code;
103 desc(name), wrap(wrap), code(code)
138 const char *libname,
const char *fnname) :
139 desc(name), wrap(wrap), code(code), libname(libname), fnname(fnname)
195 p.
put(
"device",device);
218 virtual std::string
toString()
const;
246 bool remove(
const char *name);
254 static int yarpdev(
int argc,
char *argv[]);
259 #ifndef DOXYGEN_SHOULD_SKIP_THIS
263 #endif // DOXYGEN_SHOULD_SKIP_THIS
266 #endif // YARP_DRIVERS_H
std::string getCode() const override
void put(const std::string &key, const std::string &value)
Associate the given key with the given string.
A base class for nested structures that can be searched.
virtual PolyDriver * owner()
For "links" to other devices.
virtual std::string getWrapper() const =0
Get the common name of a device that can wrap this one.
std::string toString() const override
Returns a simple description of devices the factory can make.
A factory for creating driver objects of a particular type.
Interface implemented by all device drivers.
std::string getWrapper() const override
Get the common name of a device that can wrap this one.
#define YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARG(x)
Suppress MSVC C4251 warning for the declaration.
static Drivers & factory()
Get the global factory for devices.
std::string toString() const override
virtual ~Drivers()
Destructor.
std::string getName() const override
Get the common name of the device.
std::string getWrapper() const override
virtual DeviceDriver * create() const =0
Create a device.
virtual std::string toString() const =0
Returns a simple description of devices the factory can make.
std::string getName() const override
A container for a device driver.
A base class for factories that create driver objects.
DriverCreatorOf(const char *name, const char *wrap, const char *code)
Constructor.
std::string getCode() const override
Get the name of the C++ class associated with this device.
virtual std::string toString() const
A description of the available devices.
DriverCreator * find(const char *name)
Find the factory for a named device.
virtual ~DriverCreator()
Destructor.
virtual std::string getCode() const =0
Get the name of the C++ class associated with this device.
StubDriverCreator(const char *name, const char *wrap, const char *code, const char *libname, const char *fnname)
The main, catch-all namespace for YARP.
bool remove(const char *name)
Remove a factory for a named device.
DeviceDriver * open(const char *device)
Create and configure a device, by name.
void add(DriverCreator *creator)
Add a factory for creating a particular device.
Global factory for devices.
A factory for creating driver objects from DLLs / shared libraries.
DeviceDriver * create() const override
static int yarpdev(int argc, char *argv[])
Body of the yarpdev program for starting device wrappers.
A class for storing options and configuration information.
virtual std::string getName() const =0
Get the common name of the device.