回复 老兵帅客 的帖子 ) x" d) a M0 f. _# v3 j 0 s- y: y |* {1 s- s% e在wikipedia上搜了一下reflection C++。 + R& Y, ?. ^ C7 |. F/ x
Qt/C++ . K. C8 I d8 N @7 Y7 b. p K/ G" c& VQt 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.
( c2 H. T; M. L" w$ }7 x1 X( u& Y2 I
貌似并不能直接支持,但是可以实现类似效果。 5 i% ?+ T; h; ic++ reflection : y' {0 k- J- Y" a2 U+ X