От: | c-smile | http://terrainformatica.com | |
Дата: | 05.06.05 21:17 | ||
Оценка: |
Protection Attribute
Protection is an attribute that is one of private, package, protected, public or export.
Private means that only members of the enclosing class can access the member, or members and functions in the same module as the enclosing class. Private members cannot be overridden. Private module members are equivalent to static declarations in C programs.
Package extends private so that package members can be accessed from code in other modules that are in the same package. This applies to the innermost package only, if a module is in nested packages.
Protected means that only members of the enclosing class or any classes derived from that class, or members and functions in the same module as the enclosing class, can access the member. Protected module members are illegal.
Public means that any code within the executable can access the member.
Export means that any code outside the executable can access the member. Export is analogous to exporting definitions from a DLL.