JniProxyVisitTable< Visitor >::VisitorMethodImpl< ProxyImpl > Struct Template Reference

Functor implementation binding a JniProxy subclass (instantiating ProxyImpl) to a Visitor::visit method. More...

#include <JniProxy.h>

List of all members.

Public Member Functions

virtual void execute (JniProxyVisitor &visitor, JniProxy &proxy)


Detailed Description

template<class Visitor>
template<class ProxyImpl>
struct JniProxyVisitTable< Visitor >::VisitorMethodImpl< ProxyImpl >

Functor implementation binding a JniProxy subclass (instantiating ProxyImpl) to a Visitor::visit method.

Definition at line 320 of file JniProxy.h.


Member Function Documentation

template<class Visitor>
template<class ProxyImpl>
virtual void JniProxyVisitTable< Visitor >::VisitorMethodImpl< ProxyImpl >::execute ( JniProxyVisitor visitor,
JniProxy proxy 
) [inline, virtual]

Definition at line 322 of file JniProxy.h.

References JniProxy::jObject, and JniProxy::pEnv.

00323         {
00324             // This accomplishes an effective downcast by reinstantiating proxy
00325             // as the correct type.  The abstract proxy and the specific proxy
00326             // alias the same underlying Java object, but it's important to
00327             // realize that the proxies themselves don't share the same
00328             // identity.
00329             ProxyImpl proxyImpl;
00330             proxyImpl.init(proxy.pEnv,proxy.jObject);
00331             // This binds to the correct visit overload.
00332             Visitor &visitorImpl = dynamic_cast<Visitor &>(visitor);
00333             visitorImpl.visit(proxyImpl);
00334         }


The documentation for this struct was generated from the following file:
Generated on Mon Jun 22 04:00:33 2009 for Fennel by  doxygen 1.5.1