parameters: (self, func, f)
docstring: Overrriden from TypeHandler.
docstring_summary: Overrriden from TypeHandler.
docstring_tokens: Overrriden from TypeHandler .
function: def WriteHandlerImplementation(self, func, f):
      """Overrriden from TypeHandler."""
      state_name = func.GetInfo('state')
      state = _STATES[state_name]
      states = state['states']
      args = func.GetOriginalArgs()
      num_args = len(args)
      code = []
      for group_ndx, group in enumerate(Grouper(num_args, states)):
        for ndx, item in enumerate(group):
          code.append("state_.%s != %s" % (item['name'], args[ndx].name))
      f.write("  if (%s) {\n" % " ||\n      ".join(code))
      for group_ndx, group in enumerate(Grouper(num_args, states)):
        for ndx, item in enumerate(group):
          f.write("    state_.%s = %s;\n" % (item['name'], args[ndx].name))
      if 'state_flag' in state:
        f.write("    %s = true;\n" % state['state_flag'])
      if not func.GetInfo("no_gl"):
        f.write("    %s(%s);\n" %
                   (func.GetGLFunctionName(), func.MakeOriginalArgString("")))
      f.write("  }\n")
function_tokens: def WriteHandlerImplementation ( self , func , f ) : state_name = func . GetInfo ( 'state' ) state = _STATES [ state_name ] states = state [ 'states' ] args = func . GetOriginalArgs ( ) num_args = len ( args ) code = [ ] for group_ndx , group in enumerate ( Grouper ( num_args , states ) ) : for ndx , item in enumerate ( group ) : code . append ( "state_.%s != %s" % ( item [ 'name' ] , args [ ndx ] . name ) ) f . write ( "  if (%s) {\n" % " ||\n      " . join ( code ) ) for group_ndx , group in enumerate ( Grouper ( num_args , states ) ) : for ndx , item in enumerate ( group ) : f . write ( "    state_.%s = %s;\n" % ( item [ 'name' ] , args [ ndx ] . name ) ) if 'state_flag' in state : f . write ( "    %s = true;\n" % state [ 'state_flag' ] ) if not func . GetInfo ( "no_gl" ) : f . write ( "    %s(%s);\n" % ( func . GetGLFunctionName ( ) , func . MakeOriginalArgString ( "" ) ) ) f . write ( "  }\n" )