11. Access modifiers

qBeta has the following access modifier:

Modifier Pattern Subpattern Module World
%public Y Y Y Y
%private Y N N N
%protected Y Y N N
%domain Y N Y N

  • Subpattern also covers singlar objects with the pattern as a superpattern.
  • Pattern also covers singular object.
  • Domain is the set of modules bound/delimited by the nearest enclosing module with the property %domain_boundary – see below.
  • The first data column indicates whether the pattern itself has access to the member defined by the access level. As you can see, a pattern always has access to its own attributes.
  • The second column indicates whether sub patterns of the pattern declared outside this Domain have access to the attribute.
  • The third column indicates whether patterns in the same domain as the pattern have access to the attribute.
  • The fourth column indicates whether all patterns have access to the attribute.