Fennel: JniProxyVisitTableBase Class Reference (original) (raw)

Accepts a visitor to a proxy object, redirecting it to the correct visit method.

Parameters:

visitor the visitor to call
proxy the proxy object to visit; the type of this object determines the visit overload to call

Definition at line 284 of file JniProxy.h.

References JniProxy::getInterfaceName().

00285 { 00286 // NOTE: it's OK to use operator [] here since it's an error to call 00287 // with the wrong proxy type, so in the non-error case we should always 00288 // find something 00289 std::string className = proxy.getInterfaceName(); 00290 SharedVisitorMethod pMethod = methodMap[className]; 00291 if (!pMethod) { 00292 throw std::logic_error( 00293 std::string("error: unknown method for proxy class '") + 00294 className + "'"); 00295 } 00296 pMethod->execute(visitor,proxy); 00297 }