Using nsIClassInfo 编辑
Original Document Information
What is nsIClassInfo
good for?
If you use a C++ class which implements nsIClassInfo
from JavaScript, then you don't have to explicitly call QueryInterface
on the JavaScript object to access the object's interfaces.
nsIClassInfo
is good for other things too, but they're dark XPCOM magic.
How do I use it?
If you're writing JavaScript code which uses a C++ class implementing nsIClassInfo, you don't need to do anything to activate the auto-interface magic which makes calling QueryInterface unnecessary. It just happens.
How do I make my C++ class implement nsIClassInfo?
See nsIClassInfoImpl.h
for instructions.
How does nsIClassInfo work?
That's also detailed in nsIClassInfoImpl.h
.
- Authors: Mike Shaver, Justin Lebar
- Last Updated Date: July 25, 2011
- Copyright Information: Portions of this content are © 1998–2011 by individual mozilla.org contributors; content available under a Creative Commons license | Details.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论