怎么理解TMetaclass?

zdzwww 2002-09-11 10:00:28
怎么理解TMetaclass?
...全文
64 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
Hawk_sun 2002-09-11
  • 打赏
  • 举报
回复
Description

TMetaClass is the C++Builder representation of the Object Pascal class-reference type. The TMetaClass for a given class can be acquired by using the __classid operator.

TMetaClass allows operations to be performed directly on classes. This contrasts with class types, which can be instantiated as objects and which allow operations to be performed on those instances.

A variable of type TMetaClass can be NULL, which indicates that the variable does not currently reference a class.

Every class inherits (from TObject) a method function called ClassType, which returns a reference to the class of an object. The type of the value returned by ClassType is TClass (TMetaClass*), which is a pointer to a TMetaClass.

The methods of TMetaClass correspond to the static methods of TObject. They have the same functionality but differ in parameters. Whereas the TObject methods take a TClass (TMetaClass*) as the first parameter, this parameter is implicit in the TMetaClass methods.

要不要我翻译一下呢?还是算了吧!相信大家的e文水平比我强!

13,825

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧