Access modfiers

23 views
Skip to first unread message

rune funch

unread,
Nov 27, 2012, 4:39:59 AM11/27/12
to dci-ev...@googlegroups.com
I yesterday posted on object-composition part of a Dijkstra implementation in Marvin. While coding it up I noticed that I on one of the classes I used for a RolePlayer I had several properties I only exposed top be used in a role. That let me to think about a new kind of access modification on members. in C# (and roughly the same in C++ and Java) theres private, public and protected. The first is class only access then second is accessible by every one and the last is accessible in the class itself or by all classes derived from it. I found my self needing something similar to protected but instead of making it accessible for derived classes I wanted to make it only accessible to roles.

What do you think?

-Rune
Reply all
Reply to author
Forward
0 new messages