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

Method CheckProtection

IDEHelper/Compiler/BfModule.cpp:2895–2912  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2893}
2894
2895bool BfModule::CheckProtection(BfProtection protection, BfTypeDef* checkType, bool allowProtected, bool allowPrivate)
2896{
2897 if ((protection == BfProtection_Public) ||
2898 (((protection == BfProtection_Protected) || (protection == BfProtection_ProtectedInternal)) && (allowProtected)) ||
2899 ((protection == BfProtection_Private) && (allowPrivate)))
2900 return true;
2901 if ((mAttributeState != NULL) && (mAttributeState->mCustomAttributes != NULL) && (mAttributeState->mCustomAttributes->Contains(mCompiler->mFriendAttributeTypeDef)))
2902 {
2903 mAttributeState->mUsed = true;
2904 return true;
2905 }
2906 if (((protection == BfProtection_Internal) || (protection == BfProtection_ProtectedInternal)) && (checkType != NULL))
2907 {
2908 if (CheckInternalProtection(checkType))
2909 return true;
2910 }
2911 return false;
2912}
2913
2914void BfModule::GetAccessAllowed(BfTypeInstance* checkType, bool &allowProtected, bool &allowPrivate)
2915{

Callers 6

WantsCheckMethodMethod · 0.45
CheckTypeMethod · 0.45
LookupFieldMethod · 0.45
MatchConstructorMethod · 0.45
DoTypeIntAttrMethod · 0.45

Calls 4

ContainsMethod · 0.45
GetOwnerMethod · 0.45
IsInstanceOfMethod · 0.45
IsGlobalsContainerMethod · 0.45

Tested by

no test coverage detected