#include <DeviceConstructor.h>
Inheritance diagram for gadget::DeviceConstructor:


Public Methods | |
| DeviceConstructor (gadget::InputManager *inputMgr) | |
| Input * | createDevice (jccl::ConfigElementPtr element) |
| Creates the device. More... | |
| virtual std::string | getElementType () |
| Gets the string desc of the type of element we can create. More... | |
|
||||||||||
|
Definition at line 54 of file DeviceConstructor.h.
00055 {
00056 vprASSERT(DeviceFactory::instance() != NULL);
00057 vprASSERT(inputMgr != NULL);
00058 inputMgr->getDeviceFactory()->registerDevice(this);
00059 }
|
|
||||||||||
|
Creates the device.
Reimplemented from gadget::DeviceConstructorBase. Definition at line 61 of file DeviceConstructor.h.
00062 {
00063 DEV* new_dev = new DEV;
00064 bool success = new_dev->config(element);
00065 if(success)
00066 {
00067 return new_dev;
00068 }
00069 else
00070 {
00071 delete new_dev;
00072 return NULL;
00073 }
00074 }
|
|
|||||||||
|
Gets the string desc of the type of element we can create.
Reimplemented from gadget::DeviceConstructorBase. Definition at line 76 of file DeviceConstructor.h.
00077 {
00078 return DEV::getElementType();
00079 }
|
1.2.14 written by Dimitri van Heesch,
© 1997-2002