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

Method AddCurrentTypes

IDEHelper/Compiler/BfAutoComplete.cpp:754–781  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

752}
753
754void BfAutoComplete::AddCurrentTypes(BfTypeInstance* typeInst, const StringImpl& filter, bool allowProtected, bool allowPrivate, bool onlyAttribute)
755{
756 if (typeInst != mModule->mCurTypeInstance)
757 AddTypeDef(typeInst->mTypeDef->GetDefinition(), filter, onlyAttribute);
758
759 auto typeDef = typeInst->mTypeDef->GetDefinition();
760 for (auto nestedTypeDef : typeDef->mNestedTypes)
761 {
762 if (nestedTypeDef->mIsPartial)
763 {
764 nestedTypeDef = mSystem->GetCombinedPartial(nestedTypeDef);
765 if (nestedTypeDef == NULL)
766 continue;
767 }
768
769 if (CheckProtection(nestedTypeDef->mProtection, nestedTypeDef, allowProtected, allowPrivate))
770 AddTypeDef(nestedTypeDef, filter, onlyAttribute);
771 }
772
773 auto outerType = mModule->GetOuterType(typeInst);
774 if (outerType != NULL)
775 AddCurrentTypes(outerType, filter, allowProtected, allowPrivate, onlyAttribute);
776
777 allowPrivate = false;
778 auto baseType = mModule->GetBaseType(typeInst);
779 if (baseType != NULL)
780 AddCurrentTypes(baseType, filter, allowProtected, allowPrivate, onlyAttribute);
781}
782
783void BfAutoComplete::AddField(BfTypeInstance* typeInst, BfFieldDef* fieldDef, BfFieldInstance* fieldInstance, const StringImpl& filter)
784{

Callers

nothing calls this directly

Calls 5

CheckProtectionFunction · 0.85
GetDefinitionMethod · 0.80
GetCombinedPartialMethod · 0.80
GetOuterTypeMethod · 0.80
GetBaseTypeMethod · 0.45

Tested by

no test coverage detected