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

Method GetMethodDefString

IDEHelper/Compiler/BfCompiler.cpp:8848–8882  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8846 }
8847
8848 void GetMethodDefString(BfMethodDef* methodDef, StringImpl& result, int* genericStrIdx = NULL)
8849 {
8850 if (methodDef->mMethodType == BfMethodType_Ctor)
8851 {
8852 if (methodDef->mIsStatic)
8853 result += "static ";
8854 result += "this";
8855 }
8856 else if (methodDef->mMethodType == BfMethodType_Dtor)
8857 {
8858 if (methodDef->mIsStatic)
8859 result += "static ";
8860 result += "~this";
8861 }
8862 else
8863 result += methodDef->mName;
8864 if (methodDef->mMethodType == BfMethodType_Mixin)
8865 result += "!";
8866
8867 if (!methodDef->mGenericParams.IsEmpty())
8868 {
8869 if (genericStrIdx != NULL)
8870 {
8871 *genericStrIdx = result.mLength;
8872 }
8873 else
8874 {
8875 GetGenericStr(methodDef, result);
8876 }
8877 }
8878
8879 result += "(";
8880 AddParams(methodDef, result);
8881 result += ")";
8882 }
8883
8884 void AddMethodDef(BfMethodDef* methodDef, StringImpl* methodDefString = NULL)
8885 {

Callers 1

GetTypeDefMatchesMethod · 0.80

Calls 1

IsEmptyMethod · 0.45

Tested by

no test coverage detected