static bool HasIgnoredBaseClass(INamedDecl @override, Class @class, out Class ignoredBase) { var isIgnored = false; ignoredBase = null; foreach (var baseClassSpec in @class.Bases) { if (!baseClassSpec.IsClass) { continue; } var @base = baseClassSpec.Class; if ([email protected](m => m.Name == @override.Name)) { continue; } ignoredBase = @base; isIgnored |= [email protected] || HasIgnoredBaseClass(@override, @base, out ignoredBase); if (isIgnored) { break; } } return(isIgnored); }
private static string GetReadWritePropertyName(INamedDecl getter, string afterSet) { string name = GetPropertyName(getter.Name); if (name != afterSet && name.StartsWith("is")) { name = char.ToLowerInvariant(name[2]) + name.Substring(3); } return(name); }
private Class FindClassToMoveFunctionTo(INamedDecl @namespace) { var unit = @namespace as TranslationUnit; if (unit == null) { return Driver.ASTContext.FindClass( @namespace.Name, ignoreCase: true).FirstOrDefault(); } return Driver.ASTContext.FindCompleteClass( unit.FileNameWithoutExtension.ToLowerInvariant(), true); }
private Class FindClassToMoveFunctionTo(INamedDecl @namespace) { var unit = @namespace as TranslationUnit; if (unit == null) { return(ASTContext.FindClass( @namespace.Name, ignoreCase: true).FirstOrDefault()); } return(ASTContext.FindCompleteClass( unit.FileNameWithoutExtension.ToLowerInvariant(), true)); }
public static int GetVTableIndex(INamedDecl method, Class @class) { switch (@class.Layout.ABI) { case CppAbi.Microsoft: return (from table in @class.Layout.VFTables let j = table.Layout.Components.FindIndex(m => m.Method == method) where j >= 0 select j).First(); default: return @class.Layout.Layout.Components.FindIndex(m => m.Method == method); } }
public static int GetVTableIndex(INamedDecl method, Class @class) { switch (@class.Layout.ABI) { case CppAbi.Microsoft: return((from table in @class.Layout.VFTables let j = table.Layout.Components.FindIndex(m => m.Method == method) where j >= 0 select j).First()); default: return(@class.Layout.Layout.Components.FindIndex(m => m.Method == method)); } }
private static string GetReadWritePropertyName(INamedDecl getter, string afterSet) { string name = GetPropertyName(getter.Name); if (name != afterSet && name.StartsWith("is")) { name = char.ToLowerInvariant(name[2]) + name.Substring(3); } return name; }
static bool HasIgnoredBaseClass(INamedDecl @override, Class @class, out Class ignoredBase) { var isIgnored = false; ignoredBase = null; foreach (var baseClassSpec in @class.Bases) { if (!baseClassSpec.IsClass) continue; var @base = baseClassSpec.Class; if ([email protected](m => m.Name == @override.Name)) continue; ignoredBase = @base; isIgnored |= [email protected] || HasIgnoredBaseClass(@override, @base, out ignoredBase); if (isIgnored) break; } return isIgnored; }