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

gadget::ProxyConstructor Class Template Reference

#include <ProxyFactory.h>

Inheritance diagram for gadget::ProxyConstructor:

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

Collaboration graph
[legend]
List of all members.

Public Methods

 ProxyConstructor ()
ProxycreateProxy (jccl::ConfigElementPtr element) const
 Creates the proxy. More...

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

template<class PROXY>
class gadget::ProxyConstructor< PROXY >


Constructor & Destructor Documentation

template<class PROXY>
gadget::ProxyConstructor< PROXY >::ProxyConstructor  
 

Definition at line 58 of file ProxyFactory.cpp.

00059 {
00060    ProxyFactory::instance()->registerProxy(this);
00061 }


Member Function Documentation

template<class PROXY>
Proxy* gadget::ProxyConstructor< PROXY >::createProxy jccl::ConfigElementPtr    element const [inline, virtual]
 

Creates the proxy.

Returns:
NULL if proxy failed creation or configuration.

Implements gadget::ProxyConstructorBase.

Definition at line 83 of file ProxyFactory.h.

00084    {
00085       PROXY* new_proxy = new PROXY;             // Create new proxy
00086       bool success = new_proxy->config(element);  // Attempt to configure it
00087                                                   // config calls inputmgr registrator
00088 
00089       if(success)          // Configured succesfully
00090       {
00091          return new_proxy;
00092       }
00093       else                 // Failed
00094       {
00095   //XXX//       delete new_proxy;
00096          return NULL;
00097       }
00098    }

template<class PROXY>
std::string gadget::ProxyConstructor< PROXY >::getElementType   const [inline, virtual]
 

Gets the string definition of the type of element we can create.

Implements gadget::ProxyConstructorBase.

Definition at line 100 of file ProxyFactory.h.

00101    {
00102       return PROXY::getElementType();
00103    }


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