回复 老兵帅客 的帖子, Y- A- g7 g2 S
. g* o' N6 e: c; V
在wikipedia上搜了一下reflection C++。 * d c& p+ h/ p5 ^0 v5 g0 z1 d6 w) ?
Qt/C++2 @, i) f; K7 L f" i6 [; g
z8 c- J) ?" T
Qt 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.
2 R& Y |! Y6 T( l9 t" d- C( g$ C
貌似并不能直接支持,但是可以实现类似效果。 / [2 O) q$ R9 d$ X9 ?3 Pc++ reflection & B3 Y* B/ j. L