gadget::BaseTypeConstructor< DEV > Class Template Reference

Type-specific input device creator. More...

#include <gadget/Type/BaseTypeFactory.h>

Inheritance diagram for gadget::BaseTypeConstructor< DEV >:

Inheritance graph
[legend]
Collaboration diagram for gadget::BaseTypeConstructor< DEV >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BaseTypeConstructor ()
InputcreateNetDevice (std::string baseType)
 Creates the device.
virtual std::string getInputTypeName ()
 Gets the name of the type of element we can create.
void operator delete (void *p)
 Invokes the global scope delete operator.

Protected Member Functions

virtual void destroy ()
 Deletes this object.

Detailed Description

template<class DEV>
class gadget::BaseTypeConstructor< DEV >

Type-specific input device creator.

Definition at line 157 of file BaseTypeFactory.h.


Constructor & Destructor Documentation

template<class DEV>
gadget::BaseTypeConstructor< DEV >::BaseTypeConstructor (  )  [inline]

Definition at line 160 of file BaseTypeFactory.h.

00161    {
00162       vprASSERT(BaseTypeFactory::instance() != NULL);
00163       BaseTypeFactory::instance()->registerNetDevice(this);
00164    }


Member Function Documentation

template<class DEV>
Input* gadget::BaseTypeConstructor< DEV >::createNetDevice ( std::string  baseType  )  [inline, virtual]

Creates the device.

Reimplemented from gadget::BaseTypeConstructorBase.

Definition at line 166 of file BaseTypeFactory.h.

00167    {
00168       boost::ignore_unused_variable_warning(baseType);
00169       DEV* new_dev = new DEV;
00170       //bool success = new_dev->config(element);
00171       //if(success)
00172       //{
00173          return new_dev;
00174       //}
00175       //else
00176       //{
00177       //   delete new_dev;
00178       //   return NULL;
00179       //}
00180    }

template<class DEV>
virtual std::string gadget::BaseTypeConstructor< DEV >::getInputTypeName (  )  [inline, virtual]

Gets the name of the type of element we can create.

Reimplemented from gadget::BaseTypeConstructorBase.

Definition at line 182 of file BaseTypeFactory.h.

00183     { return DEV::getInputTypeName(); }

template<class DEV>
void gadget::BaseTypeConstructor< DEV >::operator delete ( void *  p  )  [inline]

Invokes the global scope delete operator.

This is required for proper releasing of memory in DLLs on Win32.

Definition at line 189 of file BaseTypeFactory.h.

00190    {
00191       ::operator delete(p);
00192    }

template<class DEV>
virtual void gadget::BaseTypeConstructor< DEV >::destroy (  )  [inline, protected, virtual]

Deletes this object.

This is an implementation of the pure virtual gadget::Input::destroy() method.

Definition at line 199 of file BaseTypeFactory.h.

00200    {
00201       delete this;
00202    }


The documentation for this class was generated from the following file:
Generated on Thu Jan 4 10:44:50 2007 for Gadgeteer by  doxygen 1.5.1