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

gadget::BaseTypeConstructor Class Template Reference

#include <BaseTypeFactory.h>

Inheritance diagram for gadget::BaseTypeConstructor:

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

Collaboration graph
[legend]
List of all members.

Public Methods

 BaseTypeConstructor ()
InputcreateNetDevice (std::string baseType)
 Creates the device. More...

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

void operator delete (void *p)
 Invokes the global scope delete operator. More...


Protected Methods

virtual void destroy ()
 Deletes this object. More...

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


Constructor & Destructor Documentation

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

Definition at line 141 of file BaseTypeFactory.h.

00142    {
00143       vprASSERT(BaseTypeFactory::instance() != NULL);
00144       BaseTypeFactory::instance()->registerNetDevice(this);
00145    }


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 147 of file BaseTypeFactory.h.

00148    {
00149       boost::ignore_unused_variable_warning(baseType);
00150       DEV* new_dev = new DEV;
00151       //bool success = new_dev->config(element);
00152       //if(success)
00153       //{
00154          return new_dev;
00155       //}
00156       //else
00157       //{
00158       //   delete new_dev;
00159       //   return NULL;
00160       //}
00161    }

template<class DEV>
virtual std::string gadget::BaseTypeConstructor< DEV >::getBaseType   [inline, virtual]
 

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

Reimplemented from gadget::BaseTypeConstructorBase.

Definition at line 163 of file BaseTypeFactory.h.

00164     { return DEV::getBaseType(); }

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 170 of file BaseTypeFactory.h.

00171    {
00172       ::operator delete(p);
00173    }

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 180 of file BaseTypeFactory.h.

00181    {
00182       delete this;
00183    }


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