parameters: (self, node)
return_statement: return result
docstring: Return True if visiting is allowed.
docstring_summary: Return True if visiting is allowed.
docstring_tokens: Return True if visiting is allowed .
function: def visitAllowed(self, node):
          """Return True if visiting is allowed."""
          # Visit if translation unit.
          if node.kind == ci.CursorKind.TRANSLATION_UNIT:
              return True
          # Don't visit if it has no location (built-in).
          if not _hasFileLocation(node):
              return False
          # Try to hit cache.
          if self.cache.has_key(node.location.file.name):
              return self.cache[node.location.file.name]
          # Check whether the file is blocked.
          if node.location.file.name in self.blocked_files:
              # print 'Blocked', node.location.file.name
              self.cache[node.location.file.name] = False
              return False
          # Check whether node's location is below the include directories.  It is
          # only visited if this is the case.
          filename = os.path.abspath(node.location.file.name)
          result = False
          for x in self.include_dirs:
              if filename.startswith(x):
                  # print filename, x
                  result = True
                  break
          self.cache[node.location.file.name] = result  # Save in cache.
          return result
function_tokens: def visitAllowed ( self , node ) : # Visit if translation unit. if node . kind == ci . CursorKind . TRANSLATION_UNIT : return True # Don't visit if it has no location (built-in). if not _hasFileLocation ( node ) : return False # Try to hit cache. if self . cache . has_key ( node . location . file . name ) : return self . cache [ node . location . file . name ] # Check whether the file is blocked. if node . location . file . name in self . blocked_files : # print 'Blocked', node.location.file.name self . cache [ node . location . file . name ] = False return False # Check whether node's location is below the include directories.  It is # only visited if this is the case. filename = os . path . abspath ( node . location . file . name ) result = False for x in self . include_dirs : if filename . startswith ( x ) : # print filename, x result = True break self . cache [ node . location . file . name ] = result # Save in cache. return result