parameters: (self, name, allowed=None)
docstring: Check that a type name is not defined or defined with the given value.
  
      Args:
        name: str, the name of the type in the type table.
        allowed: optional str, if a type is already defined in the
          typetable, then the existing C++ type for `name` must match this
          value. This only applies if `name` already exists.
  
      Raises:
        NameError: if the name is not defined, or if it is defined but doesn't
          match the allowed value.
docstring_summary: Check that a type name is not defined or defined with the given value.
docstring_tokens: Check that a type name is not defined or defined with the given value .
function: def check_known_name(self, name, allowed=None):
      """Check that a type name is not defined or defined with the given value.
  
      Args:
        name: str, the name of the type in the type table.
        allowed: optional str, if a type is already defined in the
          typetable, then the existing C++ type for `name` must match this
          value. This only applies if `name` already exists.
  
      Raises:
        NameError: if the name is not defined, or if it is defined but doesn't
          match the allowed value.
      """
      if name in self._capsules:
        raise NameError('Name "%s" already defined as capsule name.' % name)
  
      if self._typetable.has_type(name):
        if not allowed:
          raise NameError(
              'Name %r already defined as type %r, but it was expected to '
              'be undefined' % (name, self._typetable.get_last_cpp_type(name)))
        elif self._typetable.get_last_cpp_type(name) != allowed:
          raise NameError(
              'Name %r already defined as type %r, but %r was expected' %
              (name, self._typetable.get_last_cpp_type(name), allowed))
  
      if name in self._typenames:
        raise NameError('Name "%s" already defined as type alias.' % name)
      if name in self._macros:
        raise NameError('Name "%s" already defined as interface name.' % name)
function_tokens: def check_known_name ( self , name , allowed = None ) : if name in self . _capsules : raise NameError ( 'Name "%s" already defined as capsule name.' % name ) if self . _typetable . has_type ( name ) : if not allowed : raise NameError ( 'Name %r already defined as type %r, but it was expected to ' 'be undefined' % ( name , self . _typetable . get_last_cpp_type ( name ) ) ) elif self . _typetable . get_last_cpp_type ( name ) != allowed : raise NameError ( 'Name %r already defined as type %r, but %r was expected' % ( name , self . _typetable . get_last_cpp_type ( name ) , allowed ) ) if name in self . _typenames : raise NameError ( 'Name "%s" already defined as type alias.' % name ) if name in self . _macros : raise NameError ( 'Name "%s" already defined as interface name.' % name )