MCPcopy Create free account
hub / github.com/beefytech/Beef / CheckAccessMemberProtection

Method CheckAccessMemberProtection

IDEHelper/Compiler/BfModule.cpp:3689–3703  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3687}
3688
3689bool BfModule::CheckAccessMemberProtection(BfProtection protection, BfTypeInstance* memberType)
3690{
3691 bool allowPrivate = (memberType == mCurTypeInstance) || (IsInnerType(mCurTypeInstance, memberType));
3692 if (!allowPrivate)
3693 allowPrivate |= memberType->IsInterface();
3694 bool allowProtected = allowPrivate;
3695 //TODO: We had this commented out, but this makes accessing protected properties fail
3696 if (mCurTypeInstance != NULL)
3697 allowProtected |= TypeIsSubTypeOf(mCurTypeInstance, memberType->ToTypeInstance());
3698 if (!CheckProtection(protection, memberType->mTypeDef, allowProtected, allowPrivate))
3699 {
3700 return false;
3701 }
3702 return true;
3703}
3704
3705bool BfModule::CheckDefineMemberProtection(BfProtection protection, BfType* memberType)
3706{

Callers 1

CheckPropFailMethod · 0.80

Calls 3

CheckProtectionFunction · 0.85
IsInterfaceMethod · 0.45
ToTypeInstanceMethod · 0.45

Tested by

no test coverage detected