Generator Cocos2d-x cpp code