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

Method AddInnerTypes

IDEHelper/Compiler/BfAutoComplete.cpp:721–752  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

719}
720
721void BfAutoComplete::AddInnerTypes(BfTypeInstance* typeInst, const StringImpl& filter, BfTypeInstance* startType, bool allowProtected, bool allowPrivate)
722{
723 if (typeInst->IsEnum())
724 AddEntry(AutoCompleteEntry("valuetype", "UnderlyingType"), filter);
725
726 BfShow checkShow = (typeInst == startType) ? BfShow_Hide : BfShow_HideIndirect;
727
728 for (auto innerType : typeInst->mTypeDef->mNestedTypes)
729 {
730 if (innerType->mShow >= checkShow)
731 continue;
732
733 if (innerType->mOuterType->mTypeCode == BfTypeCode_Extension)
734 {
735 if (typeInst->mDefineState < BfTypeDefineState_Defined)
736 mModule->PopulateType(typeInst);
737
738 if ((typeInst->mGenericTypeInfo != NULL) && (typeInst->mGenericTypeInfo->mGenericExtensionInfo != NULL))
739 {
740 if (!typeInst->mGenericTypeInfo->mGenericExtensionInfo->mConstraintsPassedSet.IsSet(innerType->mOuterType->mPartialIdx))
741 continue;
742 }
743 }
744
745 if (CheckProtection(innerType->mProtection, innerType, allowProtected, allowPrivate))
746 AddTypeDef(innerType, filter);
747 }
748
749 allowPrivate = false;
750 if (typeInst->mBaseType != NULL)
751 AddInnerTypes(typeInst->mBaseType, filter, startType, allowProtected, allowPrivate);
752}
753
754void BfAutoComplete::AddCurrentTypes(BfTypeInstance* typeInst, const StringImpl& filter, bool allowProtected, bool allowPrivate, bool onlyAttribute)
755{

Callers

nothing calls this directly

Calls 5

AutoCompleteEntryClass · 0.85
CheckProtectionFunction · 0.85
IsEnumMethod · 0.45
PopulateTypeMethod · 0.45
IsSetMethod · 0.45

Tested by

no test coverage detected