Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Examples  

gadget::DeviceConstructor Class Template Reference

#include <DeviceConstructor.h>

Inheritance diagram for gadget::DeviceConstructor:

Inheritance graph
[legend]
Collaboration diagram for gadget::DeviceConstructor:

Collaboration graph
[legend]
List of all members.

Public Methods

 DeviceConstructor (gadget::InputManager *inputMgr)
InputcreateDevice (jccl::ConfigElementPtr element)
 Creates the device. More...

virtual std::string getElementType ()
 Gets the string desc of the type of element we can create. More...

template<class DEV>
class gadget::DeviceConstructor< DEV >


Constructor & Destructor Documentation

template<class DEV>
gadget::DeviceConstructor< DEV >::DeviceConstructor gadget::InputManager   inputMgr [inline]
 

Definition at line 54 of file DeviceConstructor.h.

00055    {
00056       vprASSERT(DeviceFactory::instance() != NULL);
00057       vprASSERT(inputMgr != NULL);
00058       inputMgr->getDeviceFactory()->registerDevice(this);
00059    }


Member Function Documentation

template<class DEV>
Input* gadget::DeviceConstructor< DEV >::createDevice jccl::ConfigElementPtr    element [inline, virtual]
 

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    }

template<class DEV>
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 76 of file DeviceConstructor.h.

00077    {
00078       return DEV::getElementType();
00079    }


The documentation for this class was generated from the following file:
Generated on Sun May 2 14:26:55 2004 for Gadgeteer by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002