#include <DeviceInterface.h>
Inheritance diagram for gadget::DeviceInterface:


Public Methods | |
| DeviceInterface (const DeviceInterface &other) | |
| DeviceInterface () | |
| PROXY_TYPE * | operator-> () |
| PROXY_TYPE & | operator * () |
| PROXY_TYPE * | getProxy () |
| void | setProxy (PROXY_TYPE *proxy) |
| Sets the proxy to an explicit proxy. More... | |
| virtual void | refresh () |
| NOTE: If the interface does not have an initialized mProxyName, then don't try to refresh it. More... | |
|
||||||||||
|
Definition at line 129 of file DeviceInterface.h. Referenced by gadget::DeviceInterface< DigitalProxy >::DeviceInterface.
00130 : BaseDeviceInterface(other) 00131 { 00132 if (other.mTypeSpecificProxy != NULL) 00133 { 00134 mTypeSpecificProxy = other.mTypeSpecificProxy; 00135 } 00136 else 00137 { 00138 mTypeSpecificProxy = &mDummyProxy; 00139 } 00140 } |
|
|||||||||
|
Definition at line 143 of file DeviceInterface.h.
00144 : BaseDeviceInterface() 00145 { 00146 mTypeSpecificProxy = &mDummyProxy; 00147 } |
|
|||||||||
|
Definition at line 149 of file DeviceInterface.h.
00150 {
00151 return mTypeSpecificProxy;
00152 }
|
|
|||||||||
|
Definition at line 154 of file DeviceInterface.h.
00155 {
00156 return *(mTypeSpecificProxy);
00157 }
|
|
|||||||||
|
Definition at line 159 of file DeviceInterface.h.
00160 {
00161 return mTypeSpecificProxy;
00162 }
|
|
||||||||||
|
Sets the proxy to an explicit proxy.
Definition at line 165 of file DeviceInterface.h.
00166 {
00167 vprASSERT(NULL != proxy);
00168 mProxyName = proxy->getName(); // Set the name
00169 mNameSet = true;
00170 this->refresh();
00171
00172 // Verify we found the correct proxy
00173 vprASSERT(mTypeSpecificProxy == proxy && "Found incorrect proxy for dev interface");
00174 }
|
|
|||||||||
|
NOTE: If the interface does not have an initialized mProxyName, then don't try to refresh it.
Reimplemented from gadget::BaseDeviceInterface. Definition at line 176 of file DeviceInterface.h. Referenced by gadget::DeviceInterface< DigitalProxy >::setProxy.
00177 {
00178 BaseDeviceInterface::refresh();
00179 if(mProxyPtr != NULL)
00180 {
00181 mTypeSpecificProxy = dynamic_cast<PROXY_TYPE*>(mProxyPtr);
00182 if(NULL == mTypeSpecificProxy)
00183 {
00184 vprDEBUG(gadgetDBG_INPUT_MGR, vprDBG_CRITICAL_LVL)
00185 << "[gadget::DeviceInterface::refresh()] Tried to point at "
00186 << "proxy of incorrect type named '" << mProxyName << "'"
00187 << std::endl << vprDEBUG_FLUSH;
00188 }
00189 }
00190
00191 if((NULL == mProxyPtr) || (NULL == mTypeSpecificProxy))
00192 {
00193 mTypeSpecificProxy = &mDummyProxy;
00194 }
00195 }
|
1.2.14 written by Dimitri van Heesch,
© 1997-2002