回复 老兵帅客 的帖子 2 M k' K; ]2 Q: Y2 V 8 |2 c* z3 M5 ?$ [ P在wikipedia上搜了一下reflection C++。6 ^: e6 f" t* i! N5 ]6 D7 d
Qt/C++ 9 W; f4 k1 o0 y h" G t" Y4 d/ n 0 [( K1 s6 u9 t& t, a0 z) {4 L eQt framework extends C++ with its meta-language and provides reflection ability of member/method reference and query by name for Qt objects with QMetaObject class, which contains meta-information about the Qt objects.
Objective-C is a reflective, object-oriented programming language that adds Smalltalk-style messaging to the C programming language.
0 x2 ], }* B2 ~$ O+ P) t
貌似并不能直接支持,但是可以实现类似效果。: s4 |) S! v0 G c++ reflection1 m8 r" E) L9 q) G& v' ?