Squirrel

The programming language
Welcome to Squirrel Sign in | Join | Help
in Search

Sqrat to boost function?

Last post 01-13-2010, 2:33 AM by Lephyrius. 1 replies.
Sort Posts: Previous Next
  •  01-12-2010, 8:03 AM 3608

    Sqrat to boost function?

    I use boost function for callbacks in my game. Problem is I don't know how could I bind them to Squirrel function using Sqrat?
    I don't want to create two different callback systems so I think that a wrapper or adapter would be best.
  •  01-13-2010, 2:33 AM 3611 in reply to 3608

    Re: Sqrat to boost function?

    I found an answer:

    boost::bind( static_cast<void (Sqrat::Function::*)( const Event& )>(&Sqrat::Function::Execute<const Event&>),function, _1)
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems