parameters: (self, cursor)
return_statement: return False
docstring: process the node, depending on the type. If returns true, then it will perform a deep
          iteration on its children. Otherwise it will continue with its siblings (if any)
  
          @param: cursor the cursor to analyze
docstring_summary: process the node, depending on the type. If returns true, then it will perform a deep
          iteration on its children. Otherwise it will continue with its siblings (if any)
docstring_tokens: process the node depending on the type . If returns true then it will perform a deep iteration on its children . Otherwise it will continue with its siblings ( if any )
function: def _process_node(self, cursor):
          '''
          process the node, depending on the type. If returns true, then it will perform a deep
          iteration on its children. Otherwise it will continue with its siblings (if any)
  
          @param: cursor the cursor to analyze
          '''
          if cursor.kind == cindex.CursorKind.CXX_BASE_SPECIFIER:
              parent = cursor.get_definition()
              parent_name = parent.displayname
  
              if not self.class_name in self.generator.classes_have_no_parents:
                  if parent_name and parent_name not in self.generator.base_classes_to_skip:
                      #if parent and self.generator.in_listed_classes(parent.displayname):
                      if parent.displayname not in self.generator.generated_classes:
                          parent = NativeClass(parent, self.generator)
                          self.generator.generated_classes[parent.class_name] = parent
                      else:
                          parent = self.generator.generated_classes[parent.displayname]
  
                      self.parents.append(parent)
  
              if parent_name == "Ref":
                  self.is_ref_class = True
  
          elif cursor.kind == cindex.CursorKind.FIELD_DECL:
              self.fields.append(NativeField(cursor, self.generator))
              if (self.is_struct or self._current_visibility == cindex.AccessSpecifier.PUBLIC) and NativeField.can_parse(cursor.type, self.generator, cursor) and not self.generator.should_skip_public_field(self.class_name, cursor.displayname):
                  self.public_fields.append(NativeField(cursor, self.generator))
          elif cursor.kind == cindex.CursorKind.CXX_ACCESS_SPEC_DECL:
              self._current_visibility = cursor.access_specifier
          elif cursor.kind == cindex.CursorKind.CXX_METHOD and get_availability(cursor) != AvailabilityKind.DEPRECATED:
              # skip if variadic
              if self._current_visibility == cindex.AccessSpecifier.PUBLIC and not cursor.type.is_function_variadic():
                  m = NativeFunction(cursor, self.generator)
                  registration_name = m.func_name
                  # bail if the function is not supported (at least one arg not supported)
                  if m.not_supported:
                      return False
                  if m.is_override:
                      if NativeClass._is_method_in_parents(self, registration_name):
                          self._add_temp_override_method(m)
                          self._handle_override_method_with_same_name_as_instance_method()
                          return False
  
                  if m.static:
                      if registration_name not in self.static_methods:
                          self.static_methods[registration_name] = m
                      else:
                          previous_m = self.static_methods[registration_name]
                          if isinstance(previous_m, NativeOverloadedFunction):
                              previous_m.append(m)
                          else:
                              self.static_methods[registration_name] = NativeOverloadedFunction([m, previous_m])
                  else:
                      if registration_name not in self.methods:
                          self.methods[registration_name] = m
                      else:
                          previous_m = self.methods[registration_name]
                          if isinstance(previous_m, NativeOverloadedFunction):
                              previous_m.append(m)
                          else:
                              self.methods[registration_name] = NativeOverloadedFunction([m, previous_m])
  
                      self._handle_override_method_with_same_name_as_instance_method()
  
              return True
  
          elif self._current_visibility == cindex.AccessSpecifier.PUBLIC and cursor.kind == cindex.CursorKind.CONSTRUCTOR and get_availability(cursor) != AvailabilityKind.NOT_AVAILABLE and not self.is_abstract:
              # Skip copy constructor
              if cursor.displayname == self.class_name + "(const " + self.namespaced_class_name + " &)":
                  # logger.debug("Skip copy constructor: " + cursor.displayname)
                  return True
  
              m = NativeFunction(cursor, self.generator)
              m.is_constructor = True
              self.has_constructor = True
              if 'constructor' not in self.methods:
                  self.methods['constructor'] = m
              else:
                  previous_m = self.methods['constructor']
                  if isinstance(previous_m, NativeOverloadedFunction):
                      previous_m.append(m)
                  else:
                      m = NativeOverloadedFunction([m, previous_m])
                      m.is_constructor = True
                      self.methods['constructor'] = m
              return True
          # else:
              # logger.error("unknown cursor: %s - %s" % (cursor.kind, cursor.displayname))
          return False
function_tokens: def _process_node ( self , cursor ) : if cursor . kind == cindex . CursorKind . CXX_BASE_SPECIFIER : parent = cursor . get_definition ( ) parent_name = parent . displayname if not self . class_name in self . generator . classes_have_no_parents : if parent_name and parent_name not in self . generator . base_classes_to_skip : #if parent and self.generator.in_listed_classes(parent.displayname): if parent . displayname not in self . generator . generated_classes : parent = NativeClass ( parent , self . generator ) self . generator . generated_classes [ parent . class_name ] = parent else : parent = self . generator . generated_classes [ parent . displayname ] self . parents . append ( parent ) if parent_name == "Ref" : self . is_ref_class = True elif cursor . kind == cindex . CursorKind . FIELD_DECL : self . fields . append ( NativeField ( cursor , self . generator ) ) if ( self . is_struct or self . _current_visibility == cindex . AccessSpecifier . PUBLIC ) and NativeField . can_parse ( cursor . type , self . generator , cursor ) and not self . generator . should_skip_public_field ( self . class_name , cursor . displayname ) : self . public_fields . append ( NativeField ( cursor , self . generator ) ) elif cursor . kind == cindex . CursorKind . CXX_ACCESS_SPEC_DECL : self . _current_visibility = cursor . access_specifier elif cursor . kind == cindex . CursorKind . CXX_METHOD and get_availability ( cursor ) != AvailabilityKind . DEPRECATED : # skip if variadic if self . _current_visibility == cindex . AccessSpecifier . PUBLIC and not cursor . type . is_function_variadic ( ) : m = NativeFunction ( cursor , self . generator ) registration_name = m . func_name # bail if the function is not supported (at least one arg not supported) if m . not_supported : return False if m . is_override : if NativeClass . _is_method_in_parents ( self , registration_name ) : self . _add_temp_override_method ( m ) self . _handle_override_method_with_same_name_as_instance_method ( ) return False if m . static : if registration_name not in self . static_methods : self . static_methods [ registration_name ] = m else : previous_m = self . static_methods [ registration_name ] if isinstance ( previous_m , NativeOverloadedFunction ) : previous_m . append ( m ) else : self . static_methods [ registration_name ] = NativeOverloadedFunction ( [ m , previous_m ] ) else : if registration_name not in self . methods : self . methods [ registration_name ] = m else : previous_m = self . methods [ registration_name ] if isinstance ( previous_m , NativeOverloadedFunction ) : previous_m . append ( m ) else : self . methods [ registration_name ] = NativeOverloadedFunction ( [ m , previous_m ] ) self . _handle_override_method_with_same_name_as_instance_method ( ) return True elif self . _current_visibility == cindex . AccessSpecifier . PUBLIC and cursor . kind == cindex . CursorKind . CONSTRUCTOR and get_availability ( cursor ) != AvailabilityKind . NOT_AVAILABLE and not self . is_abstract : # Skip copy constructor if cursor . displayname == self . class_name + "(const " + self . namespaced_class_name + " &)" : # logger.debug("Skip copy constructor: " + cursor.displayname) return True m = NativeFunction ( cursor , self . generator ) m . is_constructor = True self . has_constructor = True if 'constructor' not in self . methods : self . methods [ 'constructor' ] = m else : previous_m = self . methods [ 'constructor' ] if isinstance ( previous_m , NativeOverloadedFunction ) : previous_m . append ( m ) else : m = NativeOverloadedFunction ( [ m , previous_m ] ) m . is_constructor = True self . methods [ 'constructor' ] = m return True # else: # logger.error("unknown cursor: %s - %s" % (cursor.kind, cursor.displayname)) return False