About NONSHARABLE_CLASS

About NONSHARABLE_CLASS:

We can find some information from “Symbian OS v9.2 - Symbian OS reference - C++ component reference - Base E32_COMPSUPP - NONSHARABLE_CLASS”

Location: gcce.h

NONSHARABLE_CLASS
NONSHARABLE_CLASS (x) class __declspec(notshared) x
Description
Declares a class as being non-sharable.

If a class is non-sharable, then a class implemented in another DLL cannot derive (inherit) from that class.

Declaring a class as non-sharable prevents the compiler from exporting compiler implementation-specific symbols, i.e. run-time type-information and virtual tables. This prevents classes in other DLLs from being able to derive from it.

Note :
if a class is marked as non-sharable, then Symbian OS requires all classes that are derived from that class are implemented in the same DLL.

By default, a class is sharable.
The following code fragment shows how a non-sharable class is declared.
NONSHARABLE_CLASS(CMyClass) : public CBase
    {
    public :
    ...
    private :
    ...
    }
  The name of the class to be declared as non-sharable.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值