Game Development Community

TNL::EventConnection with multiple inheritance

by Devrim Erdem · in Torque Game Engine · 05/29/2004 (12:58 pm) · 2 replies

Hello,

I have tried such a derived class :

class EventReflector : public TNL::EventConnection, public smEventGeneratorTrait::EventHandler

This class has several RPC methods and with the syntax above it works fine. However if the TNL::EventConnection is the second class in the parent list, the RPC methods don't work.

class EventReflector : public smEventGeneratorTrait::EventHandler, public TNL::EventConnection

This is pretty surprising for me. Does anybody have an idea why this could happen ?

Thanks.

Dev.

#1
05/29/2004 (7:42 pm)
It's possible that changing the order of the parent classes messes up some of the pointer magic that needs to happen to make TNL's RPC work properly.
#2
05/30/2004 (4:14 am)
This costed me an hour, maybe it should find its way into the FAQ.