[vos-d] Message handler problem

Peter Amstutz tetron at interreality.org
Thu Mar 15 17:04:44 EDT 2007


Try

   template<class T> register() {
     VobjectBase::registerHandler<T>("message", &T::handler);
   }

(note T::handler)

This should work, this is exactly how it works in s5.

On Thu, Mar 15, 2007 at 04:49:17PM -0400, Reed Hedges wrote:
> 
> For one thing, apparently you can't do this:
> 
> class Base {
> public:
>   virtual void pure() = 0;
>   template<class T> register() {
>     VobjectBase::registerHandler<T>("message", &handler);
>   }
>   void handler(Message *m) {
>     ...
>   }
> };
> 
> class VirtualDerived : public virtual Base {
> public:
>   VirtualDerived() {
>     Base::register<VirtualDerived>();
>   }
>   virtual void pure() { ... };
> };
> 
> _______________________________________________
> vos-d mailing list
> vos-d at interreality.org
> http://www.interreality.org/cgi-bin/mailman/listinfo/vos-d

-- 
[   Peter Amstutz  ][ tetron at interreality.org ][ peter.amstutz at gdit.com ]
[Lead Programmer][Interreality Project][Virtual Reality for the Internet]
[ VOS: Next Generation Internet Communication][ http://interreality.org ]
[ http://interreality.org/~tetron ][ pgpkey:  pgpkeys.mit.edu  18C21DF7 ]

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.interreality.org/pipermail/vos-d/attachments/20070315/a8806a1a/attachment.pgp 


More information about the vos-d mailing list