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


Public Member Functions | |
| DeviceConstructor (gadget::InputManager *inputMgr) | |
| Input * | createDevice (jccl::ConfigElementPtr element) |
| Creates the device. | |
| virtual std::string | getElementType () |
| Gets the string desc of the type of element we can create. | |
Definition at line 55 of file DeviceConstructor.h.
| gadget::DeviceConstructor< DEV >::DeviceConstructor | ( | gadget::InputManager * | inputMgr | ) | [inline] |
Definition at line 58 of file DeviceConstructor.h.
References gadget::InputManager::getDeviceFactory(), and gadget::DeviceFactory::registerDevice().
00059 { 00060 vprASSERT(DeviceFactory::instance() != NULL); 00061 vprASSERT(inputMgr != NULL); 00062 inputMgr->getDeviceFactory()->registerDevice(this); 00063 }
| Input* gadget::DeviceConstructor< DEV >::createDevice | ( | jccl::ConfigElementPtr | element | ) | [inline, virtual] |
Creates the device.
Reimplemented from gadget::DeviceConstructorBase.
Definition at line 65 of file DeviceConstructor.h.
References gadget::Input::config().
00066 { 00067 DEV* new_dev = new DEV; 00068 bool success = new_dev->config(element); 00069 if(success) 00070 { 00071 return new_dev; 00072 } 00073 else 00074 { 00075 delete new_dev; 00076 return NULL; 00077 } 00078 }
| virtual std::string gadget::DeviceConstructor< DEV >::getElementType | ( | ) | [inline, virtual] |
Gets the string desc of the type of element we can create.
Reimplemented from gadget::DeviceConstructorBase.
Definition at line 80 of file DeviceConstructor.h.
1.5.1