0

I am currently porting a game from Cocos2d written in ObjectiveC to Cocos2d-x in C++. Now the objective C guys have used Reflection to populate modal classes from a json object. Is the same possible in C++ Can we use reflection in C++ ?

Kind Regards

miikkas
  • 818
  • 1
  • 8
  • 25
AndroidDev
  • 15,993
  • 29
  • 85
  • 119

1 Answers1

0

As mentioned in the comments, C++ has no reflection.

The default solution is to register all the symbols that you need in an associative array, like unordered_map. Here are examples of that.

Community
  • 1
  • 1
Domi
  • 22,151
  • 15
  • 92
  • 122