def allowVisit(self, node): """Return True if visiting is allowed.""" if node.kind == ci.CursorKind.TRANSLATION_UNIT: return True if not app._hasFileLocation(node): return False if self.cache.has_key(node.location.file.name): return self.cache[node.location.file.name] # Check whether node's location is below the include directories or one # of the source files. filename = os.path.abspath(node.location.file.name) result = False for x in self.include_dirs: if filename.startswith(x): result = True break if not result: for x in self.source_files: if filename == x: result = True break if result: for x in self.exclude_dirs: if filename.startswith(x): result = False break self.cache[node.location.file.name] = result return result
def allowVisit(self, node): if not app._hasFileLocation(node): return False displayname = node.displayname if not displayname: return False # Ignore empty symbols. if node.kind == ci.CursorKind.FUNCTION_TEMPLATE: return True return False
def allowVisit(self, node): if not app._hasFileLocation(node): #print 'no location' return False if not node.displayname: #print 'no displayname' return False # Ignore empty symbols. # print 'allow visit template type?', displayname, node.kind if node.kind == self.kind: #print 'different kind' return True return False