回复 老兵帅客 的帖子8 {' z8 `- ]+ X ~, l
$ V7 I4 ^- P6 x# a
在wikipedia上搜了一下reflection C++。 3 f# K% C% _9 z. U9 s
Qt/C++ ! ?$ X! d( ]* g0 u ( a1 u0 P/ r& |- M [8 Q3 ^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.
) ^; A% X& i+ s/ s- A
貌似并不能直接支持,但是可以实现类似效果。 4 N: U8 ~! I, a+ d; gc++ reflection4 ?( X9 R e$ W r