#include <ProxyFactory.h>
Public Methods | |
| void | registerProxy (ProxyConstructorBase *constructor) |
| bool | recognizeProxy (jccl::ConfigElementPtr element) |
| Queries if the factory knows about the given proxy. More... | |
| Proxy * | loadProxy (jccl::ConfigElementPtr element) |
| Loads the specified proxy. More... | |
Definition at line 111 of file ProxyFactory.h.
|
|
Definition at line 88 of file ProxyFactory.cpp. References gadgetDBG_INPUT_MGR.
00089 {
00090 mConstructors.push_back(constructor); // Add the constructor to the list
00091 vprDEBUG(gadgetDBG_INPUT_MGR, vprDBG_CONFIG_LVL)
00092 << "gadget::ProxyFactory: Constructor registered for: "
00093 << std::setiosflags(std::ios::right) << std::setw(25)
00094 << std::setfill(' ') << constructor->getElementType()
00095 << std::resetiosflags(std::ios::right)
00096 //<< " :" << (void*)constructor
00097 << " type: " << typeid(*constructor).name() << std::endl
00098 << vprDEBUG_FLUSH;
00099 }
|
|
|
Queries if the factory knows about the given proxy.
Definition at line 103 of file ProxyFactory.cpp. Referenced by loadProxy.
00104 {
00105 return ! (findConstructor(element) == -1);
00106 }
|
|
|
Loads the specified proxy.
Definition at line 111 of file ProxyFactory.cpp. References gadgetDBG_INPUT_MGR, and recognizeProxy.
00112 {
00113 vprASSERT(recognizeProxy(element));
00114
00115 int index = findConstructor(element);
00116
00117 Proxy* new_proxy;
00118 ProxyConstructorBase* constructor = mConstructors[index];
00119
00120 vprDEBUG(gadgetDBG_INPUT_MGR, vprDBG_STATE_LVL)
00121 << "vjProxyFactory::loadProxy: Loading proxy: "
00122 << element->getID() << " with: "
00123 << typeid(*constructor).name() << std::endl << vprDEBUG_FLUSH;
00124 new_proxy = constructor->createProxy(element);
00125 return new_proxy;
00126 }
|
1.2.14 written by Dimitri van Heesch,
© 1997-2002