Reflection in C++

后端 未结 8 1832
失恋的感觉
失恋的感觉 2021-02-05 19:55

I\'ve been working for years with Java. During those years, I\'ve made extensive (or maybe just frequent) use of reflection, and found it useful and enjoyable. But 8 months ago

相关标签:
8条回答
  • 2021-02-05 20:27

    Have a look at my answer to a similar question. Both solutions (XRTTI and OpenC++) proposed are based on external tools that generate the reflection meta-data for you during the build process.

    0 讨论(0)
  • 2021-02-05 20:27

    RTTI is a solution (what part in Java do you think is not in RTTI?), otherwise you can implement your own object framework - let every your own C++ object inherits some reflection interface, and then it should work.

    0 讨论(0)
提交回复
热议问题