回复 老兵帅客 的帖子) Q, ^4 V2 x4 T) v& K) a
, |! G8 `1 q1 i# F7 N
在wikipedia上搜了一下reflection C++。 w9 v' ^/ v* W# l d+ l
Qt/C++; d0 o" }' |- c& v1 U( ?5 T- x
) b4 e1 m L; I: ~9 g0 c0 [
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.
# q6 z; N7 x! ?6 g" I
貌似并不能直接支持,但是可以实现类似效果。 % v4 O& a3 G+ l: e1 P$ ic++ reflection* z' B' U6 [: V7 l- ^" B/ t