private AbstractSyntaxTreeNode GatherDeclInformationOrDefault(string name, ClassExtractorObj obj, out string hashCode) { hashCode = null; foreach (var node in obj.ClassTemplateDecls) { if (!Splitter.Split(node.Value).Any(v => v.Equals(name)) || !ContainsDefinitionData(node)) { continue; } hashCode = GetClassHashCodeOrDefault(node); if (hashCode == null) { continue; } return(node); } return(null); }
public AbstractSyntaxTreeNode GatherDeclInformation(string name, ClassExtractorObj obj, out string hashCode) { hashCode = null; foreach (var node in obj.ClassTemplateDecls) { if (!Splitter.Split(node.Value).Any(v => v.Equals(name)) || !ContainsDefinitionData(node)) { continue; } hashCode = GetClassHashCodeOrDefault(node); if (hashCode == null) { continue; } return(node); } throw new EngineReportExceptionData($"Unable to find c++ class named \'{name}\'") { Type = "Compilation" }; }
public AbstractSyntaxTreeNode GatherMethodDeclaration(AbstractSyntaxTreeNode classNode, ClassExtractorObj obj, string hashCode) { var root = new AbstractSyntaxTreeNode("Root"); root.Append(classNode); foreach (var node in obj.CxxMethodDecls.Where(wrapper => IsDefinedClassMethod(wrapper, hashCode))) { root.Append(node); } return(root); }
public ClassExtractorDeclVisitor(ClassExtractorObj extractorObj, ILineSplitter spiltter) { ExtractorObj = extractorObj; Spiltter = spiltter; }