public static ITypeDef GetConstVersion(ITypeDef original) { if (original.IsConst()) { return(original); } string constName = original.GetName() + " const"; if (_typeRegistry.ContainsKey(constName)) { return(_typeRegistry[constName]); } ITypeDef result = original.Clone(true); _typeRegistry.Add(constName, result); return(result); }
public virtual string GetName() { string args = ""; for (int ii = 0; ii < argTypes.Count; ++ii) { string defaultString = ""; if (ii >= minArgs) { defaultString = "?"; } args += (ii == 0 ? "" : ", ") + argTypes[ii].GetName() + defaultString; } string classPart = ""; if (null != classType) { classPart = ":" + classType.className; } return("function" + classPart + "<" + retType.GetName() + "(" + args + ")>"); }