[Kde-bindings] Using a custom RealProxy to implement a C# SMOKE adaptor

Richard Dale Richard_Dale at tipitina.demon.co.uk
Wed Aug 20 23:56:20 UTC 2003


I've just got the java code generation working for a QtJava SMOKE adaptor 
based on the Java Proxy class, rather than JNI. The proxies are created like 
this with an array of interfaces, two for each class in the hierarchy (one 
for public methods, and one for protected):

	protected Qt(Class[] interfaces, int index) {
		interfaces[index] = QtPublicInterface.class;
		interfaces[index+1] = QtProtectedInterface.class;
		_proxy = Proxy.newProxyInstance(ClassLoader.getSystemClassLoader(),
			interfaces,
			new SmokeInvocation(this) );
	}

There is a very similar class in .NET - RealProxy. So I wonder if it would be 
a good way of doing a Qt C# SMOKE adaptor like the java one. The RealProxy 
constructor looks like this:

protected RealProxy(
   Type classToProxy,
   IntPtr stub,
   object stubData
);

I couldn't find out if it's possible to create a 'Type' by aggragating 
interfaces together to get the equivalent functionality of the java Proxy 
above - I don't know enough about .net.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemRuntimeRemotingProxiesRealProxyClassTopic.asp 

-- Richard


More information about the Kde-bindings mailing list