Re[2]: вопросы по D
От: c-smile Канада http://terrainformatica.com
Дата: 05.06.05 21:17
Оценка:
Здравствуйте, Losar, Вы писали:

L>И ещё.

L>Есть ли у класса права доступа к методам и членом класса???? Если да то как использовать?

Как обычно.

Читай доку (она конечно не супер но все есть — её просто нужно прочитать всю):

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.


http://www.digitalmars.com/d/attribute.html
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.