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

Method HasMixin

IDEHelper/Compiler/BfModule.cpp:11770–11796  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11768}
11769
11770bool BfModule::HasMixin(BfTypeInstance* typeInstance, const StringImpl& methodName, int paramCount, bool checkBase)
11771{
11772 PopulateType(typeInstance, BfPopulateType_DataAndMethods);
11773
11774 while (typeInstance != NULL)
11775 {
11776 typeInstance->mTypeDef->PopulateMemberSets();
11777 BfMemberSetEntry* entry = NULL;
11778 BfMethodDef* methodDef = NULL;
11779 if (typeInstance->mTypeDef->mMethodSet.TryGetWith(methodName, &entry))
11780 methodDef = (BfMethodDef*)entry->mMemberDef;
11781
11782 while (methodDef != NULL)
11783 {
11784 if ((methodDef->mMethodType == BfMethodType_Mixin) &&
11785 ((paramCount == -1) || (paramCount == (int)methodDef->mParams.size())))
11786 return true;
11787
11788 methodDef = methodDef->mNextWithSameName;
11789 }
11790
11791 if (!checkBase)
11792 break;
11793 typeInstance = typeInstance->mBaseType;
11794 }
11795 return BfModuleMethodInstance();
11796}
11797
11798String BfModule::FieldToString(BfFieldInstance* fieldInstance)
11799{

Callers

nothing calls this directly

Calls 4

PopulateMemberSetsMethod · 0.80
TryGetWithMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected