Access rights for class members in the Delphi XE
A total of 6 keywords are provided to restrict access:
Public, private, protected, published, automated strict private, strict protected
Their respective meanings are:
1. Strict private:
The field or method defined by this zone can only be used in the current class. That is, members of this zone definition in T1 can only be used in T1.
2. Strict protected:
The member defined by this zone can be used in addition to the current class, and can also be used in any subclass of the current class. Both of these members cannot be accessed between different objects of the same class.
3. Private:
Qualified members can only be used to define the. pas file or. dpr file for this class.
4. Protected:
The equivalent of extending private to any subclass is visible.
5. Public:
Visible to any location, any class. When some members do not explicitly specify their access rights, Delphi defaults to this public.
6. Published:
Access rights are the same as public.
7. Automated:
Used for COM programming under WIN32.
Note: The strict private and strict protected are introduced from Delphi2007, and the previous version does not exist in either of these levels
The following two points should be noted when declaring attributes in the published published published zone:
The value of the published published property can only be: an ordered type, a string interface variant method pointer, and a collection type between 0 and 31 on the upper bound. A real number cannot be a Real48 type.
Two or more overloaded methods cannot be advertised in the same name.
http://blog.csdn.net/shuaihj/article/details/6187814
Access privileges for class members in Delphi XE (new strict private and strict protected, and automated)