cocos2d / bindings-generator

JSBindings generator for C++
170 stars 153 forks source link

Add auto bindings for public members #184

Closed pandamicro closed 9 years ago

pandamicro commented 9 years ago

Original idea and implementation from https://github.com/cocos2d/bindings-generator/pull/139 of @samuele3hu

Based on his implementation, I added field to ini configuration to permit adding fields that need to be bound. By default no public field is bound to ensure compatibility with the current cocos2d code base, because there are already some public fields bound manually. In the future, they should be totally replaced by auto bindings, and field should be removed from the configuration.

@dualface I have added the original implementation of @samuele3hu for Lua bindings. You can improve it and in the future, auto binding should be able to bind lua public members.

Thank you @samuele3hu !

pandamicro commented 9 years ago

Task for https://github.com/cocos2d/cocos2d-x/issues/9958