【发布时间】:2010-06-07 15:35:04
【问题描述】:
我想将受保护方法的访问权限限制为仅对某些继承的类。
例如有一个像这样的基类
TBase = Class
Protected
Method1;
Method2;
Method3;
Method4;
End;
我有两个从 TBase 派生的类
TDerived1 = Class(TBase)
//Here i must access only Method1,Method2 and Method3
End;
TDerived2 = Class(TBase)
//Here i must access only Method3 and Method4
End;
那么有没有可能 当我使用 TDerived1 和 Method3 和 Method4 当我使用 TDerived2
的对象时【问题讨论】: