ddmd.access

Compiler implementation of the D programming language.

Members

Functions

checkAccess
bool checkAccess(AggregateDeclaration ad, Loc loc, Scope* sc, Dsymbol smember)

Do access check for member of this class, this class being the type of the 'this' pointer used to access smember. Returns true if the member is not accessible.

checkAccess
bool checkAccess(Loc loc, Scope* sc, Expression e, Declaration d)

Check access to d for expression e.d Returns true if the declaration is not accessible.

checkAccess
bool checkAccess(Loc loc, Scope* sc, Package p)

Check access to package/module p from scope sc.

getAccess
Prot getAccess(AggregateDeclaration ad, Dsymbol smember)

Return Prot access for Dsymbol smember in this declaration.

hasPackageAccess
bool hasPackageAccess(Scope* sc, Dsymbol s)

Determine if scope sc has package level access to s.

hasPrivateAccess
bool hasPrivateAccess(AggregateDeclaration ad, Dsymbol smember)

Determine if smember has access to private members of this declaration.

hasProtectedAccess
bool hasProtectedAccess(Scope* sc, Dsymbol s)

Determine if scope sc has protected level access to cd.

isFriendOf
bool isFriendOf(AggregateDeclaration ad, AggregateDeclaration cd)

Determine if this is the same or friend of cd.

symbolIsVisible
bool symbolIsVisible(Module mod, Dsymbol s)

Check whether symbols s is visible in mod.

symbolIsVisible
bool symbolIsVisible(Dsymbol origin, Dsymbol s)

Same as above, but determines the lookup module from symbols origin.

symbolIsVisible
bool symbolIsVisible(Scope* sc, Dsymbol s)

Same as above but also checks for protected symbols visible from scope sc. Used for qualified name lookup.

Static functions

isAccessible
bool isAccessible(Dsymbol smember, Dsymbol sfunc, AggregateDeclaration dthis, AggregateDeclaration cdscope)

Helper function for checkAccess()

Meta

Source

See Source File
$(DMDSRC _access.d)