回复 老兵帅客 的帖子 . w0 ^: N+ T5 W, z: Q! _' B, u. }; m4 m
在wikipedia上搜了一下reflection C++。 8 }2 l" e4 W# p& x, l
Qt/C++/ G9 I I* r# n& [% k5 @. k
. ^/ l" X1 w" pQt 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.
' U# g6 P) A- a" ?) z* a
貌似并不能直接支持,但是可以实现类似效果。, {; Y% _8 Q. m) O# Q c++ reflection 3 m6 A) p2 c4 H; S/ }) ~