We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when add callback function,just like this: class cboy { public: int add_age(int n) { m_age += n; return m_age; } void set_name(string name) { } string do_some_thing(int n, double d, string str) { return "ok"; } private: int m_age; }; static double mySqr(double d) { return d*d; } static string myStringConcat(string strL, string strR) { return strL+strR; } static double myDoSomeThing(int n, double d, string str1, string str2) { return n+d; } void test(CString str1) { CTinyJS_Wrapper s; cboy boy; s.addExFun( MakeFunObj<int, Seq<int>>("add_boy_age", &boy, &cboy::add_age) ); s.addExFun( MakeFunObj<void, Seq<string>>("set_boy_name", &boy, &cboy::set_name) ); s.addExFun( MakeFunObj<string, Seq<int,double,string>>("boy_do_some_thing", &boy, &cboy::do_some_thing) ); s.addExFun( MakeFunObj<double, Seq<double>>("sqr", &mySqr) ); s.addExFun( MakeFunObj<string, Seq<string, string>>("strcon", &myStringConcat) ); s.addExFun( MakeFunObj<double, Seq<int, double, string, string>>("do_some_thing", &myDoSomeThing) ); ... } my email:kanbang@163.com sorry for poor english
Original issue reported on code.google.com by kanb...@163.com on 22 Mar 2013 at 11:37
kanb...@163.com
Attachments:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Original issue reported on code.google.com by
kanb...@163.com
on 22 Mar 2013 at 11:37Attachments:
The text was updated successfully, but these errors were encountered: