parameters: (self, protect_str)
return_statement: return (protect_if_str, protect_end_str)
docstring: Generate protection string.
  
          Protection strings are the strings defining the OS/Platform/Graphics
          requirements for a given OpenXR command.  When generating the
          language header files, we need to make sure the items specific to a
          graphics API or OS platform are properly wrapped in #ifs.
docstring_summary: Generate protection string.
docstring_tokens: Generate protection string .
function: def genProtectString(self, protect_str):
          """Generate protection string.
  
          Protection strings are the strings defining the OS/Platform/Graphics
          requirements for a given OpenXR command.  When generating the
          language header files, we need to make sure the items specific to a
          graphics API or OS platform are properly wrapped in #ifs."""
          protect_if_str = ''
          protect_end_str = ''
          if not protect_str:
              return (protect_if_str, protect_end_str)
  
          if ',' in protect_str:
              protect_list = protect_str.split(",")
              protect_defs = ('defined(%s)' % d for d in protect_list)
              protect_def_str = ' && '.join(protect_defs)
              protect_if_str = '#if %s\n' % protect_def_str
              protect_end_str = '#endif // %s\n' % protect_def_str
          else:
              protect_if_str = '#ifdef %s\n' % protect_str
              protect_end_str = '#endif // %s\n' % protect_str
  
          return (protect_if_str, protect_end_str)
function_tokens: def genProtectString ( self , protect_str ) : protect_if_str = '' protect_end_str = '' if not protect_str : return ( protect_if_str , protect_end_str ) if ',' in protect_str : protect_list = protect_str . split ( "," ) protect_defs = ( 'defined(%s)' % d for d in protect_list ) protect_def_str = ' && ' . join ( protect_defs ) protect_if_str = '#if %s\n' % protect_def_str protect_end_str = '#endif // %s\n' % protect_def_str else : protect_if_str = '#ifdef %s\n' % protect_str protect_end_str = '#endif // %s\n' % protect_str return ( protect_if_str , protect_end_str )