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

gadget::Proxy Class Reference

Base class for all input proxies. More...

#include <Proxy.h>

Inheritance diagram for gadget::Proxy:

Inheritance graph
[legend]
List of all members.

Public Methods

 Proxy ()
virtual ~Proxy ()
virtual bool config (jccl::ConfigElementPtr element)
 Configures the proxy. More...

virtual bool refresh ()=0
 Refreshes the proxy. More...

virtual void updateData ()
virtual InputgetProxiedInputDevice ()=0
 Returns a pointer to the base class of the devices being proxied. More...

std::string getName () const
 Gets the name of the proxy. More...

void setName (std::string name)
 Sets the name of the proxy. More...

virtual bool isStupified () const
 Is the proxy current stupified? If the device we are proxying doesn't exist, then this will return true. More...

void stupify (bool newState=true)
 Sets the stupification state. More...

virtual vpr::Interval getTimeStamp () const=0
 Returns time of last update. More...


Static Public Methods

std::string getElementType ()
 Returns the string rep of the element type used to config this device. More...


Protected Attributes

std::string mName
 The name of the proxy. More...

bool mStupified
 Is the proxy current stupified (returns default data). More...


Detailed Description

Base class for all input proxies.

Definition at line 52 of file Proxy.h.


Constructor & Destructor Documentation

gadget::Proxy::Proxy   [inline]
 

Definition at line 55 of file Proxy.h.

00056       {
00057          mStupified = true;
00058          mName.clear();          // Clear the name
00059       }

virtual gadget::Proxy::~Proxy   [inline, virtual]
 

Definition at line 61 of file Proxy.h.

00062       {
00063          ;
00064       }


Member Function Documentation

virtual bool gadget::Proxy::config jccl::ConfigElementPtr    element [inline, virtual]
 

Configures the proxy.

Postcondition:
Proxy is configured (it is not registered yet though).
Returns:
success.

Reimplemented in gadget::AnalogProxy.

Definition at line 71 of file Proxy.h.

00072       {
00073          mName = element->getFullName();
00074          return true;
00075       }

virtual bool gadget::Proxy::refresh   [pure virtual]
 

Refreshes the proxy.

Checks for the device that it is supposed to point at.

Implemented in gadget::TypedProxy.

virtual void gadget::Proxy::updateData   [inline, virtual]
 

Reimplemented in gadget::AnalogProxy.

Definition at line 83 of file Proxy.h.

00084       {
00085          ;
00086       }

virtual Input* gadget::Proxy::getProxiedInputDevice   [pure virtual]
 

Returns a pointer to the base class of the devices being proxied.

Returns:
NULL if no device is proxied.

Implemented in gadget::AnalogProxy.

std::string gadget::Proxy::getElementType   [inline, static]
 

Returns the string rep of the element type used to config this device.

Used by the Input Manager to find elements that construct devices.

Reimplemented in gadget::AnalogProxy.

Definition at line 98 of file Proxy.h.

00099       {
00100          return "Undefined";
00101       }

std::string gadget::Proxy::getName   const [inline]
 

Gets the name of the proxy.

Definition at line 104 of file Proxy.h.

00105       {
00106          return mName;
00107       }

void gadget::Proxy::setName std::string    name [inline]
 

Sets the name of the proxy.

Definition at line 110 of file Proxy.h.

00111       {
00112          mName = name;
00113       }

virtual bool gadget::Proxy::isStupified   const [inline, virtual]
 

Is the proxy current stupified? If the device we are proxying doesn't exist, then this will return true.

Definition at line 120 of file Proxy.h.

Referenced by gadget::DigitalProxy::updateData.

00121       {
00122          return mStupified;
00123       }

void gadget::Proxy::stupify bool    newState = true [inline]
 

Sets the stupification state.

Parameters:
newState  The new state of stupification.

Definition at line 129 of file Proxy.h.

Referenced by gadget::TypedProxy< EventWindow >::refresh, and gadget::TypedProxy< EventWindow >::set.

00130       {
00131          mStupified = newState;
00132       }

virtual vpr::Interval gadget::Proxy::getTimeStamp   const [pure virtual]
 

Returns time of last update.

Implemented in gadget::AnalogProxy.


Member Data Documentation

std::string gadget::Proxy::mName [protected]
 

The name of the proxy.

Definition at line 138 of file Proxy.h.

Referenced by gadget::TypedProxy< EventWindow >::refresh.

bool gadget::Proxy::mStupified [protected]
 

Is the proxy current stupified (returns default data).

Definition at line 139 of file Proxy.h.

Referenced by gadget::PositionProxy::updateData.


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