Re: Overloaded member functions

Patryk Małek <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
Yes, Critter is a namespace.

I have done a bypass with :
*.def("setGlobalPosition", ( void(Critter::Body::*)(float,float,float) )
&Critter::Body::setGlobalPosition )*
*
*
 but still i cannot do it with vector*
*

*.def("setGlobalPosition", ( void(Critter::Body::*)(Vector3) )
&Critter::Body::setGlobalPosition )*
*
*
Vector3 is also exposed to Lua. The problem might be with inheritance but I
still do not know where exactly.*
*



2011/5/5 feng qiu <[email protected]>

> Is *Critter a name space?*
> *I have the same problem when binding overloaded functions from a
> namespace.*
>
> 2011/4/25 Patryk Małek <[email protected]>
>
>> Hello,
>> I have a small problem with binding overloaded member functions, I want to
>> do it this way :
>>
>> *luabind::module(L)[
>> luabind::class_<Critter::Body>("Body")
>>   .def("setGlobalPosition", ( void(Critter::Body::*)(Vector3) )
>> &Critter::Body::setGlobalPosition )
>>
>> ];*
>> *
>> *
>> but I get an error :*
>> *
>> error C2440: 'type cast' : cannot convert from 'overloaded-function' to
>> 'void (__thiscall Critter::Body::* )(Ogre::Vector3)'
>>
>> the problem might also be that this is an inherited function form
>> NxOgre::Actor ( but I have also tried it with defining this function as
>> NxOgre::Actor but the same errors)
>>
>> Any ideas ?
>>
>>
>> ------------------------------------------------------------------------------
>> Fulfilling the Lean Software Promise
>> Lean software platforms are now widely adopted and the benefits have been
>> demonstrated beyond question. Learn why your peers are replacing JEE
>> containers with lightweight application servers - and what you can gain
>> from the move. http://p.sf.net/sfu/vmware-sfemails
>> _______________________________________________
>> luabind-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/luabind-user
>>
>>
>
>
> --
> Q..
>
>
> ------------------------------------------------------------------------------
> WhatsUp Gold - Download Free Network Management Software
> The most intuitive, comprehensive, and cost-effective network
> management toolset available today.  Delivers lowest initial
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> _______________________________________________
> luabind-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/luabind-user
>
>

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd

_______________________________________________
luabind-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luabind-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.